[U-Boot] [PATCH] spl: add a new stub spl_early_board_init() for early SoC-specific setup

Masahiro Yamada yamada.masahiro at socionext.com
Wed Mar 9 10:48:46 CET 2016


Hi Tom,



2016-03-09 8:23 GMT+09:00 Tom Rini <trini at konsulko.com>:
> On Tue, Mar 08, 2016 at 08:37:16PM +0900, Masahiro Yamada wrote:
>
>> We are generally supposed to implement SoC/board-specific SPL init
>> code in spl_board_init(), but it is called after spl_init() where the
>> FDT is setup and devices are bound.
>>
>> This new stub spl_early_board_init() would be useful to put something
>> really SoC-specific, for example, debug_uart_init().
>>
>> In fact, I was hit by some problems on FDT setup when I was tackling
>> on a completely new platform.  I wished I could use the debug UART
>> earlier in situations like that.
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
>
> This is usually done with s_init() and uniphier opts out of that.

Yes, ARM32 UniPhier needs to do some tricky initialization right after
the start-up,
so it has its own lowlevel_init.

ARM64 UniPhier is more like the standard ARM architecture,
so hopefully I will be able to reuse more common code.

>  I
> would conceed however that things could use some further clean-up and
> organization here.

As Simon pointed out, an alternative would be to override board_init_f().
I can live with that, too.




-- 
Best Regards
Masahiro Yamada


More information about the U-Boot mailing list