Skip to contentSkip to conversation

board: verdin-am62: remove spl_perform_fixups

PATCH In review Stefan Eichenberger 2 participants 2 messages Mar 19, 2025 – Mar 20, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board: verdin-am62: remove spl_perform_fixups

From: Stefan Eichenberger <[email protected]>

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")

---
We will analyze the other issues from
https://lore.kernel.org/all/[email protected]/
separately, because it might hide another issue. However, we need this fix so that all our Verdin AM62 modules boot again.

---
 board/toradex/verdin-am62/verdin-am62.c | 7 -------
 1 file changed, 7 deletions(-)
board/toradex/verdin-am62/verdin-am62.c +0 -7
index a1c471111a0..7b2eecbf659 100644
@@ -112,13 +112,6 @@ int board_late_init(void)
 #define CORE_VOLTAGE			0x80000000
 #define MCU_CTRL_LFXOSC_32K_BYPASS_VAL	BIT(4)
 
-#if IS_ENABLED(CONFIG_XPL_BUILD)
-void spl_perform_fixups(struct spl_image_info *spl_image)
-{
-	fixup_memory_node(spl_image);
-}
-#endif
-
 #ifdef CONFIG_SPL_BOARD_INIT
 void spl_board_init(void)
 {
Signature · 1 line
2.45.2
#1 lore raw
Quoted 8 lines · Stefan 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.

[...]

Applied to u-boot/master, thanks!

[1/1] board: verdin-am62: remove spl_perform_fixups

      commit: 7ad543619463e8817b3044041ac74749a217bbe0
Signature · 1 line
Tom