summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* cmd: Toggle the default value of CONFIG_CMD_IMLSTuomas Tynkkynen2017-10-101187-737/+450
| | | | | | | | | | | | | | Having this as a 'default y' is rather annoying because it doesn't actually compile unless other options are defined in the board header: ../cmd/bootm.c: In function 'do_imls_nor': ../cmd/bootm.c:330:7: error: 'CONFIG_SYS_MAX_FLASH_BANKS' undeclared (first use in this function); did you mean 'CONFIG_SYS_MAX_FLASH_SECT'? i < CONFIG_SYS_MAX_FLASH_BANKS; ++i, ++info) { Make it 'default n' so people who develop new boards that start from a blank defconfig have one less compilation failure to debug. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
* Merge git://git.denx.de/u-boot-dmTom Rini2017-10-0915-57/+61
|\
| * sandbox: avoid memory leak in os_dirent_lsHeinrich Schuchardt2017-10-081-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>
| * dm: ofnode: query correct property in livetree ofnode_get_addr_sizeKlaus Goger2017-10-081-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>
| * dm: core: Round up size when allocating so that it is cache line alignedFaiz Abbas2017-10-081-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>
| * dm: gpio: pca953x: Drop pointless data structure checksSimon Glass2017-10-081-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>
| * dm: gpio: Correct use of -ENODEV in driversSimon Glass2017-10-089-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>
| * dm: gpio: Add a comment about not copying some driversSimon Glass2017-10-083-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>
| * dm: gpio: vybrid_gpio: Correct driver's use of bind() methodSimon Glass2017-10-081-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>
| * test: print_ut: Add test for %ls stringsRob Clark2017-10-081-0/+3
| | | | | | | | | | | | | | Add a simple test for long strings. Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | Merge git://git.denx.de/u-boot-videoTom Rini2017-10-0944-579/+495
|\ \
| * | video: test: Add ANSI escape sequence testsRob Clark2017-09-291-0/+34
| | | | | | | | | | | | | | | | | | | | | This adds tests for clear, set-cursor and color escape sequences. Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * | video: test: Helper for writing stringsRob Clark2017-09-291-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'll need some more of this, let's not just copy-pasta the vidconsole_put_char() loop. Named to match vidconsole_put_char() in case that is ever useful outside of the tests. Signed-off-by: Rob Clark <robdclark@gmail.com>
| * | dm: video: Add color ANSI escape sequence supportRob Clark2017-09-291-0/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that this doesn't differentiate (due to lack of information in video_priv) between different possible component orders for 32bpp. But the main user at this point is efi_loader, and GOP expects xBGR so any video drivers that this is incorrect for already have problems. (Also, conveniently, this matches what simple-framebuffer bindings expect for kernels that use the simple-framebuffer DT binding to take over the bootloader display.) Signed-off-by: Rob Clark <robdclark@gmail.com>
| * | dm: video: Add basic ANSI escape sequence supportRob Clark2017-09-295-3/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | Really just the subset that is needed by efi_console. Perhaps more will be added later, for example color support would be useful to implement efi_cout_set_attribute(). Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | dm: video: Fix cache flushesRob Clark2017-09-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Content can come to screen via putc() and we cannot always rely on updates ending with a puts(). This is the case with efi_console output to vidconsole. Fixes corruption with Shell.efi. Signed-off-by: Rob Clark <robdclark@gmail.com>
| * | board: at91sam9x5ek: Convert to CONFIG_DM_VIDEOWenyou Yang2017-09-297-118/+16
| | | | | | | | | | | | | | | | | | | | | | | | Convert the board to support the video driver model, add the device tree node, and remove the unnecessary code. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | board: sama5d4_xplained: Convert to CONFIG_DM_VIDEOWenyou Yang2017-09-299-128/+40
| | | | | | | | | | | | | | | | | | | | | | | | Convert the board to support the video driver model, add the device tree node, and remove the unnecessary code. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | board: sama5d4ek: Convert to CONFIG_DM_VIDEOWenyou Yang2017-09-297-103/+39
| | | | | | | | | | | | | | | | | | | | | | | | Convert the board to support the video driver model, add the device tree node, and remove the unnecessary code. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | board: sama5d3xek: Convert to CONFIG_DM_VIDEOWenyou Yang2017-09-2911-115/+43
| | | | | | | | | | | | | | | | | | | | | | | | Convert the board to support the video driver model, add the device tree node, and remove the unnecessary code. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | board: sama5d2_xplained: Convert to CONFIG_DM_VIDEOWenyou Yang2017-09-297-100/+79
| | | | | | | | | | | | | | | | | | | | | | | | Convert the board to support the video driver model, add the device tree node, and remove the unnecessary code. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | configs: stm32h743-eval: enable filesystem related flagsPatrice Chotard2017-10-081-0/+6
| | | | | | | | | | | | | | | | | | Enable CMD_GPT/EXT2/EXT4/EXT4_WRITE/FAT_FS_GENERIC flags Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
* | | configs: stm32h743-disco: enable filesystem related flagsPatrice Chotard2017-10-081-0/+6
| | | | | | | | | | | | | | | | | | Enable CMD_GPT/EXT2/EXT4/EXT4_WRITE/FAT_FS_GENERIC flags Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
* | | configs: stm32h743-disco: enable SDMMC supportPatrice Chotard2017-10-081-0/+3
| | | | | | | | | | | | | | | | | | Enable CMD_MMC, DM_MMC and STM32_SDMMC2 flags Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
* | | configs: stm32h743-eval: enable SDMMC supportPatrice Chotard2017-10-081-0/+3
| | | | | | | | | | | | | | | | | | Enable CMD_MMC, DM_MMC and STM32_SDMMC2 flags Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
* | | dm: mmc: remove DM_MMC_OPS for STM32_SDMMCPatrice Chotard2017-10-081-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>
* | | ARM: DTS: stm32: add SDMMC support fo stm32h743-evalPatrice Chotard2017-10-082-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>
* | | ARM: DTS: stm32: add SDMMC support for stm32h743 discoPatrice Chotard2017-10-083-0/+37
| | | | | | | | | | | | | | | | | | | | | Add pinctrl and sdmmc nodes to add MMC support for STM32H743 discovery board. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
* | | configs: stm32: update SRAM address for STM32H7 disco and evalPatrice Chotard2017-10-082-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>
* | | ARM: stm32f7: fix prescaler calculation of timerBo Shen2017-10-081-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>
* | | fs/fat: Check malloc return values and fix memory leaksTuomas Tynkkynen2017-10-081-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>
* | | fs/fat: Fix 'CACHE: Misaligned operation at range' warningsTuomas Tynkkynen2017-10-081-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>
* | | cmd: Make CMD_LZMA / CMD_UNZIP default y if CMD_BOOTITom Rini2017-10-081-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>
* | | scripts: Move Kconfig contents to cmd/KconfigSam Protsenko2017-10-083-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>
* | | serial: stm32x7: remove useless CONFIG_CLK and OF_CONTROL flagPatrice Chotard2017-10-081-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>
* | | serial: stm32x7: add STM32F4 supportPatrice Chotard2017-10-083-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>
* | | serial: stm32x7: add fifo support for STM32H7Patrice Chotard2017-10-082-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>
* | | serial: stm32x7: prepare the ground to STM32F4 supportPatrice Chotard2017-10-082-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>
* | | serial: stm32x7: remove stm32f7-usart and stm32h7-usart compatiblePatrice Chotard2017-10-082-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>
* | | serial: stm32x7: cleanup codePatrice Chotard2017-10-081-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>
* | | ARMv8: make master CPU checking logic more clearzijun_hu2017-10-081-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>
* | | board: STiH410-B2260: set ramdisk_addr_r to 0x48000000Lee Jones2017-10-081-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>
* | | board: STiH410-B2260: fix sdram sizeNicolas Le Bayon2017-10-081-1/+1
| | | | | | | | | | | | | | | | | | 32MB are reserved for TrustZone purpose Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
* | | board: STiH410-B2260: update environment variablePatrice Chotard2017-10-082-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>
* | | ARMv8: fix error in freeing stack framezijun_hu2017-10-081-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>
* | | ARMv8: get new GD address from gd->new_gd directlyzijun_hu2017-10-082-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>
* | Travis-CI: Fix microblaze and xilinx jobsTom Rini2017-10-071-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>
* | cmd/gpt.c, cmd/nvedit.c, tools/fit_image.c: Rework recent fixes for CoverityTom Rini2017-10-073-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>
* | Merge git://git.denx.de/u-boot-x86Tom Rini2017-10-0715-8/+487
|\ \
| * | x86: edison: Bring minimal ACPI support to the boardAndy Shevchenko2017-10-075-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>