]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
arm: stm32mp: Drop unnecessary BOARD_EARLY_INIT_F usage
authorTom Rini <trini@konsulko.com>
Wed, 25 Mar 2026 19:00:27 +0000 (13:00 -0600)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Thu, 30 Apr 2026 06:01:11 +0000 (08:01 +0200)
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 <trini@konsulko.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
arch/arm/mach-stm32mp/stm32mp1/spl.c
board/engicam/stm32mp1/spl.c
board/st/stm32h750-art-pi/stm32h750-art-pi.c
configs/stm32h750-art-pi_defconfig

index e63bdaaf42fd9c6c23307a42f178edee24da6f64..d2e41b8e65ff12c7b2cdb2e4e41dd5dd92d41a50 100644 (file)
@@ -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);
index bb2bd446aa8c42ae628e4c9151cb1ab7cd4788ad..19e5ab0180f95efbed74817c1bb4f8c14d4db3e8 100644 (file)
@@ -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;
-}
-
index 244bb5eefb3a3bb2b253e91a03664497d6808b56..8b1b23337790ef9606011f9d515eecd4290f0ee4 100644 (file)
@@ -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;
index 971d5c00d88f55790988291f5825d29eadf491cd..0d0dca2511b76bb8234f58d9ad9ba6d56c74fadc 100644 (file)
@@ -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 > "