From 5ab39c8a669b5bda660c71e121cb65d508509b07 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 25 Mar 2026 13:00:27 -0600 Subject: arm: stm32mp: Drop unnecessary BOARD_EARLY_INIT_F usage All of these platforms enable CONFIG_BOARD_EARLY_INIT_F and then have a do-nothing board_early_init_f function. Change to not enabling the option and so not needing an empty function. Signed-off-by: Tom Rini Reviewed-by: Patrice Chotard --- arch/arm/mach-stm32mp/stm32mp1/spl.c | 15 ++++++--------- board/engicam/stm32mp1/spl.c | 6 ------ board/st/stm32h750-art-pi/stm32h750-art-pi.c | 5 ----- configs/stm32h750-art-pi_defconfig | 1 - 4 files changed, 6 insertions(+), 21 deletions(-) diff --git a/arch/arm/mach-stm32mp/stm32mp1/spl.c b/arch/arm/mach-stm32mp/stm32mp1/spl.c index e63bdaaf42f..d2e41b8e65f 100644 --- a/arch/arm/mach-stm32mp/stm32mp1/spl.c +++ b/arch/arm/mach-stm32mp/stm32mp1/spl.c @@ -90,11 +90,6 @@ void spl_display_print(void) } #endif -__weak int board_early_init_f(void) -{ - return 0; -} - uint32_t stm32mp_get_dram_size(void) { struct ram_info ram; @@ -204,10 +199,12 @@ void board_init_f(ulong dummy) /* enable console uart printing */ preloader_console_init(); - ret = board_early_init_f(); - if (ret) { - log_debug("board_early_init_f() failed: %d\n", ret); - hang(); + if (IS_ENABLED(CONFIG_BOARD_EARLY_INIT_F)) { + ret = board_early_init_f(); + if (ret) { + log_debug("board_early_init_f() failed: %d\n", ret); + hang(); + } } ret = uclass_get_device(UCLASS_RAM, 0, &dev); diff --git a/board/engicam/stm32mp1/spl.c b/board/engicam/stm32mp1/spl.c index bb2bd446aa8..19e5ab0180f 100644 --- a/board/engicam/stm32mp1/spl.c +++ b/board/engicam/stm32mp1/spl.c @@ -15,9 +15,3 @@ void board_vddcore_init(u32 voltage_mv) if (IS_ENABLED(CONFIG_PMIC_STPMIC1) && CONFIG_IS_ENABLED(POWER)) opp_voltage_mv = voltage_mv; } - -int board_early_init_f(void) -{ - return 0; -} - diff --git a/board/st/stm32h750-art-pi/stm32h750-art-pi.c b/board/st/stm32h750-art-pi/stm32h750-art-pi.c index 244bb5eefb3..8b1b2333779 100644 --- a/board/st/stm32h750-art-pi/stm32h750-art-pi.c +++ b/board/st/stm32h750-art-pi/stm32h750-art-pi.c @@ -32,11 +32,6 @@ int dram_init_banksize(void) return 0; } -int board_early_init_f(void) -{ - return 0; -} - int board_late_init(void) { return 0; diff --git a/configs/stm32h750-art-pi_defconfig b/configs/stm32h750-art-pi_defconfig index 971d5c00d88..0d0dca2511b 100644 --- a/configs/stm32h750-art-pi_defconfig +++ b/configs/stm32h750-art-pi_defconfig @@ -24,7 +24,6 @@ CONFIG_DEFAULT_FDT_FILE="stm32h750i-art-pi" CONFIG_SYS_CBSIZE=256 CONFIG_SYS_PBSIZE=282 # CONFIG_DISPLAY_CPUINFO is not set -CONFIG_BOARD_EARLY_INIT_F=y # CONFIG_BOARD_INIT is not set CONFIG_BOARD_LATE_INIT=y CONFIG_SYS_PROMPT="U-Boot > " -- cgit v1.2.3