[U-Boot] [PATCH 6/9] fec_mxc: add support for MX51 processor
Wolfgang Denk
wd at denx.de
Mon Jan 18 12:24:43 CET 2010
Dear Stefano Babic,
In message <4B542B4E.4000108 at 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!
More information about the U-Boot
mailing list