From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikolay Dimitrov Date: Fri, 14 Nov 2014 16:40:22 +0200 Subject: [U-Boot] [PATCH] mx6sabresd: Move the DCD settings to spl code In-Reply-To: <54660241.7050300@denx.de> References: <1415915913-17096-1-git-send-email-festevam@gmail.com> <5465EBF3.7030002@mail.bg> <5465F417.3040004@mail.bg> <54660241.7050300@denx.de> Message-ID: <54661456.1010801@mail.bg> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 >>> wrote: >>>> Hi Fabio, >>>> >>>> On 11/13/2014 11:58 PM, Fabio Estevam wrote: >>>>> >>>>> From: Fabio Estevam >>>>> >>>>> 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