[PATCH V2] davinci: da850: move input frequency to board specific files
Nori, Sekhar
nsekhar at ti.com
Thu Jun 9 12:48:11 EDT 2011
Hi Christian,
On Thu, Jun 09, 2011 at 15:35:12, Christian Riesch wrote:
> Hi Kevin,
>
> On Tue, Jun 7, 2011 at 12:44 AM, Kevin Hilman <khilman at ti.com> 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()?
>
> I'm fine with this method (In fact it was the first thing that I
> tried, I added a .set_rate method to ref_clk, it worked well for me).
> However I wonder whether first initializing the clock with the wrong
> value (24 MHz) and later correcting it via clk_set_rate() would break
> something. In the meantime, the data in the clock tree do not reflect
> the actual frequencies that are present on the SoC.
Doing this right after <soc>_init() should be safe. The board should not
assume clocks to be setup before this call is made.
Thanks,
Sekhar
More information about the linux-arm-kernel
mailing list