at91 slow clock with an external crystal (on Atmel SAM9G25)
boris.brezillon at free-electrons.com
Fri May 20 02:38:46 PDT 2016
+ Atmel and clk maintainers.
Please use get_maintainer.pl (or the MAINTAINERS file) to find people
you should send your questions too
On Wed, 18 May 2016 10:04:35 +0200
Mickael GARDET <m.gardet at overkiz.com> wrote:
> I have one question about usage of slow clock with an external crystal
> (on Atmel SAM9G25).
> All work fine If I set CONFIG_SCLK=y in at91bootstrap but we wouldn't
> update at91bootstrap.
Yes, the 'external crystal'/'internal RC osc' selection is currently
done in at91bootstrap, and Linux just use what has been configured by
> If I force usage of external crystal (like this ) it work
> for me but what's the recommended way to do this ?
I'd rather see something more generic for mainline, but you can keep it
in your own tree ;).
IMHO, the proper solution would be to add a min_accuracy field in
struct clk_rate_request (and a clk_set_min_accuracy() helper), implement
->determine_rate() in clk-slow.c to find the parent matching this
constraint, and patch all users of the slow clk to set this constraint
to something appropriate (100ppm ?).
At least, slow clock users should check if the accuracy provided by the
slow clock match what they expect and complain if it's not the case
(it's already doable thanks to the clk_get_accuracy() function).
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
More information about the linux-arm-kernel