[PATCH 1/2] spl: Introduce architecture specific init function

Devarsh Thakkar devarsht at ti.com
Wed Mar 20 16:22:30 CET 2024


Hi Tom, Lukas,

Thanks for the patch Lukas.

On 20/03/24 20:00, Tom Rini wrote:
> On Wed, Mar 20, 2024 at 02:19:26PM +0100, lukas.funke-oss at weidmueller.com wrote:
> 
>> From: Lukas Funke <lukas.funke at weidmueller.com>
>>
>> Some architectures use spl_board_init() in their architecture specific
>> implementation. Board developers should be able to add board specific
>> implementation via spl_board_init(). Hence, introduce a spl_arch_init()
>> method which is called right before spl_board_init() for architecture
>> specific implementation.
>>
>> Signed-off-by: Lukas Funke <lukas.funke at weidmueller.com>
> 
> I think this could allow for other SoCs to clean up their existing

Does it make more sense to make this SoC specific then instead of arch
specific to allow broader range of code?

For e.g., if we have something like spl_soc_init then it would help
accommodate soc specific functionality too along with calling arch specific code ?

Also I see some vendors already having implemented spl_soc_init in their arch
specific files [1], so I think it would be good if it is moved it to framework
level.

[1] :
https://source.denx.de/u-boot/u-boot/-/blob/master/arch/riscv/cpu/fu540/spl.c?ref_type=heads#L10
https://source.denx.de/u-boot/u-boot/-/blob/master/arch/riscv/include/asm/arch-fu740/spl.h?ref_type=heads#L12

Regards
Devarsh

> ad-hoc mechanisms for SoC/architecture init and then board init, so this
> looks like a good idea to me.
> 
> Reviewed-by: Tom Rini <trini at konsulko.com>
> 


More information about the U-Boot mailing list