Skip to contentSkip to conversation

sunxi: spl: call spl_early_init() from board_init_f()

PATCH New James Hilliard 1 participant 1 message Jun 26

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sunxi: spl: call spl_early_init() from board_init_f()

sunxi calls spl_init() from board_init_f(), before the optional SPL stack relocation has happened. This is too early for the full SPL init path when SPL_STACK_R and SPL_SYS_MALLOC_SIMPLE are enabled, since spl_init() assumes the relocated malloc area is already available in that case.

Use spl_early_init() instead, matching the SPL helper intended for board_init_f(). The SPL core still calls spl_init() later from board_init_r() if full SPL init has not already completed.

---
 arch/arm/mach-sunxi/board.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-sunxi/board.c +1 -1
index 378d4706c82..9522fd3e43f 100644
@@ -500,7 +500,7 @@ void board_init_f(ulong dummy)
 	clock_init();
 	gpio_init();
 
-	spl_init();
+	spl_early_init();
 	preloader_console_init();
 
 #if CONFIG_IS_ENABLED(I2C) && CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
Signature · 1 line
2.53.0