summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-12-27spl: lib: Allow for decompression in any SPL buildSimon Glass
Add Kconfig symbols and update the Makefile rules so that decompression can be used in TPL and VPL Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27spl: Add some more debugging to load_simple_fit()Simon Glass
Add debugging of image-loading progress. Fix a stale comment in the function comment while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27spl: Drop a duplicate variable in boot_from_devices()Simon Glass
The variable 'ret' is defined twice, which is not intended. This may have been a local merge error. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 2eefeb6d893 ("spl: Report a loader failure")
2024-12-27spl: Drop use of uintptr_tSimon Glass
U-Boot uses ulong for addresses. It is confusing to use uintptr_t in a few places, since it makes people wonder if the types are compatible. Change the few occurences in SPL to use ulong Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27spl: Support a relocated stack in any XPL phaseSimon Glass
The current check looks only at SPL, but TPL or VPL might have a different setting. Update the condition. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27spl: Allow serial to be disabled in any XPL phaseSimon Glass
The current check looks only at SPL, but TPL or VPL might have a different setting. Update the condition. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27spl: Report a loader failureSimon Glass
If a loader returns an error code it is silently ignored. Show a message to at least provide some feedback to the user. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27Support setting a maximum size for the VPL imageSimon Glass
Add a size limit for VPL, to match those for SPL and TPL Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27malloc: Provide a simple malloc for VPLSimon Glass
The VPL phase may want to use the smaller malloc() implementation, so add an option for this. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27malloc: Show amount of used space when memory runs outSimon Glass
Show a bit more information when malloc() space is exhausted and debugging is enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27boot: Respect the load_op in fit_image_load()Simon Glass
Some code has crept in which ignores this parameter. Fix this and add a little debugging. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: b1307f884a9 ("fit: Support compression for non-kernel components (e.g. FDT)")
2024-12-27bootstd: Avoid sprintf() in SPL when creating bootdevsSimon Glass
The name of the bootdev device is not that important, particular in SPL. Save a little code space by using a simpler name. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27boot: Allow FIT to fall back from best-match optionSimon Glass
When the best-match feature fails to find something, use the provided config name as a fallback. The allows SPL to select a suitable config when best-match is enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27image: Add a prototype for fit_image_get_phase()Simon Glass
This function exists but is not exported. Add a prototype so it can be used elsewhere. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-27spl: mmc: Avoid size growth in spl_mmc_find_device() debugSimon Glass
The for() loop ends up being in the code even if the log_debug() does nothing. Add a condition to fix this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2024-12-18powerpc: Support using upstream devicetreesJ. Neuschäfer
For new PowerPC developments, it will be useful to borrow devicetrees from Linux. This patch makes it possible. Signed-off-by: J. Neuschäfer <j.ne@posteo.net> Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
2024-12-18phy: don't spam console if phys property is absent in device nodeRoger Quadros
In generic_phy_get_bulk(), if 'phys' property is absent in the device node then it is not an error condition. Change print message verbosity to debug to avoid spamming console in such cases. Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
2024-12-18verdin-am62: fix FASTBOOT_BUF_ADDR and FASTBOOT_BUF_SIZEHiago De Franco
The current value of CONFIG_FASTBOOT_BUF_ADDR is incorrect for hardware with 512MB and 1GB of RAM. The RAM address ranges for these devices are: - 512MB: - Start: 0x80000000 - End: 0xA0000000 - 1GB: - Start: 0x80000000 - End: 0xC0000000 The current buffer address makes fastboot downloads work only on hardware with 2GB of RAM. To fix this issue: 1. Lower CONFIG_FASTBOOT_BUF_ADDR to 0x88200000. This makes the buffer to be equal ot CONFIG_SYS_LOAD_ADDR, which is a safe address to download files using fastboot. 2. Reduce the size of the download buffer to 128MB, avoiding overlaps with RAMDISK_ADDR_R. This is a good enough value for individual downloads. These changes make fastboot downloads work with 512MB and 1GB devices. Fixes: defe30a78b76 ("verdin-am62: add DFU, USB and UUU fastboot support") Signed-off-by: Hiago De Franco <hiago.franco@toradex.com> Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2024-12-18arch: x86: lib: Add support of legacy 64-bit entry point at 0x200Paul HENRYS
Support of legacy 64-bit entry point was already present when booting a bzimage with 'zboot' but not supported with 'bootm' when the x86_64 Linux kernel is embedded in a FIT image. Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-12-18Merge patch series "sandbox: repair compile and run-time for OF_EMBED case"Tom Rini
Evgeny Bachinin <EABachinin@salutedevices.com> says: This patch-set repairs ability to use sandbox with CONFIG_OF_EMBED=y. For now, to use OF_EMBED, the following must be done 1) sandbox64_defconfig should have: ``` -CONFIG_OF_LIVE=y +CONFIG_OF_EMBED=y ``` 2) On sandbox when CONFIG_OF_EMBED=y, the u-boot process can't start due to: ``` Bloblist at b000 not found (err=-2) initcall failed at call 000000000011829c (err=-2: No such file or \ directory) ### ERROR ### Please RESET the board ### ``` So, it is natural desire to disable CONFIG_BLOBLIST just to test sandbox with OF_EMBED=y (disable it one way or another): ``` config SANDBOX - select BLOBLIST + select BLOBLIST if SOME_NON_EXISTING_OPTION ``` 3) As a result, having such changes (CONFIG_OF_EMBED=y && CONFIG_BLOBLIST=n) leads to the link & run-time errors, being fixed by this patch series. Link: https://lore.kernel.org/r/20241202-sandbox_repair_of_embed-v1-0-05aff4b0ccf7@salutedevices.com [trini: The final patch is dropped as no longer relevant with Simon's rework to that function which is now applied.]
2024-12-18Merge patch series "fdt: Correct condition for receiving bloblist"Tom Rini
This series is from Simon Glass <sjg@chromium.org>. It first corrects the test for checking if a bloblist could have come from TPL and so we check for a device tree, and then changes the argument order for board_fdt_blob_setup() to be more inline with our usual argument ordering. Link: https://lore.kernel.org/r/20241102174944.412088-1-sjg@chromium.org
2024-12-18test: sandbox: fix link error with do_ut_bootm if BLOBLIST=nEvgeny Bachinin
Having CONFIG_OF_EMBED=y && CONFIG_BLOBLIST=n leads to the link error: ``` ld: /tmp/ccwtRVty.ltrans28.ltrans.o:(.data.rel+0x4e8): undefined \ reference to `do_ut_bootm' ``` Fixes: fe158657a5b ("test: inconsistent bootm tests") Signed-off-by: Evgeny Bachinin <EABachinin@salutedevices.com>
2024-12-18test: sandbox: fix link error with do_ut_bloblist if BLOBLIST=nEvgeny Bachinin
Having CONFIG_OF_EMBED=y && CONFIG_BLOBLIST=n leads to the link error: ``` ld: /tmp/ccwtRVty.ltrans28.ltrans.o:(.data.rel+0x4b0): undefined \ reference to `do_ut_bloblist' ``` Fixes: 6ea5df39e8d ("test: Only enable bloblist test when supported") Signed-off-by: Evgeny Bachinin <EABachinin@salutedevices.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-12-18test: sandbox: fix invalid_use_of_IF_ENABLED_INT if BLOBLIST=nEvgeny Bachinin
Having CONFIG_OF_EMBED=y && CONFIG_BLOBLIST=n leads to the link error: ``` ld: /tmp/ccRVty.ltrans40.ltrans.o: in function `lib_test_is_enabled': test/lib/kconfig.c:24: undefined reference to \ `invalid_use_of_IF_ENABLED_INT' ld: test/lib/kconfig.c:26: undefined reference to \ `invalid_use_of_CONFIG_IF_ENABLED_INT' ``` Fixes: 29784d62ede ("test: Add some tests for kconfig.h") Signed-off-by: Evgeny Bachinin <EABachinin@salutedevices.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-12-18sandbox: fix bloblist_finish() linker error if BLOBLIST=nEvgeny Bachinin
Having CONFIG_OF_EMBED=y && CONFIG_BLOBLIST=n leads to the link error: ``` ld: /tmp/ccwtRVty.ltrans0.ltrans.o: in function `state_uninit': arch/sandbox/cpu/state.c:508: undefined reference to `bloblist_finish' ``` Fixes: 1c52fcca72b ("sandbox: Write out bloblist when exiting") Signed-off-by: Evgeny Bachinin <EABachinin@salutedevices.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-12-18fdt: Swap the signature for board_fdt_blob_setup()Simon Glass
This returns a devicetree and updates a parameter with an error code. Swap it, since this fits better with the way U-Boot normally works. It also (more easily) allows leaving the existing pointer unchanged. No yaks were harmed in this change, but there is a very small code-size reduction. For sifive, the OF_BOARD option must be set for the function to be called, so there is no point in checking it again. Also OF_SEPARATE is defined always. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Matthias Brugger <mbrugger@suse.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> [trini: Update total_compute] Signed-off-by: Tom Rini <trini@konsulko.com>
2024-12-18fdt: Correct condition for receiving bloblistSimon Glass
The condition for receiving a bloblist from TPL is reversed. This was only noticed are the other fixes landed. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Matthias Brugger <mbrugger@suse.com>
2024-12-18Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-riscv ↵Tom Rini
into next CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/23926 - Board: Support LicheeRV Nano - Board: Support bananapi-f3 - Board: Switch to OF_UPSTREAM for StarFive JH7110 - Board: Add sdhci driver for TH1520 SoC
2024-12-18riscv: spl: add FIT name for RISC-V Falcon modeRandolph
The FIT name in RISC-V Falcon mode should be different from that in normal boot mode; it is called linux.itb. If the setting is missing in common/spl, the normal boot file name will be used. Signed-off-by: Randolph <randolph@andestech.com>
2024-12-18doc: spacemit: bananapi_f3: document Banana Pi F3 boardKongyang Liu
Add document for Banana Pi F3 board which based on SpacemiT's K1 SoC. Signed-off-by: Kongyang Liu <seashell11234455@gmail.com> Signed-off-by: Huan Zhou <pericycle.cc@gmail.com> Tested-by: Marcel Ziswiler <marcel@ziswiler.com> Reviewed-by: Yixun Lan <dlan@gentoo.org>
2024-12-18riscv: spacemit: bananapi_f3: initial support addedKongyang Liu
Add basic support for SpacemiT's Banana Pi F3 board. Update the k1.dtsi align with mainline. Note that the device tree files follow the mainline Linux source[1]. Links: https://patches.linaro.org/project/linux-serial/patch/20240730-k1-01-basic-dt-v5-8-98263aae83be@gentoo.org/ [1] Signed-off-by: Kongyang Liu <seashell11234455@gmail.com> Signed-off-by: Huan Zhou <pericycle.cc@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com> Reviewed-by: Yixun Lan <dlan@gentoo.org> Tested-by: Marcel Ziswiler <marcel@ziswiler.com>
2024-12-18configs: th1520_lpi4a: enable mmc controller supportMaksim Kiselev
Enable driver for DesignWare MSHC. TH1520 supports all speed modes up to HS400ES and UHS SDR105. Also enable ADMA and mmc command. Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
2024-12-18riscv: dts: t-head: Add sdhci and emmc nodesMaksim Kiselev
Add SDHCI and EMMC controlles nodes on TH-1520 SoC. And enable them for Lichee module 4A. Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
2024-12-18mmc: snps_sdhci: Add sdhci driver support for TH1520 SoCMaksim Kiselev
Add support for DesignWare SDHCI host controller on Alibaba TH1520 SoC Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com> Tested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-12-18riscv: cpu: jh7110: Sort the list of imply statementsHal Feng
The imply statements should be sorted in the sequence of appearance in .config. Tested-by: Anand Moon <linux.amoon@gmail.com> Tested-by: E Shattow <lucent@gmail.com> Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2024-12-18board: starfive: spl: Support multiple DTBs for JH7110 based boardsHal Feng
Get product ID and the other information from EEPROM, use them to select the correct DTB. Tested-by: Anand Moon <linux.amoon@gmail.com> Tested-by: E Shattow <lucent@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2024-12-18board: starfive: spl: Fix the wrong use of CONFIG_IS_ENABLED()Hal Feng
The prefix "SPL_" is not needed when using CONFIG_IS_ENABLED(). Tested-by: Anand Moon <linux.amoon@gmail.com> Tested-by: E Shattow <lucent@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Fixes: 5ecf9b0b8a75 ("board: starfive: add StarFive VisionFive v2 board support") Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2024-12-18riscv: dts: jh7110: Support multiple DTBs in a Fit imageHal Feng
Support multiple DTBs for JH7110 based boards, so they can select the correct DT at runtime. Tested-by: Anand Moon <linux.amoon@gmail.com> Tested-by: E Shattow <lucent@gmail.com> Reviewed-by: E Shattow <lucent@gmail.com> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2024-12-18configs: visionfive2: Enable MULTI_DTB_FIT for JH7110 based board DTHal Feng
So JH7110 based boards can select their own DT at runtime. Tested-by: Anand Moon <linux.amoon@gmail.com> Tested-by: E Shattow <lucent@gmail.com> Reviewed-by: E Shattow <lucent@gmail.com> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2024-12-18board: starfive: spl: Drop the unneeded DT modification codeHal Feng
As OF_UPSTREAM is implemented, these code are redundant. Tested-by: Anand Moon <linux.amoon@gmail.com> Tested-by: E Shattow <lucent@gmail.com> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2024-12-18riscv: dts: jh7110: Add u-boot device tree for JH7110 based boardsHal Feng
To support the other JH7110 based boards, add u-boot device tree for them. Tested-by: Anand Moon <linux.amoon@gmail.com> Tested-by: E Shattow <lucent@gmail.com> Reviewed-by: E Shattow <lucent@gmail.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: H Bell <dmoo_dv@protonmail.com> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2024-12-18riscv: dts: jh7110: Move common code to the new jh7110-common-u-boot.dtsiHal Feng
To support JH7110 based boards besides v1.3B, add a common dtsi and add common code to it. Tested-by: Anand Moon <linux.amoon@gmail.com> Tested-by: E Shattow <lucent@gmail.com> Reviewed-by: E Shattow <lucent@gmail.com> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2024-12-18pcie: starfive: Make the driver compatible with upstream DTHal Feng
There are difference between upstream DT and the old DT in terms of reg base, reset gpio and syscon. Make the driver compatible with upstream DT. Tested-by: Anand Moon <linux.amoon@gmail.com> Tested-by: E Shattow <lucent@gmail.com> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2024-12-18mmc: dw_mmc: Add "starfive, jh7110-mmc" compatible to match upstream DTHal Feng
Make the U-Boot JH7110 MMC driver compatible with upstream DT. Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2024-12-18riscv: dts: jh7110: Make u-boot device trees adapting to upstream DTHal Feng
Add u-boot features to the U-Boot device tree. Tested-by: Anand Moon <linux.amoon@gmail.com> Tested-by: E Shattow <lucent@gmail.com> Reviewed-by: E Shattow <lucent@gmail.com> Acked-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2024-12-18dts: starfive: Switch to using upstream DTHal Feng
Enable OF_UPSTREAM to use upstream DT and add starfive/ prefix to the DEFAULT_DEVICE_TREE. Rename jh7110-starfive-visionfive-2-u-boot.dtsi to jh7110-starfive-visionfive-2-v1.3b-u-boot.dtsi and set the v1.3b device tree as the default device tree. Drop redundant DT files from arch/riscv/dts/ and redundant clock and reset definitions from include/dt-bindings/. Since the old clock definitions is a little different from those in upstream Linux, update the clock definitions in clock drivers accordingly. Tested-by: Anand Moon <linux.amoon@gmail.com> Tested-by: E Shattow <lucent@gmail.com> Acked-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2024-12-18board: add support for LicheeRV NanoThomas Bonnefille
The LicheeRV Nano is a small SBC using the Sophgo SG2002 RISCV SoC. Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
2024-12-18riscv: dts: sophgo: add device tree for LicheeRV NanoThomas Bonnefille
Import a slightly modified version of the LicheeRV Nano and SG2002 device trees from the Linux Kernel. The current supported IPs are UART, MMC, Timer, PLIC and CLINT. Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
2024-12-18doc: add LicheeRV Nano and SG2002 SoCThomas Bonnefille
Provide a page describing the usage of U-Boot on the LicheeRV Nano and a description of the board. Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-12-17Merge branch 'u-boot-nand-20241212' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-nand-flash into next CI: https://source.denx.de/u-boot/custodians/u-boot-nand-flash/-/pipelines/23837 Small addition to uboot-nand. Nothing relevant for now. Anyway a nice new command coming from Miquel Raynal and small changes.