From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Lorenzo Pieralisi
<lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linaro-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH] ARM: cpu: Document and tweak clock-frequency property
Date: Sun, 8 Dec 2013 16:19:22 +0000 [thread overview]
Message-ID: <20131208161922.GK29268@sirena.org.uk> (raw)
In-Reply-To: <52A36AB3.6060102-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 3169 bytes --]
On Sat, Dec 07, 2013 at 12:36:35PM -0600, Rob Herring wrote:
> On 12/06/2013 05:57 AM, Mark Brown wrote:
> > + - clock-frequency
> > + Usage: required
> This breaks compatibility. It may be required for a feature in the
It doesn't, it's listed as mandatory in ePAPR section 3.7.1 which is
already part of our bindings - this is merely copying that information
into the binding document in the kernel so that it's more discoverable
and so that we can tweak the definition to reflect reality a bit more
closely.
> kernel to work, but should not be required in general. Perhaps we need
> "optional/recommended" or "optional/required for new designs". Or we
> could say required only with heterogeneous cores.
For practical purposes a robust implementation should make it optional
(as the current ARMv7 one does) but that doesn't change the spec.
> > + Value type: <u32> or <u64>
> How do I determine the size? I think generally this property which is
> used in multiple bindings is always u32. Of course, that won't work for
> our 5GHz parts next year.
Beats me. Actually now I recheck the spec it should be a prop encoded
array consisting of a single element that's either u32 or u64, I guess
the array encodes the information.
> > + Definition:
> > + This is specified in ePAPR as the current clock
> > + frequency of the CPU. When used with these
> > + extensions it should reflect the maximum clock
> > + frequency for the CPU.
> What does extensions mean? cpu topology nodes?
No, it means the document being modified - the same language is used
throughout the document to refer to the extensions it's defining on top
of the base ePAPR CPU bindings.
> It is useful to have a standard way to determine the current cpu
> frequency. I've been asked for this several times on highbank. This
> could be cpufreq, but there is not always a driver loaded. lshw already
> has support for reading the frequency using this property. So I'm not
> real sure deviating from the ePAPR is a good idea.
That'd be nice but it's not terribly practical to do it in DT given that
we have a static DT. As soon as something does change the frequency the
information goes bad, and I don't know how this is going to play with
things like kexec. One could spec that the core always needs to be
started at top speed though that doesn't seem helpful.
> If a cpu only supports 1 frequency, then clock-frequency will always
> reflect the current and max freq. If a cpu supports multiple
> frequencies, then it should have an OPP table with those frequencies. We
> should then get max frequency from the OPP table rather than
> clock-frequency. It is clear that clock-frequency is insufficient to
> describe everything we need.
Right, though encoding the operating points into DT isn't always going
to be useful. What I'm trying to do here is both reflect the existing
ARMv7 usage and make the property a bit more useful.
If defining it to be the maximum frequency isn't going to fly we should
probably just override ePAPR to say it's optional and implementations
should not rely on its accuracy.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-12-08 16:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-06 11:57 [PATCH] ARM: cpu: Document and tweak clock-frequency property Mark Brown
[not found] ` <1386331027-26065-1-git-send-email-broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2013-12-07 18:36 ` Rob Herring
[not found] ` <52A36AB3.6060102-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-12-08 16:19 ` Mark Brown [this message]
[not found] ` <20131208161922.GK29268-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-12-08 16:38 ` Peter Maydell
2013-12-08 19:22 ` Mark Brown
[not found] ` <20131208192237.GM29268-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-12-08 19:51 ` Peter Maydell
[not found] ` <CAFEAcA9oCPi0dj89NJ0k2wOsbVBCV=3=7FBrn=xuYdouJWc98Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-08 21:50 ` Mark Brown
[not found] ` <20131208215026.GO29268-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-12-08 22:55 ` Peter Maydell
[not found] ` <CAFEAcA_GG_GW0ZXbTPMp7M0foK_sjUwYx0kk_YULVn0d9ozosA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-09 11:27 ` Mark Brown
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=20131208161922.GK29268@sirena.org.uk \
--to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=linaro-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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;
as well as URLs for NNTP newsgroup(s).