[U-Boot] [PATCH 1/2] spl_atmel.c: Switch s_init to board_init_f

Andreas Bießmann andreas.devel at googlemail.com
Sun Mar 29 23:59:41 CEST 2015


Hi Tom,

rebased and tried to apply, but unfortuantely this breaks SPL for at91
armv7 boards:

05: spl_atmel.c: Switch s_init to board_init_f
       arm:  +   sama5d3xek_mmc sama5d3xek_nandflash sama5d3xek_spiflash
sama5d4_xplained_mmc sama5d4ek_nandflash
+arch/arm/cpu/armv7/built-in.o: In function `lowlevel_init':
+build/../arch/arm/cpu/armv7/lowlevel_init.S:57: undefined reference to
`s_init'
+make[2]: *** [spl/u-boot-spl] Error 1
+make[1]: *** [spl/u-boot-spl] Error 2
+make: *** [sub-make] Error 2

I have to provide an empty s_init() to compile cleanly. Are you fine
with just adopting your patch or would you like to repost?

Andreas

On 11.02.15 01:07, Tom Rini wrote:
> To facilitate changing lowlevel_init to become s_init, move the current
> contents of s_init into board_init_f and add the rest of what
> board_init_f does here.
> 
> Cc: Bo Shen <voice.shen at atmel.com>
> Cc: Andreas Bießmann <andreas.devel at googlemail.com>
> Tested-by: Matt Porter <mporter at konsulko.com> on sama5d3_xplained
> Signed-off-by: Tom Rini <trini at ti.com>
> ---
>  arch/arm/cpu/at91-common/spl_atmel.c |    7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/cpu/at91-common/spl_atmel.c b/arch/arm/cpu/at91-common/spl_atmel.c
> index 7297530..d815050 100644
> --- a/arch/arm/cpu/at91-common/spl_atmel.c
> +++ b/arch/arm/cpu/at91-common/spl_atmel.c
> @@ -58,7 +58,7 @@ static void switch_to_main_crystal_osc(void)
>  	writel(tmp, &pmc->mor);
>  }
>  
> -void s_init(void)
> +void board_init_f(ulong dummy)
>  {
>  	switch_to_main_crystal_osc();
>  
> @@ -77,4 +77,9 @@ void s_init(void)
>  	preloader_console_init();
>  
>  	mem_init();
> +
> +	/* Clear the BSS. */
> +	memset(__bss_start, 0, __bss_end - __bss_start);
> +
> +	board_init_r(NULL, 0);
>  }
> 


More information about the U-Boot mailing list