From: Wolfgang Denk Date: Mon, 18 Jan 2010 12:24:43 +0100 Subject: [U-Boot] [PATCH 6/9] fec_mxc: add support for MX51 processor In-Reply-To: <4B542B4E.4000108@denx.de> References: <1263212760-27272-1-git-send-email-sbabic@denx.de> <1263212760-27272-2-git-send-email-sbabic@denx.de> <1263212760-27272-3-git-send-email-sbabic@denx.de> <1263212760-27272-4-git-send-email-sbabic@denx.de> <1263212760-27272-5-git-send-email-sbabic@denx.de> <1263212760-27272-6-git-send-email-sbabic@denx.de> <1263212760-27272-7-git-send-email-sbabic@denx.de> <20100117123400.9A006C88AE@gemini.denx.de> <4B542B4E.4000108@denx.de> Message-ID: <20100118112443.67B9D3F6C0@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Stefano Babic, In message <4B542B4E.4000108@denx.de> you wrote: > > >> +#ifndef CONFIG_MX51 > >> + struct pll_regs *pll = (struct pll_regs *)IMX_PLL_BASE; > >> > >> /* enable FEC clock */ > >> writel(readl(&pll->pccr1) | PCCR1_HCLK_FEC, &pll->pccr1); > >> writel(readl(&pll->pccr0) | PCCR0_FEC_EN, &pll->pccr0); > >> +#endif > > > > Can we implement this clock enable in a way that goes without #ifdef ? > > I think this should be dropped from the driver. The driver should be > responsible to set up the FEC controller and nothing else. Enabling the > clock should be done in another place (probably in the cpu related part > ?), but not here. However, this is related to the i.MX27, I am not sure > where we have to move this code. I'm not sure. Here is where we enable the FEC because we want to use it in a network command, right? Then this is the place to enable the needed clocks, too. These should not be globally enabled and running even if no network access is ever made - this would only increase the power dissipation, which is bad on battery operated devices. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Overdrawn? But I still have checks left!