aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-03-25mmc: Align MMC_TRACE with tiny printfMarek Vasut
The tiny printf implementation only supports %x format specifier, it does not support %X . Since it makes little difference whether the debug output prints hex numbers in capitals or not, change it to %x and make the MMC_TRACE output work with tiny printf too. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Simon Glass <sjg@chromium.org>
2019-03-25scripts/Makefile.extrawarn: Silence more DTC warningsTom Rini
While our "extrawarns" logic has gotten out of sync with upstream Kbuild, for now lets start by bringing in the latest set of DTC_FLAGS from the Linux Kernel 5.0 to match their behavior in silencing warnings from dtc. Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2019-03-25rsa: check that pointer checksum isn't NULL before using itPhilippe Reynes
The pointer checksum were used before checking that it isn't NULL. We move the code that use it after the check. Reported-by: Coverity (CID: 185835) Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-03-22Merge branch '2019-03-22-master-imports'Tom Rini
- Don't attempt to write to ext4 volumes with the metadata_csum feature we don't support - Correct how we build dtb files. - Fix regression on SPL_FIT with FIT_IMAGE_TINY - Minor TI platform fixes
2019-03-22fs: ext4: do not write on filesystem with metadata_csum featureSébastien Szymanski
U-Boot doesn't support metadata_csum feature. Writing to filesystem with metadata_csum feature makes the filesystem corrupted and unbootable by Linux: [ 2.527495] EXT4-fs (mmcblk0p2): ext4_check_descriptors: Checksum for group 0 failed (52188!=0) [ 2.537421] EXT4-fs (mmcblk0p2): ext4_check_descriptors: Checksum for group 1 failed (5262!=0) ... [ 2.653308] EXT4-fs (mmcblk0p2): ext4_check_descriptors: Checksum for group 14 failed (42611!=0) [ 2.662179] EXT4-fs (mmcblk0p2): ext4_check_descriptors: Checksum for group 15 failed (21527!=0) [ 2.687920] JBD2: journal checksum error [ 2.691982] EXT4-fs (mmcblk0p2): error loading journal [ 2.698292] VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -74 Don't write to filesystem with meatadata_csum feature to not corrupt the filesystem. Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
2019-03-22board: ti: Move fastboot functions out of TI_SECURE_DEVICE ifdefAndrew F. Davis
When these were moved from mach-omap2 to board files they got placed inside TI_SECURE_DEVICE ifdef block, they are not secure only, move them up and out. Fixes: 413b90777f8d ("ti: fastboot: Move weak overrides to board files") Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2019-03-22pci: Add comment to mention difference in DEVFN usage in U-Boot vs LinuxStefan Roese
This patch adds a comment to the header with the PCI_foo macros related to DEVFN to explain the difference in U-Boot vs Linux. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-03-22common: image-android-dt: Fix out-of-bounds accessEugeniu Rosca
Currently, 'dtimg' allows users to check indexes equal to dt_entry_count [1]. Forbid that [2]. [1] Behavior w/o the patch: => ext2load mmc 0:1 0x48000000 dtb.img 105695 bytes read in 5 ms (20.2 MiB/s) => dtimg dump 0x48000000 dt_table_header: magic = d7b7ab1e total_size = 105695 header_size = 32 dt_entry_size = 32 dt_entry_count = 2 dt_entries_offset = 32 page_size = 4096 version = 0 dt_table_entry[0]: dt_size = 105599 dt_offset = 96 id = 0b779520 rev = 00000000 custom[0] = 00000000 custom[1] = 00000000 custom[2] = 00000000 custom[3] = 00000000 (FDT)size = 105599 (FDT)compatible = shimafuji,kingfisher dt_table_entry[1]: dt_size = 105599 dt_offset = 96 id = 0b779530 rev = 00000000 custom[0] = 00000000 custom[1] = 00000000 custom[2] = 00000000 custom[3] = 00000000 (FDT)size = 105599 (FDT)compatible = shimafuji,kingfisher => dtimg size 0x48000000 0 z; print z z=19c7f => dtimg size 0x48000000 1 z; print z z=19c7f => dtimg size 0x48000000 2 z; print z z=d00dfeed => dtimg size 0x48000000 3 z Error: index > dt_entry_count (3 > 2) [2] Behavior with the patch: => dtimg size 0x48000000 0 z; print z z=19c7f => dtimg size 0x48000000 1 z; print z z=19c7f => dtimg size 0x48000000 2 z Error: index >= dt_entry_count (2 >= 2) Fixes: c04473345712 ("common: Add support for Android DT image") Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
2019-03-22configs: am335x_evm: Add CONFIG_BLKFaiz Abbas
With DM_MMC and DM_USB enabled, enable CONFIG_BLK. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2019-03-22Revert "Ensure device tree DTS is compiled"Masahiro Yamada
This reverts commit 27cb7300ffda7a3f1581f0f5a2d3bfe59b97ad67. I am not sure if I correctly understood the log of commit 27cb7300ffda ("Ensure device tree DTS is compiled"), but the code-diff looks like it was trying to solve the missed re-compilation when .dts was modified. Recently, commit 2737dfe096b6 ("kbuild: make arch-dtbs target PHONY") fixed the issue in a more correct and more complete way. Anyway, since the former commit, we see a clumsy log like this: make[2]: 'arch/sandbox/dts/sandbox.dtb' is up to date Another problem is, it created multiple paths to descend into arch/*/dts/, causing a race in parallel building. So, let's revert it. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-03-22mips: add missing dtb-y to arch/mips/dts/MakefileMasahiro Yamada
Since commit 27cb7300ffda ("Ensure device tree DTS is compiled"), build succeeds irrespective of the correctness of Makefile. In fact, you can compile any defconfig without adding any entry in arch/*/dts/Makefile. I am going to revert that commit, so device tree must be explicitly listed in Makefile. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2019-03-22powerpc: fix arch/powerpc/dts/MakefileMasahiro Yamada
Since commit 27cb7300ffda ("Ensure device tree DTS is compiled"), build succeeds irrespective of the correctness of Makefile. I am going to revert that commit, so wrong code must be fixed. CONFIG_MCR3000 is not defined anywhere. CONFIG_TARGET_MCR3000 is the correct one. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-03-22ARM: fix arch/arm/dts/MakefileMasahiro Yamada
Since commit 27cb7300ffda ("Ensure device tree DTS is compiled"), build succeeds irrespective of the correctness of Makefile. In fact, you can compile any defconfig without adding any entry in arch/*/dts/Makefile. As a result, a lot of wrong code have been merged unnoticed. I am going to revert that commit, and lots of hidden issues have come to light: [1] Typos armada-3720-uDPU.dts, sun8i-a83t-tbs-a711.dts use the extension ".dts" instead of ".dtb" [2] DTB is associated to undefined CONFIG option For example, mx6sllevk_defconfig defines CONFIG_MX6SLL, but associates its device tree to CONFIG_MX6SL, which is undefined. [3] Lots of entries are missing Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Chris Packham <judge.packham@gmail.com> [trini: add imx6ul pico dtbs] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-03-22tools: fit_image: Add the loadable property to configsAbel Vesa
When running mkimage with "-f auto", the loadable property needs to be set in order to allow SPL FIT support to boot. Signed-off-by: Abel Vesa <abel.vesa@nxp.com> Tested-by: Fabio Estevam <festevam@gmail.com>
2019-03-22common: spl_fit: Default to IH_OS_U_BOOT if FIT_IMAGE_TINY enabledAbel Vesa
If FIT_IMAGE_TINY is enabled, spl_fit_image_get_os returns -ENOTSUPP. In this case, we should default to IH_OS_U_BOOT not to IH_OS_INVALID. Signed-off-by: Abel Vesa <abel.vesa@nxp.com> Tested-by: Fabio Estevam <festevam@gmail.com>
2019-03-22armv8: Disable exception vectors in SPL by defaultAlexander Graf
Commit 1416e2d2253 ("armv8: make SPL exception vectors optional") had a typo in it which effectively disabled exception handling in SPL code always. Since nobody complained, I guess we may as well disable exception handling in SPL always by default. So fix the bug to make the config option effective, but disable exception handling in SPL by default. This gets us to the same functionality as before by default, but with much less code included in the binary. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Matthias Brugger <mbrugger@suse.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2019-03-22Makefile: Do not pass -E to mkimage when SPL has full fitImage supportMarek Vasut
When the SPL has full fitImage support, do not generate fitImage with external data. The full fitImage code assumes the entire fitImage is loaded in RAM, and the SPL uses fdt_totalsize() to determine the size of the whole fitImage, which can not work with external data. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@konsulko.com>
2019-03-22cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10Heinrich Schuchardt
CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-03-22configs: dra7xx_evm: Remove ENV_IS_IN_FATFaiz Abbas
With U-boot supporting environment in multiple places, enable only ENV_IS_IN_EMMC Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-03-22arm: lib: bootm: Push the Starting kernel print to the endKeerthy
Push the Starting kernel print to the end just before the dm_remove_devices call. Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-03-21Merge branch 'master' of git://git.denx.de/u-boot-socfpgaTom Rini
- ARM: socfpga: Build sfp image only for Gen5 and Arria10 devices
2019-03-21Merge tag 'efi-2019-04-rc5' of git://git.denx.de/u-boot-efiTom Rini
Pull request for UEFI system for v2019.04-rc5 A bunch of small fixes. The major ones being - avoid illegal memory access in efi_allocate_pool() on 32 bit systems - avoid endless loop in HII protocol
2019-03-21Merge branch 'master' of git://git.denx.de/u-boot-i2cTom Rini
- i2c: i2c_cdns: Fix below warnings with checker tool
2019-03-21i2c: i2c_cdns: Fix below warnings with checker toolSiva Durga Prasad Paladugu
This patch fixes below warnings found with checker tool. The variable len in i2c_msg struct is of unsigned type and it is received as recv_count which is unsigned type but it is checked with < 0 which is always false, hence removed it. The local variable curr_recv_count is declared as signed type and compared aginst unsigned recv_count which is incorrect. This is fixed by declaring it as unsigned type. drivers/i2c/i2c-cdns.c: In function ‘cdns_i2c_read_data’: drivers/i2c/i2c-cdns.c:317:18: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if ((recv_count < 0)) ^ drivers/i2c/i2c-cdns.c:340:24: warning: comparison of integer expressions of different signedness: ‘u32’ {aka ‘unsigned int’} and ‘int’ [-Wsign-compare] updatetx = recv_count > curr_recv_count; ^ drivers/i2c/i2c-cdns.c:361:39: warning: comparison of integer expressions of different signedness: ‘u32’ {aka ‘unsigned int’} and ‘int’ [-Wsign-compare] while (readl(&regs->transfer_size) != Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-03-21ARM: socfpga: Build sfp image only for Gen5 and Arria10 devicesDalon Westergreen
The sfp file is only valid for Gen5 (Cyclone5 & Arria5) and Arria10 devices. The file should only be built for these devices. Signed-off-by: Dalon Westergreen <dalon.westergreen@intel.com>
2019-03-20efi_selftest: fix test_hii_string_get_string()Heinrich Schuchardt
The check testing the string result of get_string() returned the wrong result. The result was ignored. Use efi_st_strcmp_16_8() for the string comparison. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-03-20efi_loader: superfluous conversion in efi_file_open()Heinrich Schuchardt
printf("%ls", ..) expects u16 * as argument to print. There is not need for a conversion to wchar_t *. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-03-20efi_loader: remove superfluous check in efi_setup_loaded_image()Heinrich Schuchardt
It does not make any sense to check if a pointer is NULL if we have dereferenced it before. Reported-by: Coverity (CID 185827) Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-03-20efi_loader: memory leak in efi_dump_single_var()Heinrich Schuchardt
A misplaced return statement lead to a memory leak in efi_dump_single_var(). Reported-by: Coverity (CID 185829) Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-03-20efi_loader: missing return in efi_get_next_variable_name()Heinrich Schuchardt
Add a missing return statement in efi_get_next_variable_name(). Reported-by: Coverity (CID 185834) Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-03-20efi_loader: endless loop in add_strings_package()Heinrich Schuchardt
Avoid an endless loop in add_strings_package(). Suggested-by: Takahiro Akashi <takahiro.akashi@linaro.org> Reported-by: Coverity (CID 185833) Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-03-20efi_loader: correct parameter size in efi_allocate_poolHeinrich Schuchardt
efi_allocate_pages() expects a (uint64_t *) pointer to pass the address of the assigned memory. If we pass the address of a pointer here, an illegal memory access occurs on 32bit systems. Fixes: 282a06cbcae8 ("efi_loader: Expose U-Boot addresses in memory map for sandbox") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-03-19Merge git://git.denx.de/u-boot-marvellTom Rini
- Enable network interface on clearfog_gt_8k (Baruch) - Fix dreamplug boot by adding an spi0 alias to the DT (Chris) - Fix / enhance Marvell ddr3 setup / parameters (Chris) - Change CONFIG_SYS_MALLOC_F_LEN to 0x2000 on db-88f6820-amc (Chris) - Enable SPL_FLASH_BAR on db-88f6820-amc (Chris) - Use correct pcie controller name in Armada-38x dts files (Chris) - Disable d-cache on Kirkwood platforms as currently needed (Chris) - Add a more descriptive comment to pci_mvebu.c (Stefan) - Update Marvell maintainers entry (Stefan)
2019-03-19Merge branch 'master' of git://git.denx.de/u-boot-socfpgaTom Rini
2019-03-19Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini
- Fastboot fixes
2019-03-19ARM: kirkwood: disable dcache for Kirkwood boardsChris Packham
Prior to commit 93b283d49f93 ("ARM: CPU: arm926ejs: Consolidate cache routines to common file") the kirkwood boards didn't have and dcache support. The network and usb drivers rely on this. Set CONFIG_SYS_DCACHE_OFF in the Kirkwood specific config.h. Reported-by: Leigh Brown <leigh@solinno.co.uk> Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
2019-03-19ARM: mvebu: use correct name for pcie controllerChris Packham
When armada-385.dtsi was sync'd from Linux the name of the node describing the pcie controller was changed from pcie-controller to pcie. Some of the boards that include armada-385.dtsi were missed in the update retaining the old name. This updates the affected boards. Reported-by: Влад Мао <vlaomao@gmail.com> Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
2019-03-19ARM: mvebu: db-88f6820-amc: enable SPI_FLASH_BARChris Packham
This board uses Micron N25Q256A SPI flash. Enable SPI_FLASH_BAR to allow us to access the whole chip. Signed-off-by: Chris Packham <judge.packham@gmail.com> Cc: Vignesh R <vigneshr@ti.com> Signed-off-by: Stefan Roese <sr@denx.de>
2019-03-19ARM: mvebu: set CONFIG_SYS_MALLOC_F_LEN to 0x2000Chris Packham
Set CONFIG_SYS_MALLOC_F_LEN to match the rest of the mvebu boards. The default of 0x400 is not enough when booting from SPI. Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
2019-03-19mv_ddr: ddr3: only use active chip-selects when tuning ODTChris Packham
Inactive chip-selects will give invalid values for read_sample so don't consider them when trying to determine the overall min/max read sample. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> [https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell/pull/18] Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
2019-03-19mv_ddr: ddr3: fix tRAS timimg parameterChris Packham
Based on the JEDEC standard JESD79-3F. The tRAS timings should include the highest speed bins at a given frequency. This is similar to commit 683c67b ("mv_ddr: ddr3: fix tfaw timimg parameter") where the wrong comparison was used in the initial implementation. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> [https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell/pull/15] Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
2019-03-19ARM: kirkwood: add spi0 alias for dreamplugChris Packham
The conversion to DM_SPI managed to break accessing the environment on dreamplug. This is because the environment code relies on being to able to select the SPI device based on the sequence number. Add an alias so that the spi0 bus gets sequence number 0. Reported-by: Leigh Brown <leigh@solinno.co.uk> Signed-off-by: Chris Packham <judge.packham@gmail.com> Tested-by: Leigh Brown <leigh@solinno.co.uk> Signed-off-by: Stefan Roese <sr@denx.de>
2019-03-19MAINTAINERS: Update u-boot-marvell entryStefan Roese
This patch does the following changes to the u-boot-marvell maintainers entry: - Add Armada-7k/8k to the list - Remove Prafulla and Luka since they have been silent on the list for a long time. Please speak up, if you would like to continue or better start maintaining. - Add multiple Marvell / MVEBU related driver directories and files Signed-off-by: Stefan Roese <sr@denx.de> Cc: Prafulla Wadaskar <prafulla@marvell.com> Cc: Luka Perkov <luka.perkov@sartura.hr> Cc: Tom Rini <trini@konsulko.com> Acked-by: Luka Perkov <luka.perkov@sartura.hr> Signed-off-by: Stefan Roese <sr@denx.de>
2019-03-19configs/clearfog_gt_8k: add network interface supportBaruch Siach
Enable the mvpp2 network driver for the Armada 8K SoC. Enable the Marvell PHY driver for the on-board 1512 PHY. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
2019-03-19pci: pci_mvebu: Add comment about missing of_n_addr_cells() callStefan Roese
This patch adds a comment to explain the use of the hardcoded value for the number of address cells in mvebu_get_tgt_attr(). This should help to rework this function, once CONFIG_OF_LIVE is enabled for MVEBU in general. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
2019-03-18Prepare v2019.04-rc4Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-03-16arm: socfpga: make SPL_TEXT_BASE overridableSimon Goldschmidt
To boot from fpga on socfpga gen5, we need to set CONFIG_SPL_TEXT_BASE to 0xC0000000 (hps2fpgaslaves base address). Since converting CONFIG_SPL_TEXT_BASE to Kconfig hasn't been successful so far, let's make this value overridable in socfpga_common.h, so that we can have different board configs override this in socfpga_common.h. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2019-03-16ARM: dts: socfpga: Add missing altr,sysmgr-syscon for EMACLey Foon Tan
Syscon register is required in dts to select correct PHY interface. Fix error below: Net: Failed to get syscon: -2 Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
2019-03-16fastboot: common: fix default fastboot_boot on 64-bitNeil Armstrong
When booting on a 64-bit system, the boot_addr_start buffer is not large enough to contain a 64-bit number, thus leading to a crash even if fastboot_buf_addr is valid, only the high part of the address will be printed to boot_addr_start : fastboot with fastboot_buf_addr = 0x0000000006000000: downloading of 92239872 bytes finished Booting kernel at 0x00000000... "Synchronous Abort" handler, esr 0x96000004 elr: 00000000010561f4 lr : 0000000001056fac (reloc) <snip> x28: 000000007df2d38f x29: 000000007df2d1b0 Resetting CPU ... With this fix, boot_addr_start can have the full 64-bit address passed to bootm. Fixes: f73a7df984a9 ("net: fastboot: Merge AOSP UDP fastboot") Cc: Simon Glass <sjg@chromium.org> Cc: Alex Kiernan <alex.kiernan@gmail.com> Cc: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-03-16usb: udc-uclass: Fixed problem when no alias is defined in DTJean-Jacques Hiblot
commit 801f1fa442 "dm: usb: udc: Use SEQ_ALIAS to index the USB gadget ports" changed the way the udevice if found. It uses the alias to find a udevice for a given USB port number. In the commit log it was stated that if no alias is provided, the bind order will be used instead. However it doesn't work. Fixing this by adding a call to uclass_get_device() if uclass_get_device_by_seq() fails. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Tested-by: Vignesh R <vigneshr@ti.com>