[U-Boot] [PATCH] mx6sabresd: Move the DCD settings to spl code

Nikolay Dimitrov picmaster at mail.bg
Fri Nov 14 15:40:22 CET 2014


Hi Stefano,

On 11/14/2014 03:23 PM, Stefano Babic wrote:
> Hi Nikolay,
>
> On 14/11/2014 13:22, Nikolay Dimitrov wrote:
>> Hi Fabio,
>>
>> On 11/14/2014 01:57 PM, Fabio Estevam wrote:
>>> Hi Nikolay,
>>>
>>> On Fri, Nov 14, 2014 at 9:48 AM, Nikolay Dimitrov <picmaster at mail.bg>
>>> wrote:
>>>> Hi Fabio,
>>>>
>>>> On 11/13/2014 11:58 PM, Fabio Estevam wrote:
>>>>>
>>>>> From: Fabio Estevam <fabio.estevam at freescale.com>
>>>>>
>>>>> mx6sabresd_spl.cfg configures CCM registers, GPR registers and
>>>>> CCM_CCOSR.
>>>>>
>>>>> Move the configuration to the spl code.
>>>>
>>>>
>>>> I forgot to asker earlier, but what are the benefits of going from
>>>> DCD to
>>>> SPL code to provide HW initialization?
>>>
>>> We already went through the hard part of removing the DDR settings
>>> from DCD in the SPL case. Now all is left is a few register writes
>>> that could be better placed into SPL code.
>>>
>>> Some advantages:
>>>
>>> - Shorter and cleaner code - see the stat diff of this series. This
>>> will avoid lots of duplication of the same spl DCD settings for
>>> several boards.
>>> - Do all the register settings in C rather than in a static DCD table.
>>> Easier to maintain and provide future changes.
>>> - We really don't need to do such simple register settings from DCD ;-)
>>
>
> There is another advantage: it is possible to provide a single binary
> for boards that can mount different processor,sucs as MX6Q or MX6DL. Due
> to different layout, the registers are not the same, and the DCD is, of
> course, fix.
>
> With SPL we are able to detect at runtime the SOC and set the registers
> consequently. With DCD, we need to rebuild U-Boot and deliver different
> binaries - that is also confusing for the end customer.

That was a good addition. Thank you guys for taking the time to explain.

Regards,
Nikolay


More information about the U-Boot mailing list