summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-04-08mtd: ubi: annotate fallthroughAndre Przywara
The UBI code uses an implicit switch/case fallthrough when handling two related cases of bad header errors. Also there is a switch/case for unit prefix handling (G/M/K), which accumulates multiplications. Add our "fallthrough;" statement-like macro before the respective labels in both cases, to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2025-04-08net: e1000: annotate switch/case fallthroughAndre Przywara
The E1000 driver uses an implicit switch/case fallthrough for sharing some code supporting different PHYs. Add our "fallthrough;" statement-like macro before the two labels in e1000_set_phy_type(), to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2025-04-08video: annotate switch/case fall-throughAndre Przywara
The generic DM video code uses an implicit switch/case fallthrough to provide fallback code paths when certain colour depths are not enabled. Add our "fallthrough;" statement-like macro to the video_fill() function to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2025-04-08usb: xhci: annotate switch/case fallthrough properlyAndre Przywara
The USB XHCI code uses an implicit switch/case fallthrough to share code for handling full speed and low speed transfers. Add our "fallthrough;" statement-like macro before the second label in the XHCI code, to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2025-04-08usb: ohci-hcd: annotate switch/case fallthroughAndre Przywara
The USB OCHI code uses an implicit switch/case fallthrough after checking for valid descriptor IDs. Add our "fallthrough;" statement-like macro before the default branch in the OHCI code, to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2025-04-08net: sun8i-emac: annotate fallthroughAndre Przywara
The Allwinner sun8i EMAC driver uses an implicit switch/case fallthrough when setting up the MAC/PHY communication protocol, to handle the case when RMII is requested, but would not be supported by the hardware. Add our "fallthrough;" statement-like macro before the default branch in sun8i_emac_set_syscon(), to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2025-04-08fastboot: annotate switch/case fallthrough caseAndre Przywara
The fastboot command handling uses an implicit switch/case fallthrough when receiving the OEM_CONSOLE command, but when this command is not enabled in Kconfig, to report this command as unknown. Add our "fallthrough;" statement-like macro before the default branch in the fastboot code, to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2025-04-08use proper fallthrough annotationsAndre Przywara
In some cases in the generic code, we were already using switch/case fallthrough annotations comments, though in a way which might not be understood by most compilers. Replace two non-standard /* no break */ comments with our fallthrough; statement-like macro, to make this visible to the compiler. Also use this macro in place of an /* Fall through */ comment, to be more consistent. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2025-04-08gadget: f_thor: annotate switch/case fallthroughAndre Przywara
Even though we seem to catch POWEROFF and EFSCLEAR commands in the THOR protocol request handling, we ultimately do not seem to handle them (apart from sending a response), so those commands still print an error message. Annotate the switch/case fallthrough in this case, to make this clear to the compiler. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2025-04-08zlib: annotate switch/case fallthrough casesAndre Przywara
The inflate state machine in zlib uses switch/case fall-through's extensively, as it sometimes advances the state, and lets the conveniently placed next case statement handle the new state already. The pattern here is: state->mode = LEN; case LEN: Annotate those occasions with the "fallthrough;" macro, to let compilers know this is fine when using -Wimplicit-fallthrough. This mimics the upstream commit 76f70abbc73f: Author: Mark Adler <madler@alumni.caltech.edu> Date: Sun Mar 27 00:12:38 2022 -0700 Subject: Add fallthrough comments for gcc. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Link: https://github.com/madler/zlib/commit/76f70abbc73f Reviewed-by: Tom Rini <trini@konsulko.com>
2025-04-08spl: mmc: properly annotate fallthroughAndre Przywara
Depending on the various MMC boot configurations, we might end up with trying filesystem mode when a raw image boot failed. This fall-through in the switch/case statement is explained in a comment, but this is not visible to the compiler, which still will complain. Add the proper compiler-visible annotation, to allow enabling the compiler check in the future. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2025-03-24Prepare v2025.05-rc5v2025.04-rc5Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-03-24lmb: change the return code on lmb_alloc_addr()Ilias Apalodimas
Ben reports a failure to boot the kernel on hardware that starts its physical memory from 0x0. The reason is that lmb_alloc_addr(), which is supposed to reserve a specific address, takes the address as the first argument, but then also returns the address for success or failure and treats 0 as a failure. Since we already know the address change the prototype to return an int. Reported-by: Ben Schneider <ben@bens.haus> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Tested-by: Ben Schneider <ben@bens.haus> Reviewed-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2025-03-21Merge tag 'u-boot-dfu-20250321' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-dfu u-boot-dfu-20250321 Usb gadget: - Fix NXP UUU tool compatibility regression with dwc3 gadget
2025-03-21usb: dwc3: gadget: Fix match_ep callback for NXP UUU toolMarek Vasut
The UUU tool excepts the interrupt-in endpoint to be ep1in, otherwise it crashes. This is a result of the previous hard-coded EP setup in drivers/usb/gadget/epautoconf.c which did special-case EP allocation for SPL builds, and which was since converted to this callback, but without the special-case EP allocation in SPL part. This reinstates the SPL part in an isolated manner, only for NXP iMX SoCs, only for SPL builds, and only for the ep1in interrupt-in endpoint. Fixes: 1918b8010c32 ("usb: dwc3: gadget: Convert epautoconf workaround to match_ep callback") Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20250319220805.219001-1-marex@denx.de Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2025-03-20board: verdin-am62: remove spl_perform_fixupsStefan Eichenberger
spl_perform_fixups is redundant in the current implementation. SPLs call dram_init during spl_enable_cache in arch/arm/mach-k3/common.c. In U-Boot, dram_init and dram_init_banksize are automatically called in init_sequence_f. Therefore, SPLs and U-Boot always determine the correct RAM size. During Linux boot, fdt_fixup_memory_banks adjusts the RAM size in the Linux device tree, ensuring correct RAM usage. dram_init() calls get_ram_size() for the Verdin AM62, which determines the correct RAM size through read/write operations. However, due to the K3 bootflow placing ATF in RAM and requiring cache coherence, calling get_ram_size() with caches enabled prevents ATF boot. Removing this call restores ATF boot functionality. This fixes a regression introduced in commit 4164289db882 ("board: verdin-am62: fix missing memory fixup call") which prevents some of our Verdin AM62 modules from booting. Fixes: 4164289db882 ("board: verdin-am62: fix missing memory fixup call") Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
2025-03-18checkpatch.pl: Report an error for CONFIG_xPL_BUILD in device treesHendrik Donner
The defines for the different build phases shouldn't be used in device trees, currently they aren't even defined for device tree pre processing, resulting in build errors. Link: https://lists.denx.de/pipermail/u-boot/2025-March/582787.html Signed-off-by: Hendrik Donner <hd@os-cillation.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2025-03-18dumpimage: fix handling of StarFive SPL too longHeinrich Schuchardt
The header of the StarFive U-Boot SPL file u-boot-spl.normal.out has a field indicating the payload size. When copying U-Boot SPL from a partition the copied file might be too long. Currently in this situation a misleading error message 'Incorrect CRC32' is written. We must use the payload size and not the file size when calculating the CRC32. Write a warning if the file is too long indicating the correct size. This enables the user to truncate the file accordingly. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-03-18qconfig: Correct unhashable-type error with --scan-sourceSimon Glass
This gives an error with newer Python version, so fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18scripts: typos in event_dump.pyHeinrich Schuchardt
%s/even spies/event spies/ %s/EFL/ELF/ Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-03-17cmd: version: Get information about GCC and LD backMichal Simek
U-Boot version command is no longer showing information about GCC and LD. The reason is that version.h has been removed that's why CC_VERSION_STRING and LD_VERSION_STRING are not pass. Values are generated to generated/version_autogenerated.h which is sourced in version.h. Fixes: 54ecce2cbf90 ("version: Separate our version string from the version command") Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-03-17Merge tag 'efi-2025-04-rc5' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request efi-2025-04-rc5 CI: * https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/25196 UEFI: * Export _start symbol from crt0_*_efi stubs * Move .dynamic out of .text in EFI * scripts/Makefile.lib: Preserve the .dynstr section as well Documentation: * net: miiphybb: Convert documentation to rst
2025-03-17Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-shTom Rini
These are mainly DBSC5 DRAM controller specific fixes and updates for current release. There is the long overdue BL31 start V4H board code as well, that should be in the current release to make the V4H White Hawk board usable with SPL, and a fallback U-Boot PSCI implementation enablement to make sure the board always boots. And finally, there are two comment fixes.
2025-03-17scripts/Makefile.lib: efi: Preserve the .dynstr section as wellSam Edwards
This section is required by .dynamic and llvm-objcopy will exit with a fatal error if it is not also preserved in the output. Signed-off-by: Sam Edwards <CFSworks@gmail.com>
2025-03-17efi_loader: Move .dynamic out of .text in EFISam Edwards
EFI applications need to be relocatable. Ordinarily, this is achieved through a PE-format .reloc section, but since that requires toolchain tricks to achieve, U-Boot's EFI applications instead embed ELF-flavored relocation information and use it for self-relocation; thus, the .dynamic section needs to be preserved. Before this patch, it was tacked on to the end of .text, but this was not proper: A .text section is SHT_PROGBITS, while the .dynamic section is SHT_DYNAMIC. Attempting to combine them like this creates a section type mismatch. While GNU ld doesn't seem to complain, LLVM's lld considers this a fatal linking error. This patch moves .dynamic out to its own section, so that the output ELF has the correct types. (They're all mashed together when converting to binary anyway, so this patch causes no change in the final .efi output.) Signed-off-by: Sam Edwards <CFSworks@gmail.com> Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-03-17arm: riscv: efi: Export _start symbol from crt0_*_efi stubsSam Edwards
While the _start label is only intended for use locally to populate the (hand-written) PE header, the linker script includes ENTRY(_start) which designates it as the entry point in the output ELF, resulting in linker warnings under some linkers (e.g. LLVM's lld) due to _start not being a globally-visible symbol. Since ELF is only an intermediary build format, and the aforementioned PE header correctly points to _start, the ENTRY(_start) directive could easily be removed to silence this warning. However, since some developers who are debugging EFI by analyzing the intermediary ELF may appreciate having correct entry-point information, this patch instead promotes the _start labels to global symbols, silencing the linker warning and making the intermediary ELF reflect the true entry point. This patch doesn't affect the final output binaries in any way. Signed-off-by: Sam Edwards <CFSworks@gmail.com>
2025-03-17net: miiphybb: Convert documentation to rstMarek Vasut
Convert the current miiphybb documentation to rst. Rename the README.bitbangMII to bitbangmii.rst in the process. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-03-16ram: renesas: dbsc5: Make struct renesas_dbsc5_board_config publicMarek Vasut
Make struct renesas_dbsc5_board_config {} definition public via include/dbsc5.h, so this structure can be defined in board files and passed into the DBSC5 DRAM driver by overriding weak function dbsc5_get_board_data() on board level. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-03-16ram: renesas: dbsc5: Add V4H-3/V4H-5/V4H-7 OTP based detectionMarek Vasut
Add auto-detection and handling of Renesas R-Car V4H-3 and V4H-5 in addition to V4H-7 SoC variants based on OTP fuse programming. The V4H-3 and V4H-5 variants have reduced DRAM frequency options. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-03-16ram: renesas: dbsc5: Synchronize initialization code to rev.1.10Marek Vasut
Update the DRAM initialization code to match DBSC5 initialization code rev.1.10 , which is currently the latest version available. This makes DRAM initialization operational on Renesas R-Car V4H R8A779G0 rev.3.0. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-03-16ram: renesas: dbsc5: Fix DBTR11 calculationMarek Vasut
Reinstate missing increment by two in DBTR11 calculation based on the original DBSC5 initialization code rev.0.80. The original code did ... ODTLon - (js2[JS2_tODTon_min] - 1) + 1 , which was incorrectly converted into ODTLon - js2[JS2_tODTon_min], but should have been converted to ODTLon - js2[JS2_tODTon_min] + 2. Add the missing +2 . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-03-16ram: renesas: dbsc5: Fix JS1 index calculationMarek Vasut
The JS1 index is calculated correctly, but the limiter cannot be the max() function because the index should be lower than JS1_USABLEC_SPEC_HI and the max() function would unconditionally override the JS1 index to JS1_USABLEC_SPEC_HI. Use clamp() to limit the JS1 index instead. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-03-16ram: renesas: dbsc5: Fix bitrate MD pin parsingMarek Vasut
Fix copy paste error in MD pin handling for 5500 Mbps and 4800 Mbps case, each should be handled by MD[19,17] == 2 and MD[19,17] == 3 respectively. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-03-16arm64: dts: renesas: Make OTP available in SPL on R8A779G0 V4HMarek Vasut
The DBSC5 DRAM controller driver needs access to OTP fuses to discern Renesas R-Car V4H-3, V4H-5 and V4H-7 SoC variants based on OTP fuse programming. Make OTP block DT node available in U-Boot SPL DT so the DBSC5 driver can determine its base address and read out the OTP fuses. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-03-16arm64: renesas: Drop stale R-Car V4H SPL implementation descriptionMarek Vasut
The R-Car V4H SPL implementation was originally running on the Cortex-R52 core, but this is no longer the case. Majority of the SPL now runs on the Cortex-A76 core. Drop the stale description. Fixes: ec53fdee5bec ("arm64: renesas: Add Renesas R-Car V4H SPL implementation") Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-03-16ARM: renesas: Drop stale common Makefile descriptionMarek Vasut
Remove stale Makefile description, this used to be valid for the original Makefile from which the common Makefile was made generic, but is no longer applicable to the common Makefile. Fixes: c7d2d7f90a91 ("ARM: renesas: Simplify board Makefiles") Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-03-16arm64: renesas: Enable fallback PSCI on Renesas R-Car R8A779G0 V4H White HawkMarek Vasut
Enable fallback PSCI provider on Renesas R-Car R8A779G0 V4H White Hawk board. This fallback PSCI provider provides basic PSCI interface which can be used by the Linux kernel, but does not provide support for bringing up additional CPU cores or any other functionality, except for SoC level reset. This fallback PSCI provider is intended as a fallback in case a proper PSCI provider is not started before the Linux kernel is started. Linux kernel on ARMv8a will fail to boot in case a PSCI provider is not available, and this basic fallback PSCI provider assures such a boot failure cannot occur, even if that means the system will boot in degraded mode with only one CPU core available, that is still sufficient to perform recovery. In the common case, a proper PSCI provider should be started as part of the Linux kernel fitImage, as the BL31 loadable, and replace this basic fallback PSCI provider before the Linux kernel is started. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-03-16arm64: renesas: Add TFA BL31 handoff support on Renesas R-Car Gen4Marek Vasut
Implement custom U_BOOT_FIT_LOADABLE_HANDLER and armv8_switch_to_el2_prep() handling in case the TFA was loaded. The loadables handler sets up custom handoff structure used by Renesas TFA fork in fixed location in DRAM and indicates the TFA has been loaded. The custom armv8_switch_to_el2_prep() handling tests whether the TFA BL31 was previously loaded and the custom handoff structure was set up, and if so, jumps to TFA BL31 which switches from EL3 to EL2 and then returns to U-Boot just past bl in armv8_switch_to_el2() to finish starting the Linux kernel. The jump to Linux through TFA works in such a way that the custom armv8_switch_to_el2_prep() handler configures the custom handoff structure such that the target jump address of the TFA BL31 on exit is set to the armv8_switch_to_el2() + 4, which is just past the bl, and just before the U-Boot code which implements the Linux kernel boot from either EL. The registers passed through the TFA BL31 are all the registers passed into armv8_switch_to_el2_prep() to assure maximum compatibility with all the boot modes. The armv8_switch_to_el2_prep() handler jumps to the TFA BL31, which does its setup, drops EL from EL3 to EL2 and finally jumps to the armv8_switch_to_el2() + 4 entry point, which then allows U-Boot to boot the Linux kernel the usual way. In order to build suitable kernel fitImage, build TFA first, upstream is currently under review: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/35799 Or if necessary, downstream repository: remote: https://github.com/renesas-rcar/arm-trusted-firmware.git branch: rcar_gen4_v2.7_v4x ``` $ git clean -fqdx $ MBEDTLS_DIR=/path/to/mbedtls/ make -j$(nproc) bl31 \ PLAT=rcar_gen4 ARCH=aarch64 LSI=V4H SPD=none \ CTX_INCLUDE_AARCH32_REGS=0 MBEDTLS_COMMON_MK=1 \ PTP_NONSECURE_ACCESS=1 LOG_LEVEL=20 DEBUG=0 \ ENABLE_ASSERTIONS=0 E=0 ``` Build Linux kernel Image and device tree from current mainline Linux kernel repository, obtain 'Image' and 'r8a779g0-white-hawk.dtb' . Bundle the files together using provided fit-image.its fitImage description: ``` $ mkimage -f fit-image.its fitImage ``` To start the kernel fiImage generated in previous step, load fitImage to DRAM and use the 'bootm' command to start it: => load 0x58000000 ... fitImage && bootm 0x58000000 Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-03-13ARM: dts: imx: Drop bogus regulator extras on DH i.MX6 DHCOM DRC02Marek Vasut
The regulator extras should be placed in the USB H1 regulator node, the /regulator-usb-h1-vbus. They are already present there in the upstream DT, so delete this bogus node entirely. Signed-off-by: Marek Vasut <marex@denx.de>
2025-03-13Merge tag 'rpi-2025.04-rc4' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-raspberrypi Updates for RPi for 2025.04: - Copy Bluetooth device address in DT - Keep warnings from firmware in DT, if any - Only add frame buffer node if CONFIG_FDT_SIMPLEFB is set - Add identifiers for the new RPi 5 series
2025-03-13Raspberry Pi: Copy Bluetooth device address in DTFiona Klute
The firmware sets local-bd-address, copy it when loading a new DT. Signed-off-by: Fiona Klute <fiona.klute@gmx.de> Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2025-03-13Raspberry Pi: Keep warnings from firmware in DT, if anyFiona Klute
The /chosen/user-warnings property is created by the RPi firmware if there are warnings to report, keep it to make debugging easier. For example, if the firmware config.txt contains "dtoverlay=error-example" and that example references an undefined symbol "&nosuchdev" the warning can be read after boot: $ cat /proc/device-tree/chosen/user-warnings dterror: can't find symbol 'nosuchdev' Failed to resolve overlay 'error-example' Signed-off-by: Fiona Klute <fiona.klute@gmx.de> Reviewed-by: Matthias Brugger <mbrugger@suse.com> Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2025-03-13rpi: Only add frame buffer node if CONFIG_FDT_SIMPLEFB is setMartin Stolpe
The functions fdt_simplefb_add_node and fdt_simplefb_enable_and_mem_rsv are only available if CONFIG_FDT_SIMPLEFB is enabled. Signed-off-by: Martin Stolpe <martin.stolpe@gmail.com> Acked-by: Matthias Brugger <mbrugger@suse.com> Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2025-03-13rpi: Add identifiers for the new RPi 5 seriesPeter Robinson
The Raspberry Pi foundation have released the Raspberry Pi 500, CM5 an CM5 lite devices so add the assoicated revision identifers so we can detect them. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> Acked-by: Matthias Brugger <mbrugger@suse.com>
2025-03-12Merge tag 'u-boot-imx-master-20250312' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/25106 - Fix VDDQ voltage setting for LPDDR4x on imx93_evk.
2025-03-12imx93_evk: Fix wrong VDDQ voltage setting for LPDDR4xYe Li
The default PCA9451 BUCK2 volt is 0.6 V for LPDDR4x VDDQ. The codes are actually used for reworking to LPDDR4 which needs VDDQ at 1.1 V. So remove it to avoid LPDDR4x issue. Signed-off-by: Ye Li <ye.li@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com>
2025-03-10Prepare v2025.04-rc4v2025.04-rc4Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-03-10configs: Resync with savedefconfigTom Rini
Resync all defconfig files using qconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2025-03-10Merge tag 'u-boot-stm32-20250310' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-stm ARM: stm32mp: Fix boot hang on STM32MP15xx with 1 GiB of DRAM.
2025-03-10ARM: stm32mp: Fix dram_bank_mmu_setup() for ram_top=0Marek Vasut
On STM32MP15xx with 1 GiB of DRAM, the gd->ram_top becomes 0, because DRAM base 0xc0000000 + DRAM size 0x40000000 leads to gd->ram_top overflow which resets it to 0. Handle this special case simply by checking for gd->ram_top being zero, and if it is, assume there is no addr >= gd->ram_top . This fixes boot hang on STM32MP15xx with 1 GiB of DRAM. Fixes: 25fb58e88aba ("ARM: stm32mp: Fix dram_bank_mmu_setup() for LMB located above ram_top") Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>