arm: stm32mp: Drop unnecessary BOARD_EARLY_INIT_F usage
Subsystems (3)
PATCH 1/1 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.
---
Cc: Patrick Delaunay <[email protected]>
Cc: Patrice Chotard <[email protected]>
Cc: Jagan Teki <[email protected]>
Cc: Matteo Lisi <[email protected]>
Cc: Dillon Min <[email protected]>
Cc: [email protected]
--- 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(-)
arch/arm/mach-stm32mp/stm32mp1/spl.c +6 -9
@@ -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);
board/engicam/stm32mp1/spl.c +0 -6
@@ -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 ; -} -
board/st/stm32h750-art-pi/stm32h750-art-pi.c +0 -5
@@ -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 ;
configs/stm32h750-art-pi_defconfig +0 -1
@@ -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 > "
Signature · 1 line
2.43.0
Quoted 87 lines · Tom Rini
All of these platforms enable
CONFIG_BOARD_EARLY_INIT_Fand then have a do-nothingboard_early_init_ffunction. Change to not enabling the option and so not needing an empty function.Signed-off-by Tom Rini <[email protected]>---
Cc: Patrick Delaunay <[email protected]>
Cc: Patrice Chotard <[email protected]>
Cc: Jagan Teki <[email protected]>
Cc: Matteo Lisi <[email protected]>
Cc: Dillon Min <[email protected]>
Cc: [email protected]--- 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(-)arch/arm/mach-stm32mp/stm32mp1/spl.c +6
-9@@ -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);board/engicam/stm32mp1/spl.c +0
-6@@ -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 ; -} -board/st/stm32h750-art-pi/stm32h750-art-pi.c +0
-5@@ -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 ;configs/stm32h750-art-pi_defconfig +0
-0
configs/stm32h750-art-pi_defconfig CONFIG_DEFAULT_FDT_FILE="stm32h750i-art-pi" · line 29
Quoted 7 lines
configs/stm32h750-art-pi_defconfig +0
-1@@ -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 > "
Hi Tom
Thanks
Patrice
Quoted 100 lines · Patrice CHOTARD
Quoted 87 lines · Tom Rini
All of these platforms enable
CONFIG_BOARD_EARLY_INIT_Fand then have a do-nothingboard_early_init_ffunction. Change to not enabling the option and so not needing an empty function.Signed-off-by Tom Rini <[email protected]>---
Cc: Patrick Delaunay <[email protected]>
Cc: Patrice Chotard <[email protected]>
Cc: Jagan Teki <[email protected]>
Cc: Matteo Lisi <[email protected]>
Cc: Dillon Min <[email protected]>
Cc: [email protected]--- 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(-)arch/arm/mach-stm32mp/stm32mp1/spl.c +6
-9@@ -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);board/engicam/stm32mp1/spl.c +0
-6@@ -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 ; -} -board/st/stm32h750-art-pi/stm32h750-art-pi.c +0
-5@@ -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 ;configs/stm32h750-art-pi_defconfig +0
-0configs/stm32h750-art-pi_defconfig CONFIG_DEFAULT_FDT_FILE="stm32h750i-art-pi" · line 29
Quoted 7 lines
configs/stm32h750-art-pi_defconfig +0
-1@@ -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 > "Hi Tom
Quoted 8 lines
Reviewed-by Patrice Chotard <[email protected]>Thanks
Patrice
_______________________________________________
Uboot-stm32 mailing list
[email protected]
https://st-md-mailman.stormreply.com/mailman/listinfo/uboot-stm32
Applied to u-boot-stm32/master
Thanks
Patrice