From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dirk Behme Date: Wed, 14 Mar 2012 15:53:12 +0100 Subject: [U-Boot] [PATCH V2] i.MX6: mx6q_sabrelite: add SATA bindings In-Reply-To: <1331657978-19270-1-git-send-email-eric.nelson@boundarydevices.com> References: <1331657978-19270-1-git-send-email-eric.nelson@boundarydevices.com> Message-ID: <4F60B0D8.7020907@de.bosch.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 13.03.2012 17:59, Eric Nelson wrote: ... > --- a/board/freescale/mx6qsabrelite/mx6qsabrelite.c > +++ b/board/freescale/mx6qsabrelite/mx6qsabrelite.c ... > + /* Enable sata clock */ > + reg = readl(&imx_ccm->CCGR5); /* CCGR5 */ > + reg |= MXC_CCM_CCGR5_CG2_MASK; > + writel(reg, &imx_ccm->CCGR5); We touch the CCGR5 already in the imximage.cfg. So we could drop this code completely and just add the MXC_CCM_CCGR5_CG2_MASK to the imximage.cfg. What are the advantages/disadvantages of this? Advantages: Less code, touch the register only once in imximage.cfg. Disadvantages: Less readability, doing it in setup_sata() instead of imximage.cfg is easier to understand and disable (by removing CONFIG_CMD_SATA). Opinions? It sounds like this results in the basic question: Which registers should be touched in imximage.cfg, and which by explicit code in drivers/board files? Best regards Dirk