[U-Boot] [RFC PATCH] ARM: atmel: at91sam9m10g45ek: enable SPL

Heiko Schocher hs at denx.de
Mon Jan 5 09:46:50 CET 2015


Hello Bo,

Am 05.01.2015 09:19, schrieb Bo Shen:
> Hi Heiko,
>
> On 01/05/2015 03:59 PM, Heiko Schocher wrote:
>>> +#ifdef CONFIG_SKIP_LOWLEVEL_INIT
>>>   void spl_board_init(void)
>>> +#else
>>> +void s_init(void)
>>> +#endif
>>>   {
>>>       struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
>>
>> ... and adding this "ifdefs" could be prevented ...
>>
>> What do you think?
>>
>> Ah! you wrote:
>>
>>  > As the boot from SD/MMC card with FAT file system, the BSS
>>  > segment is too big to fit into SRAM, so, use the lds to put
>>  > it into SDRAM. So, we need to initialize the SDRAM as soon
>>  > as possible. Borrow the low level init code from
>>  > <arm/arm/cpu/armv7/lowlevel_init.S> for this purpose.
>>
>> Hmm... maybe we can include this in the existing code? So we
>
> The existed code is located in <arch/arm/cpu/armv7> directory, I think it is difficult to include it.
>
> I think we can put it into <arch/arm/cpu/arm926ejs> directory, I am not sure it will help others. As other SoC has low level init code. Or, as the patch, put it into <arch/arm/cpu/arm926ejs/at91> directory for at91 series only.

I thought with "maybe we can include this in the existing code?"

adding into existing at91 code the earlier RAM initialization and
using BSS in RAM, without needing CONFIG_SKIP_LOWLEVEL_INIT ...

>> have BSS for all at91 boards in RAM?
>
> It depends, we still can put the BSS into SRAM use the common u-boot-spl.lds.
> Only put BSS into SDRAM/DDR, when use u-boot-spl-arm9.lds.

Ok, Yes.

>> Or, if not possible, we should convert the existing boards into
>> your framework ... if you can prepare such a patch I can test it
>> on  the corvus, taurus and axm boards ...
>
> If the upper method for low level initialize code is chosen, I will prepare such patch for the boards you mentioned.

I vote for having only one way for the at91 boards, so
your approach is also OK for me ... if andreas is fine
with it, please feel free to send me a patch for testing
on the mentioned boards, thanks!

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


More information about the U-Boot mailing list