aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-10-09Merge git://git.denx.de/u-boot-dmTom Rini15-57/+61
2017-10-09Merge git://git.denx.de/u-boot-videoTom Rini44-579/+495
2017-10-08sandbox: avoid memory leak in os_dirent_lsHeinrich Schuchardt1-6/+14
Realloc does not free the old memory area if it fails. Identified by cppcheck. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-08dm: ofnode: query correct property in livetree ofnode_get_addr_sizeKlaus Goger1-1/+3
The livetree codepath of ofnode_get_addr_size always used the "reg" property for of_get_property. Use the property parameter of the function call instead and check the return value if the property exists. Otherwise return FDT_ADDR_T_NONE. This was discoverd while using SPI NOR with livetree. spi_flash_decode_fdt checks for memory-map and will not fail with livetree even if the property does not exist. Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-08dm: core: Round up size when allocating so that it is cache line alignedFaiz Abbas1-0/+1
The size variable may not be always be a mulitple of ARCH_DMA_MINALIGN and using it to flush cache leads to cache misaligned warnings. Therefore, round up the size to a multiple of ARCH_DMA_MINLAIGN when allocating private data. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-08dm: gpio: pca953x: Drop pointless data structure checksSimon Glass1-11/+0
These checks cannot fail since driver model will not call a driver's method if it cannot fully create the driver data structures. It is confusing to have these checks and others might copy them. Drop this code. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-10-08dm: gpio: Correct use of -ENODEV in driversSimon Glass9-19/+19
In U-Boot -ENODEV means that there is no device. When there is a problem with the device, drivers should return an error like -ENXIO or -EREMOTEIO. When the device tree properties cannot be read correct , they should return -EINVAL. Update various GPIO drivers to follow this rule, to help with consistency for future driver writers. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Adam Ford <aford173@gmail.com>
2017-10-08dm: gpio: Add a comment about not copying some driversSimon Glass3-1/+15
These three drivers all use U_BOOT_DEVICE rather than device tree to create devices, so have to do manual allocation of platform data. This is not true for new platforms. Add a more explicit comment so that people do not copy this approach with new boards. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Adam Ford <aford173@gmail.com>
2017-10-08dm: gpio: vybrid_gpio: Correct driver's use of bind() methodSimon Glass1-19/+6
It does not look like this driver needs to use a bind() method. It does not manually create devices with device_bind() nor does it create devices using U_BOOT_DEVICE(). It seems to only use device tree. Therefore the manual allocation of platform data is not needed and is confusing. Also platform data should be set up by the ofdata_to_platdata() method, not bind(). Update the driver in case others use it as a model in future. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Adam Ford <aford173@gmail.com>
2017-10-08test: print_ut: Add test for %ls stringsRob Clark1-0/+3
Add a simple test for long strings. Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-08configs: stm32h743-eval: enable filesystem related flagsPatrice Chotard1-0/+6
Enable CMD_GPT/EXT2/EXT4/EXT4_WRITE/FAT_FS_GENERIC flags Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08configs: stm32h743-disco: enable filesystem related flagsPatrice Chotard1-0/+6
Enable CMD_GPT/EXT2/EXT4/EXT4_WRITE/FAT_FS_GENERIC flags Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08configs: stm32h743-disco: enable SDMMC supportPatrice Chotard1-0/+3
Enable CMD_MMC, DM_MMC and STM32_SDMMC2 flags Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08configs: stm32h743-eval: enable SDMMC supportPatrice Chotard1-0/+3
Enable CMD_MMC, DM_MMC and STM32_SDMMC2 flags Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08dm: mmc: remove DM_MMC_OPS for STM32_SDMMCPatrice Chotard1-1/+1
Since e7881d85 "dm: mmc: Drop CONFIG_DM_MMC_OPS" DM_MMC_OPS is no more used, remove it from STM32_SDMMC2 dependencies Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08ARM: DTS: stm32: add SDMMC support fo stm32h743-evalPatrice Chotard2-0/+20
Add pinctrl and sdmmc nodes to add MMC support for STM32H743 evaluation board. Evaluation board needs a second pinctrl node "pinctrl_sdmmc1_level_shifter" to drive a level shifter on MMC bus. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08ARM: DTS: stm32: add SDMMC support for stm32h743 discoPatrice Chotard3-0/+37
Add pinctrl and sdmmc nodes to add MMC support for STM32H743 discovery board. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08configs: stm32: update SRAM address for STM32H7 disco and evalPatrice Chotard2-2/+2
As suggested by Vikas Manocha, update embedded SRAM address to use AXI SRAM available on D1 domain instead of using AHB SRAM (D2 domain). On some STM32H743 SoCs, D2 domain SRAM is accessible even if SRAMxEN bit in AHB2ENR bits are not set whereas on others SoCs version it's not accessible. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2017-10-08ARM: stm32f7: fix prescaler calculation of timerBo Shen1-1/+1
As the timer 2 is on APB1 bus, the maximum of clock frequency of APB1 timer clock is half of SYSCLK. Then to calculate the timer prescaler for timer 2 which need to be divided by 2. Signed-off-by: Bo Shen <voice.shen@gmail.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2017-10-08fs/fat: Check malloc return values and fix memory leaksTuomas Tynkkynen1-10/+20
Check malloc() return values and properly unwind on errors so memory allocated for fat_itr structures get freed properly. Also fixes a leak of fsdata.fatbuf in fat_size(). Fixes: 2460098cffacd1 ("fs/fat: Reduce stack usage") Reported-by: Coverity (CID: 167225, 167233, 167234) Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-10-08fs/fat: Fix 'CACHE: Misaligned operation at range' warningsTuomas Tynkkynen1-5/+5
The 'block' field of fat_itr needs to be properly aligned for DMA and while it does have '__aligned(ARCH_DMA_MINALIGN)', the fat_itr structure itself needs to be properly aligned as well. While at it use malloc_cache_aligned() for the other aligned allocations in the file as well. Fixes: 2460098cffacd1 ("fs/fat: Reduce stack usage") Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-10-08cmd: Make CMD_LZMA / CMD_UNZIP default y if CMD_BOOTITom Rini1-0/+2
In the Linux Kernel on ARM64, the Image.COMPRESSION file is not self-extracting in the way that x86 and ARM images are. So when CMD_BOOTI is enabled we should also default to enabling CMD_UNZIP and CONFIG_LZMA in order for the user to be able to decompress many of the common compressions that will be done to an Image file. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-08scripts: Move Kconfig contents to cmd/KconfigSam Protsenko3-4/+3
On case-insensitive file systems we have collision between scripts/kconfig/ directory and scripts/Kconfig file. This patch moves scripts/Kcofnig contents to cmd/Kconfig to fix that. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-08serial: stm32x7: remove useless CONFIG_CLK and OF_CONTROL flagPatrice Chotard1-7/+2
This driver is currently used by STM32F7 and STM32H7 SoCs. As CONFIG_CLK and OF_CONTROL flags are set by default for these 2 SoCs, this flag becomes useless in this driver, so remove it. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08serial: stm32x7: add STM32F4 supportPatrice Chotard3-2/+10
stm32f4 doesn't support FIFO and OVERRUN feature. The enable bit is not at the same location in CR1 register than for STM32F7 and STM32H7. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08serial: stm32x7: add fifo support for STM32H7Patrice Chotard2-3/+15
Add fifo mode support for rx and tx. As only STM32H7 supports this feature, add has_fifo flag to uart configuration to use fifo only when possible. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08serial: stm32x7: prepare the ground to STM32F4 supportPatrice Chotard2-44/+66
STM32F4 serial IP is similar to F7 and H7, but registers are not located at the same offset and some feature are only supported by F7 and H7 version. Registers offset must be added for each version and also some flags indicated the supported feature. Update registers name to match with datasheet (sr to isr, rx_dr to rdr and tx_dr to tdr) and remove unused regs (cr2, gtpr, rtor, and rqr). Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08serial: stm32x7: remove stm32f7-usart and stm32h7-usart compatiblePatrice Chotard2-4/+2
This patch remove the extra compatibility string "st,stm32h7-usart" and "st,stm32f7-usart" to avoid confusion, save some time & space. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2017-10-08serial: stm32x7: cleanup codePatrice Chotard1-9/+9
Use BIT() macro and GENMASK() macro Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2017-10-08ARMv8: make master CPU checking logic more clearzijun_hu1-0/+1
macro branch_if_master checks master CPU via (Aff3 & (Aff2:Aff1:Aff0)) it is simple but a little obscure. fix by checking Affx fields within MPIDR_EL1 directly. Signed-off-by: zijun_hu <zijun_hu@htc.com>
2017-10-08board: STiH410-B2260: set ramdisk_addr_r to 0x48000000Lee Jones1-0/+1
Add missing ramdisk_addr_r param and set it to 0x48000000 Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-08board: STiH410-B2260: fix sdram sizeNicolas Le Bayon1-1/+1
32MB are reserved for TrustZone purpose Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
2017-10-08board: STiH410-B2260: update environment variablePatrice Chotard2-4/+22
Update environment variable by updating: _ BOOT_TARGET_DEVICE _ CONFIGS_BOOTARGS _ kernel_addr_r, fdtfile, fdt_addr_r, scriptaddr, fdt_high, intird_high Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-08ARMv8: fix error in freeing stack framezijun_hu1-1/+1
relocate_code() allocates 32 bytes stack frame but only 16 bytes are freed before return. it will cause errors to possible previous frames and doesn't make relocate_code() look like a function. fix by freeing 32 bytes stack space Signed-off-by: zijun_hu <zijun_hu@htc.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-08ARMv8: get new GD address from gd->new_gd directlyzijun_hu2-2/+3
the new GD address is calculated via board data BD currently it require the new GD area locates below BD tightly, so a strict constraint is imposed on memory layout which maybe make special platform unpleasant. fix it by getting new GD address from gd->new_gd directly. Signed-off-by: zijun_hu <zijun_hu@htc.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-07Travis-CI: Fix microblaze and xilinx jobsTom Rini1-2/+4
Given how we handle the ARM toolchain we can't easily combine these two jobs, so don't. Give xilinx/ARM a separate build. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-07cmd/gpt.c, cmd/nvedit.c, tools/fit_image.c: Rework recent fixes for CoverityTom Rini3-12/+13
The recent changes to these files did not completely fix the previous issues, or introduced different (minor) issues. In cmd/gpt.c we need to dereference str_disk_guid to be sure that malloc worked. In cmd/nvedit.c we need to be careful that we can also fit in that leading space when adding to the string. And in tools/fit_image.c we need to re-work the error handling slightly in fit_import_data() so that we only call munmap() once. We have two error paths here, one where we have an fd to close and one where we do not. Adjust labels to match this. Reported-by: Coverity (CID: 167366, 167367, 167370) Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-07Merge git://git.denx.de/u-boot-x86Tom Rini15-8/+487
2017-10-07x86: edison: Bring minimal ACPI support to the boardAndy Shevchenko5-0/+26
This board is based on Intel Tangier SoC (Intel Merrifield platform) and may utilize ACPI powerfulness. Bring minimum support by appending initial DSDT table for it. Note, the addresses for generated tables are carefully chosen to avoid any conflicts with existing shadowed BIOS data. The user have somewhat like ~31 kB available for compiled ACPI tables that ought to be enough. Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-10-07x86: tangier: Enable ACPI support for Intel TangierAndy Shevchenko6-0/+455
Intel Tangier SoC is a part of Intel Merrifield platform which doesn't utilize ACPI by default. Here is an attempt to unleash ACPI flexibility power on Intel Merrifield based platforms. The change brings minimum support of the devices that found on Intel Merrifield based end user device. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-10-07x86: theadorable-x86-xxx_defconfig: Enable setexpr commandStefan Roese3-3/+0
The setexpr command is useful for scripting, lets enable it for all x86 based theadorable platforms. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-10-07x86: theadorable-x86-common: Move "-generic" into kernel-ver variableStefan Roese1-4/+4
This enables the easier usage of "-custom" kernel versions as well. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-10-07x86: theadorable-x86-common: Add further pci hotplug cmdline parametersStefan Roese1-1/+2
This is needed for the PCIe hotplug to work correctly on some boards. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-10-06Travis-CI: Split out more vendors from the catch-all ARM jobTom Rini1-2/+7
- Move SoCFPGA and K2 boards to their own job - Expand the microblaze job to cover ARM boards from Xilinx as well. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-06Travis-CI: Move Boundary and Engicam devices to their own jobsTom Rini1-1/+7
The i.MX6 job can still be close to the time limit, move a few more devices out. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-06Travis-CI: Move Toradex into its own jobTom Rini1-6/+11
A few of the big jobs are getting close to the time limit again, split a few more things out. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-06fs/ext4/ext4fs.c: Free dirnode in error path of ext4fs_lsTom Rini1-0/+1
As reported by Coverity, we did not free dirnode in the case of failure. Do so now. Reported-by: Coverity (CID: 131221) Cc: Stefan BrĂ¼ns <stefan.bruens@rwth-aachen.de> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-06tools/fit_image.c: Update some return code pathsTom Rini1-1/+3
Coverity has found some problems with the return paths in parts of this code. We have a case where we were going to the wrong part of the unwind (open() failed so we cannot close the fd), a case where we were only free()ing our buf on the error path and finally a case where we did not munmap in the failure path. Reported-by: Coverity (CID: 138492, 138495, 143064) Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-06cmd/time.c: Initialize 'repeatable' variableTom Rini1-1/+1
We cannot leave this uninitialized, set it to 0. Reported-by: Coverity (CID: 144426) Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-06cmd/pxe.c: Rework initrd and bootargs handling slightlyTom Rini1-6/+6
For the initrd portion of handling our bootm arguments we do not have a sufficiently long enough buffer for some improbable 64bit cases. Expand this buffer to allow for a 64bit address and almost 256MB initrd to be used. Make use of strncpy/strncat when constructing the values here since we know what the worst case valid values are, length wise. Similarly for bootargs themselves, we need to make use of strlen/sizeof and strncpy/strncat to ensure that we don't overflow bootargs itself. Cc: Simon Glass <sjg@chromium.org> Cc: Alexander Graf <agraf@suse.de> Reported-by: Coverity (CID: 131256) Signed-off-by: Tom Rini <trini@konsulko.com>