[PATCH v4 1/3] ARM: Add initial support for CLPS711X architecture
Alexander Shiyan
shc_work at mail.ru
Fri Nov 2 06:35:03 EDT 2012
On Fri, 2 Nov 2012 11:24:29 +0100
Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com> wrote:
...
> > +static int clocks_init(void)
> > +{
> > + int osc, ext, pll, cpu, timer;
> > + u32 tmp;
> > +
> > + osc = 3686400;
> > + ext = 13000000;
> > +
> > + tmp = readl(PLLR) >> 24;
> > + if (tmp)
> > + pll = (osc * tmp) / 2;
> > + else
> > + pll = 73728000; /* Default value for old CPUs */
> > +
> > + tmp = readl(SYSFLG2);
> > + if (tmp & SYSFLG2_CKMODE) {
> > + cpu = ext;
> > + bus_clk.rate = cpu;
> > + } else {
> > + cpu = pll;
> > + if (cpu >= 36864000)
> > + bus_clk.rate = cpu / 2;
> > + else
> > + bus_clk.rate = 36864000 / 2;
> > + }
> > +
> > + uart_clk.rate = bus_clk.rate / 10;
> this wrong split clocksource driver and clocks init
>
> the clock driver will have to go to drivers/clocksource
I remember about it, and as soon as clocksource go into master, I will
make the necessary modifications.
--
Alexander Shiyan <shc_work at mail.ru>
More information about the barebox
mailing list