summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-11-03ARM: imx: Convert mccmon6 to use fitImage instead of uImage+DTBLukasz Majewski
This commit enabled support for fitImage on mccmon6 when we switch to DT/DTS (including falcon mode). Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-11-03spl: nor: Provide falcon boot support for NOR memoriesLukasz Majewski
This commit adds falcon boot support (by also copying args necessary for booting) to the SPL NOR memory driver. After this change it is possible to use the falcon boot in the same way as on NAND memories. The necessary configs (i.e. CONFIG_CMD_SPL_NOR_OFS) are now defined in Kconfig. Signed-off-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-11-03ARM: imx: Decouple mccmon6's SPL and u-boot proper codeLukasz Majewski
The mccmon6 has been used a "mixed" approach between SPL and U-Boot proper sources. This commit decoupes SPL and u-boot proper, which allows clear distinction between those two code bases and facilitates conversion to DM/DTS on this particular board. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-11-03ARM: imx: Convert mccmon6 to use DM/DTS in the u-boot properLukasz Majewski
This commit converts mccmon6's u-boot proper (in a single commit to avoid build breaks) to use solely DM/DTS. The DTS description of the mccmon6 has been ported from Linux kernel (v4.20, SHA1: 8fe28cb58bcb235034b64cbbb7550a8a43fd88be) Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-11-03imx: Enable RTC (ds1307) support in the U-Boot proper on TPC70 boardLukasz Majewski
The TPC70 is equipped with DS1307 RTC device. Add code to enable support for it. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-11-03ARM: imx6: DHCOM i.MX6 PDK: spl: Add eMMC initialization to SPL codeClaudius Heine
In order for 'bmode emmc' to work, the eMMC needs to be initialized in the SPL. This change initializes the eMMC as BOOT_DEVICE_MMC1 (index=0). Signed-off-by: Claudius Heine <ch@denx.de>
2019-11-03ARM: imx6: DHCOM i.MX6 PDK: defconfig: Enable MMC support of SPLClaudius Heine
Signed-off-by: Claudius Heine <ch@denx.de>
2019-11-03ARM: imx6: DHCOM i.MX6 PDK: fix board_boot_modes emmc entryClaudius Heine
The board_boot_modes contained the wrong values for the emmc entry. The eMMC here is connected over a 8-bit bus. This change allows to use the 'bmode emmc' command to boot from emmc. Signed-off-by: Claudius Heine <ch@denx.de>
2019-11-03watchdog: imx: Use immediate reset bits for expire_nowRobert Hancock
The expire_now function was previously setting the watchdog timeout to minimum and waiting for the watchdog to expire. However, this watchdog also has bits to trigger immediate reset. Use those instead, like the Linux imx2_wdt driver does. Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
2019-11-03watchdog: imx: Add DT ext-reset handlingRobert Hancock
The Linux imx2_wdt driver uses a fsl,ext-reset-output boolean in the device tree to specify whether the board design should use the external reset instead of the internal reset. Use this boolean to determine which mode to use rather than using external reset unconditionally. For the legacy non-DM mode, the external reset is always used in order to maintain the previous behavior. Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
2019-11-03ARM: dts: imx6ull-colibri: pre-reloc for uart pinmux modesIgor Opaniuk
Add u-boot,dm-pre-reloc properties for uart pinmux configuration nodes, which enables UART as early as possible (before relocation). Without this we miss almost the half of output (U-boot version, CPU defails, Reset cause, DRAM details etc.). Fixes: cd69e8ef9b ("colibri-imx6ull: migrate pinctrl and regulators to dtb/dm") Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-11-03ARM: dts: imx6ull-colibri: change hierarchy of DTS filesIgor Opaniuk
Introduce imx6ull-colibri-u-boot.dtsi for u-boot specific properties to keep original imx6ull-colibri.dts in sync with Linux. Move all contents of imx6ull-colibri.dts to imx6ull-colibri.dtsi + additionally fix checkpatch warnings. Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-11-03arm: mxs: Increase VDDD voltage to match specificationMarek Vasut
According to IMX28CEC rev. 4, 10/2018, Table 15. Recommended Operating Conditions, page 16, the VDDD should be set to 1.55V when the CPU is operating at 454MHz. This is the case in U-Boot, hence increase the VDDD voltage. This fixes instability when performing TFTP transfers. Increase the brownout threshold to 1.4V. The documentation recommends 1.45V setting for the brownout, however, this triggers failure during power block init, so keep the brownout slightly lower. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2019-11-03ARM: imx: Use IMX6_SRC_GPR10_BMODE instead of magic numberClaudius Heine
Signed-off-by: Claudius Heine <ch@denx.de>
2019-11-03ARM: imx: Fix bmode detection from grp10Claudius Heine
imx6_is_bmode_from_gpr9 always returns false, because IMX6_SRC_GPR10_BMODE is 1<<28 and gets casted to u8 on return. This moves the function body into imx6_src_get_boot_mode, since that is the only one using it and it is on the same abstraction level (accessing registers directly). Signed-off-by: Claudius Heine <ch@denx.de>
2019-11-03arm: dts: Add devicetree support for iMXQXP AI_ML boardManivannan Sadhasivam
Add devicetree support for iMXQXP AI_ML board from Einfochips. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
2019-11-03i.MX6: nand: extend nandbcb command for imx6UL(L)Parthiban Nallathambi
Firmware Configuration Block(FCB) for imx6ul(l) needs to be BCH encoded. Signed-off-by: Parthiban Nallathambi <pn@denx.de> Acked-by: Shyam Saini <shyam.saini@amarulasolutions.com> Acked-by: Peng Fan <peng.fan@nxp.com>
2019-11-03imx: defconfig: Enable CONFIG_SPL_FORCE_MMC_BOOT on display5Lukasz Majewski
After the following commit: commit 772b55723bcb ("imx: Introduce CONFIG_SPL_FORCE_MMC_BOOT to force MMC boot on falcon mode") it is possible to set the CONFIG_SPL_FORCE_MMC_BOOT flag, which allows using MMC device as boot device regardless of the device used by Boot ROM (FBL) as the first boot medium. Display5 board needs this flag set to allow falcon boot from eMMC device. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-11-03mx6: clock: Introduce disable_ipu_clock()Fabio Estevam
Introduce disable_ipu_clock(). This is done in preparation for configuring the NoC registers on i.MX6QP in SPL. Afer the NoC registers are set the IPU clocks can be disabled. Signed-off-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-11-03mx6: clock: Use setbits_le32()Fabio Estevam
The code can be made simpler by using setbits_le32(), so switch to it. Signed-off-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-11-01azure: Update the script to prepend PATH not override PATHTom Rini
Similar to 90d3d78a1c68 ("gitlab-ci: Prepend to PATH rather than replace it") we need to prepend the PATH with our additional binaries and not replace the value fully as doing so breaks virtualenv. Signed-off-by: Tom Rini <trini@konsulko.com>
2019-11-01Merge tag 'efi-2020-01-rc2' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2020-01-rc2 Provide a better user interface for setting UEFI variables. Bug fixes: - ext4 file system not discovered on UEFI block device - 'make tests' build error on 32bit systems
2019-11-01Merge tag 'video-for-2020.01-rc1' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-video - fix splash build breakage with newer llvm-7
2019-11-01Merge tag 'dm-pull-29oct19' of git://git.denx.de/u-boot-dmTom Rini
- Fix for patman with email addresses containing commas - Bootstage improvements for TPL, SPL - Various sandbox and dm improvements and fixes
2019-11-01Merge branch '2019-10-30-master-imports'Tom Rini
- Migrate test.py to use python3 and current pytest. - NVMe bugfixes - Assorted other fixes - Android AVB updates.
2019-10-31azure: Update for python3 and current pytestTom Rini
Similar to the rework for GitLab-CI and Travis-CI, rework the Azure Pipeline to use python3 and requirements.txt to install the necessary modules. Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-31cmd: avb: Support A/B slotsSam Protsenko
Add optional parameter to 'avb verify' sub-command, so that user is able to specify which slot to use, in case when user's partitions are slotted. If that parameter is omitted, the behavior of 'avb verify' will be the same as before, so user API is content. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com> Acked-by: Igor Opaniuk <igor.opaniuk@gmail.com>
2019-10-31cmd: avb: Fix requested partitions listSam Protsenko
The requested_partitions[] array should contain only boot partitions. Usually it's only 'boot' partition, as can be seen in [1]. Also, seems like the requested_partitions[] are only used when there is no 'vbmeta' partition [2], which is not a regular use-case. Make requested_partitions[] contain only 'boot' partition as it was supposed to be, and also make that array to be a local in do_avb_verify_part() function, as nobody else needs that. [1] https://android.googlesource.com/platform/external/avb/+/5fbb42a189aa/test/avb_slot_verify_unittest.cc#108 [2] https://android.googlesource.com/platform/external/avb/+/5fbb42a189aa/libavb/avb_slot_verify.c#1461 Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
2019-10-31libavb: Fix build warnings after updating the libSam Protsenko
After updating libavb to most recent version from AOSP/master, two new warnings appear: Warning #1: lib/libavb/avb_cmdline.c: In function 'avb_append_options': lib/libavb/avb_cmdline.c:365:15: warning: 'dm_verity_mode' may be used uninitialized in this function [-Wmaybe-uninitialized] new_ret = avb_replace( ^~~~~~~~~~~~ slot_data->cmdline, "$(ANDROID_VERITY_MODE)", dm_verity_mode); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/libavb/avb_cmdline.c:374:8: warning: 'verity_mode' may be used uninitialized in this function [-Wmaybe-uninitialized] if (!cmdline_append_option( ^~~~~~~~~~~~~~~~~~~~~~ slot_data, "androidboot.veritymode", verity_mode)) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Warning #2: lib/libavb/avb_slot_verify.c: In function 'avb_slot_verify': lib/libavb/avb_slot_verify.c:1349:23: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] AvbSlotVerifyResult ret; ^~~ Fix those by providing default return values to affected functions. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2019-10-31libavb: Update libavb to current AOSP masterSam Protsenko
Update libavb to commit 5fbb42a189aa in AOSP/master, because new version has support for super partition [1], which we need for implementing Android dynamic partitions. All changes from previous patches for libavb in U-Boot are accounted for in this commit: - commit ecc6f6bea6a2 ("libavb: Handle wrong hashtree_error_mode in avb_append_options()") - commit 897a1d947e7e ("libavb: Update SPDX tag style") - commit d8f9d2af96b3 ("avb2.0: add Android Verified Boot 2.0 library") Tested on X15: ## Android Verified Boot 2.0 version 1.1.0 read_is_device_unlocked not supported yet read_rollback_index not supported yet read_is_device_unlocked not supported yet Verification passed successfully AVB verification OK. Unit test passes: $ ./test/py/test.py --bd sandbox --build -k test_avb test/py/tests/test_android/test_avb.py ss..s. [1] https://android.googlesource.com/platform/external/avb/+/49936b4c0109411fdd38bd4ba3a32a01c40439a9 Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Eugeniu Rosca <rosca.eugeniu@gmail.com> Acked-by: Igor Opaniuk <igor.opaniuk@gmail.com>
2019-10-31mkimage: Set correct FDT type and ramdisk architecture in FIT auto modeMichal Sojka
When running the following command mkimage -f auto -A arm -O linux -T kernel -C none -a 0x8000 -e 0x8000 \ -d zImage -b zynq-microzed.dtb -i initramfs.cpio image.ub the type of fdt subimage is the same as of the main kernel image and the architecture of the initramfs image is not set. Such an image is refused by U-Boot when booting. This commits sets the mentioned attributes, allowing to use the "-f auto" mode in this case instead of writing full .its file. Following is the diff of mkimage output without and with this commit: FIT description: Kernel Image image with one or more FDT blobs Created: Thu Sep 12 23:23:16 2019 Image 0 (kernel-1) Description: Created: Thu Sep 12 23:23:16 2019 Type: Kernel Image Compression: uncompressed Data Size: 4192744 Bytes = 4094.48 KiB = 4.00 MiB Architecture: ARM OS: Linux Load Address: 0x00008000 Entry Point: 0x00008000 Image 1 (fdt-1) Description: zynq-microzed Created: Thu Sep 12 23:23:16 2019 - Type: Kernel Image + Type: Flat Device Tree Compression: uncompressed Data Size: 9398 Bytes = 9.18 KiB = 0.01 MiB Architecture: ARM - OS: Unknown OS - Load Address: unavailable - Entry Point: unavailable Image 2 (ramdisk-1) Description: unavailable Created: Thu Sep 12 23:23:16 2019 Type: RAMDisk Image Compression: Unknown Compression Data Size: 760672 Bytes = 742.84 KiB = 0.73 MiB - Architecture: Unknown Architecture + Architecture: ARM OS: Linux Load Address: unavailable Entry Point: unavailable Default Configuration: 'conf-1' Configuration 0 (conf-1) Description: zynq-microzed Kernel: kernel-1 Init Ramdisk: ramdisk-1 FDT: fdt-1 Loadables: kernel-1 Signed-off-by: Michal Sojka <michal.sojka@cvut.cz>
2019-10-31drivers: phy: Handle gracefully NULL pointersJean-Jacques Hiblot
For some controllers PHYs can be optional. Handling NULL pointers without crashing nor failing, makes it easy to handle optional PHYs. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2019-10-31linux_compat: fix potential NULL pointer accessMarek Szyprowski
malloc_cache_aligned() might return zero, so fix potential NULL pointer access if __GFP_ZERO flag is set. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Ralph Siemsen <ralph.siemsen@linaro.org>
2019-10-31tiny-printf: Support vsnprintf()Simon South
Add a simple implementation of this function, to allow logging to be enabled in the SPL or TPL for systems that rely on the tiny printf() implementation. To keep the code size small, - The function is built only when logging is enabled, as it (currently) is not needed otherwise; and - Like the existing implementation of snprintf(), its buffer-size parameter is ignored. Signed-off-by: Simon South <simon@simonsouth.net>
2019-10-31common: Kconfig: Fix typo in TPL_LOG_CONSOLE descriptionSimon South
Signed-off-by: Simon South <simon@simonsouth.net>
2019-10-31lib: errno: avoid error format-overflowHeinrich Schuchardt
In cmd/regulator.c an error occurs with GCC 9.2.1 if CONFIG_ERRNO_STR is not defined: cmd/regulator.c: In function ‘failure’: cmd/regulator.c:20:2: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 20 | printf("Error: %d (%s)\n", ret, errno_str(ret)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function ‘constraint’, inlined from ‘constraint’ at cmd/regulator.c:111:12: cmd/regulator.c:115:3: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 115 | printf(" %s (err: %d)\n", errno_str(val), val); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ errno_str() should return a valid string instead of NULL if CONFIG_ERRNO_STR is not defined. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-10-31lib: errno: sync error codesHeinrich Schuchardt
Macro ERRNO_MSG() ignores the error number but we should still use the same constants as in include/linux/errno.h. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-10-31dts: fix MULTI_DTB_FIT compression choice promptBaruch Siach
This choice is not about SPL for which we have a separate choice. Fixes: 95f4bbd581 ("lib: fdt: Allow LZO and GZIP DT compression in U-Boot") Cc: Marek Vasut <marek.vasut+renesas@gmail.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2019-10-31ata: ahci allow 64-bit DMA for SATARoman Kapl
Allow 64-bit DMA on AHCI. If not supported by the host controller, at least print a message and fail. Signed-off-by: Roman Kapl <rka@sysgo.com>
2019-10-31disk: part_dos: correctly detect DOS PBRHeinrich Schuchardt
The signature 0x55 0xAA in bytes 510 and 511 of the first sector can either indicate a DOS partition table of the first sector of a FAT file system. The current code tries to check if the partition table is valid by looking at the boot indicator of the partition entries. But first of all it does not count from 0 to 3 but only from 0 to 2. And second it misses to increment the pointer for the partition entry. If it is a FAT file system can be discovered by looking for the text 'FAT' at offset 0x36 or 'FAT32' at offset 0x52. In a DOS PBR there are no partition entries, so those bytes are undefined. Don't require the byte at offset 0x1BE to differ from 0x00 and 0x80. With the patch the logic is changed as follows: If the partition table has either an invalid boot flag for any partition or has no partition at all, check if the first sector is a DOS PBR by looking at the FAT* signature. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-10-31test: provide test for errno_str()Heinrich Schuchardt
Provide a unit test for errno_str(). Test that known and unknown error numbers are handled correctly. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-10-31lib: errno: check for unsupported error numberHeinrich Schuchardt
If errno_str() is called with an unsupported error number, do not return a random pointer but a reasonable text. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-10-31lib: time: Add microsecond timerMarek Vasut
Add get_timer_us(), which is useful e.g. when we need higher precision timestamps. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> [trini: Fixup arch/arm/mach-bcm283x/include/mach/timer.h] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-31NVMe: do PCI enumerate before nvme scanPatrick Wildt
Make sure that the PCI busses are enumerated before trying to find a NVMe device. Signed-off-by: Patrick Wildt <patrick@blueri.se> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-31nvme: use page-aligned buffer for identify commandPatrick Wildt
Change the stack-allocated buffer for the identification command to explicitly allocate page-aligned buffers. Even though the spec seems to allow having admin queue commands on non page-aligned buffers, it seems to not be possible on my i.MX8MQ board with a a Silicon Power P34A80. Since all of the NVMe drivers I have seen always do admin commands on a page-aligned buffer, which does work on my system, it makes sense for us to do that as well. Signed-off-by: Patrick Wildt <patrick@blueri.se> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-31nvme: flush dcache on both r/w, and the prp listPatrick Wildt
It's possible that the data cache for the buffer still holds data to be flushed to memory, since the buffer was probably used as stack before. Thus we need to make sure to flush it also on reads, since it's possible that the cache is automatically flused to memory after the NVMe DMA transfer happened, thus overwriting the NVMe transfer's data. Also add a missing dcache flush for the prp list. Signed-off-by: Patrick Wildt <patrick@blueri.se> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-31virtio: pci: use correct type in virtio_pci_bind()Heinrich Schuchardt
For printing as %u we should use an unsigned int. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-31checkpatch.pl: update from Linux kernel v5.4-rc3Heinrich Schuchardt
Update from upstream. Just minor changes like checking that the author has also done a sign-off. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-10-31splash: fix build breakage with newer llvm-7Anatolij Gustschin
Some configurations (i.e. sandbox) result in unused splash_display_banner() and we get build errors like: common/splash.c:148:20: error: unused function 'splash_display_banner' [-Werror,-Wunused-function] static inline void splash_display_banner(void) { } Drop empty inline function and add guards around the call. Fixes: d2a8271c8851 ("splash: fix splash banner output") Signed-off-by: Anatolij Gustschin <agust@denx.de> Reported-by: Tom Rini <trini@konsulko.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-10-30dts: Kconfig: Fix help for SPL_OF_CONTROLWalter Lozano
As initially this feature was implemented as a negative CONFIG and later it was redesigned to be positive the help text should be updated to reflect this change. This commit updates the help text to match the current implementation. Signed-off-by: Walter Lozano <wlozano@collabora.com> Reviewed-by: Simon Glass <sjg@chromium.org>