[PATCH] arm: rockchip: Guard call of board_early_init_f in SPL
Tom Rini
trini at konsulko.com
Wed Mar 25 20:00:25 CET 2026
Today, no platforms call board_early_init_f, and rockchip provides a
weak default function. Change this to not providing a weak function and
only call board_early_init_f if CONFIG_BOARD_EARLY_INIT_F is enabled.
This will allow any potential future needs to be taken care of, and make
future consolidation easier.
Signed-off-by: Tom Rini <trini at konsulko.com>
---
Cc: Philipp Tomsich <philipp.tomsich at vrull.eu>
Cc: Kever Yang <kever.yang at rock-chips.com>
---
arch/arm/mach-rockchip/spl.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c
index e989c148079a..8026cc0abb8d 100644
--- a/arch/arm/mach-rockchip/spl.c
+++ b/arch/arm/mach-rockchip/spl.c
@@ -97,11 +97,6 @@ u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device)
return MMCSD_MODE_RAW;
}
-__weak int board_early_init_f(void)
-{
- return 0;
-}
-
__weak int arch_cpu_init(void)
{
return 0;
@@ -111,7 +106,8 @@ void board_init_f(ulong dummy)
{
int ret;
- board_early_init_f();
+ if (IS_ENABLED(CONFIG_BOARD_EARLY_INIT_F))
+ board_early_init_f();
ret = spl_early_init();
if (ret) {
--
2.43.0
More information about the U-Boot
mailing list