[U-Boot] [PATCH 6/8] ux500: add SoC-specific code
Rabin VINCENT
rabin.vincent at stericsson.com
Wed Apr 7 08:15:32 CEST 2010
On Sun, Mar 28, 2010 at 07:42:27PM +0200, Tom wrote:
> Rabin Vincent wrote:
> > +/* Turn on peripheral clock at PRCC level */
> > +void u8500_clock_enable(int periph, int kern, int cluster)
> > +{
> > + struct clkrst *clkrst = (struct clkrst *) clkrst_base[periph - 1];
>
> -1 on array access.
> Convert to unsigned access
I'm not sure what you mean by this. Periph numbering starts from 1.
> > +
> > + if (kern != -1)
> > + writel(1 << kern, &clkrst->kcken);
> > +
> > + if (cluster != -1)
> > + writel(1 << cluster, &clkrst->pcken);
>
> Checking that some of the parameters are expected to be bad.
> This function should be split.
The three arguments to this function come from a table in the SoC
manual. -1 corresponds to the "not used" cells in the table. The
function is better unsplit since the majority of peripherals require
both the register writes to enable their clock.
Rabin
More information about the U-Boot
mailing list