public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: boris.brezillon@free-electrons.com (Boris Brezillon)
To: linux-arm-kernel@lists.infradead.org
Subject: at91 slow clock with an external crystal (on Atmel SAM9G25)
Date: Fri, 20 May 2016 11:38:46 +0200	[thread overview]
Message-ID: <20160520113846.5df0be05@bbrezillon> (raw)
In-Reply-To: <9cf2f9be-7f76-ca65-f2cf-ca0d20de6d2f@overkiz.com>

+ Atmel and clk maintainers.

Hi Mickael,

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@overkiz.com> wrote:

> Hi,
> 
> 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
the bootstrap.

> 
> If I force usage of external crystal (like this [1]) 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).

Best Regards,

Boris

> [1]http://code.bulix.org/kpzu92-98883


-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

      reply	other threads:[~2016-05-20  9:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18  8:04 at91 slow clock with an external crystal (on Atmel SAM9G25) Mickael GARDET
2016-05-20  9:38 ` Boris Brezillon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160520113846.5df0be05@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox