[PATCH V2] davinci: da850: move input frequency to board specific files

Nori, Sekhar nsekhar at ti.com
Tue Jun 7 06:39:33 EDT 2011


Hi Kevin,

On Tue, Jun 07, 2011 at 04:14:59, Hilman, Kevin wrote:
> Christian Riesch <christian.riesch at omicron.at> writes:
> 
> > From: Bob Dunlop <bob.dunlop at xyzzy.org.uk>
> >
> > Currently the input frequency of the SoC is hardcoded in the SoC specific
> > da850.c file to 24 MHz. Since the SoC accepts input frequencies in a wide
> > range from 12 to 50 MHz, boards with different oscillator/crystal
> > frequencies may be built.
> >
> > This patch allows setting a different input frequency in the board
> > specific files to support boards with oscillator/crystal frequencies other
> > than 24 MHz.
> >
> > Signed-off-by: Bob Dunlop <bob.dunlop at xyzzy.org.uk>
> > Signed-off-by: Christian Riesch <christian.riesch at omicron.at>
> 
> Why not allow board code to just do a clk_set_rate()?
> 
> Currently the ref_clk struct clk does not have a .set_rate method
> implemented, but that should be easy enough to add.  
> 
> Then the default ref_clk.rate would stay the 24MHz, but any boards that
> want to override that simply use clk_get(), clk_set_rate(), clk_put()

That's certainly much more elegant, but this would mean the whole
clock tree is traversed again on each boot.

I am doing some measurements to see if there is any big difference
in boot-time if this is done. Will get back with results.

Thanks,
Sekhar




More information about the linux-arm-kernel mailing list