
Hi,
On 4/8/24 14:59, Michal Simek wrote:
On 3/27/24 13:11, lukas.funke-oss@weidmueller.com wrote:
From: Lukas Funke lukas.funke@weidmueller.com
Currently some vendors use spl_board_init() for their SoC specific initialization. This prohibits board developers from adding board init code using said function. This series introduces a new function in order to separate SoC init code from board init code.
Changes in v3: - Rephrase Kconfig description and correct minor typo
Changes in v2: - Change spl_arch_init() to spl_soc_init()
Lukas Funke (2): spl: Introduce SoC specific init function arm64: zynq(mp): Rename spl_board_init() to spl_soc_init()
arch/arm/Kconfig | 4 ++-- arch/arm/mach-zynq/spl.c | 4 ++-- arch/arm/mach-zynqmp/spl.c | 4 ++-- common/spl/Kconfig | 7 +++++++ common/spl/spl.c | 3 +++ include/spl.h | 8 ++++++++ 6 files changed, 24 insertions(+), 6 deletions(-)
Applied.
Actually I need to drop these two patches. I pushed it to CI and got this error.
Building current source for 1 boards (1 thread, 32 jobs per thread) riscv64: + sifive_unleashed +In file included from board/sifive/unleashed/spl.c:17: +include/asm/arch/spl.h:12:5: error: conflicting types for 'spl_soc_init'; have 'int(void)' + 12 | int spl_soc_init(void); + | ^~~~~~~~~~~~ +In file included from board/sifive/unleashed/spl.c:10: +include/spl.h:825:6: note: previous declaration of 'spl_soc_init' with type 'void(void)' + 825 | void spl_soc_init(void); + | ^~~~~~~~~~~~ +make[3]: *** [scripts/Makefile.build:257: spl/board/sifive/unleashed/spl.o] Error 1 +make[2]: *** [scripts/Makefile.spl:533: spl/board/sifive/unleashed] Error 2 +make[1]: *** [Makefile:2055: spl/u-boot-spl] Error 2 +make: *** [Makefile:177: sub-make] Error 2
And it is valid because Risc-V guys are already using it.
$ git grep spl_soc_init arch/arm/mach-zynq/spl.c:36:void spl_soc_init(void) arch/arm/mach-zynqmp/spl.c:61:void spl_soc_init(void) arch/riscv/cpu/fu540/spl.c:10:int spl_soc_init(void) arch/riscv/cpu/fu740/spl.c:13:int spl_soc_init(void) arch/riscv/cpu/jh7110/spl.c:31:int spl_soc_init(void) arch/riscv/include/asm/arch-fu540/spl.h:12:int spl_soc_init(void); arch/riscv/include/asm/arch-fu740/spl.h:12:int spl_soc_init(void); arch/riscv/include/asm/arch-jh7110/spl.h:10:int spl_soc_init(void); board/sifive/unleashed/spl.c:30: ret = spl_soc_init(); board/sifive/unmatched/spl.c:137: ret = spl_soc_init(); board/starfive/visionfive2/spl.c:214: ret = spl_soc_init(); common/spl/Kconfig:279: spl_soc_init() from board_init_r(). This function should be common/spl/spl.c:715: spl_soc_init(); include/spl.h:820: * spl_soc_init() - Do architecture-specific init in SPL include/spl.h:825:void spl_soc_init(void);
It means please take a look at it and send v4.
Thanks, Michal