[PATCH] arm: rockchip: Guard call of board_early_init_f in SPL
Jonas Karlman
jonas at kwiboo.se
Wed Mar 25 20:31:25 CET 2026
Hi Tom,
On 3/25/2026 8:00 PM, Tom Rini wrote:
> 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))
This patch seem to introduce a change in behavior for chromebook bob and
kevin, they do not seem to enable BOARD_EARLY_INIT_F, yet they have a
board_early_init_f() in board/google/gru/gru.c no longer being called
after this change.
I do not have a chromebook_bob/kevin so I cannot help verify if this
change break anything, hopefully Simon can help test/verify.
Regards,
Jonas
> + board_early_init_f();
>
> ret = spl_early_init();
> if (ret) {
More information about the U-Boot
mailing list