From: ezequiel.garcia@free-electrons.com (Ezequiel Garcia)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 5/6] clocksource: armada-370-xp: Fix device-tree binding
Date: Sat, 17 Aug 2013 13:38:49 -0300 [thread overview]
Message-ID: <20130817163848.GA2765@localhost> (raw)
In-Reply-To: <520EB5BC.4060102@wwwdotorg.org>
On Fri, Aug 16, 2013 at 05:29:00PM -0600, Stephen Warren wrote:
> On 08/15/2013 10:27 AM, Ezequiel Garcia wrote:
> ...
> > Armada XP
> > ---------
> >
> > Two clock sources are available for timer and watchdog counters:
> >
> > Just as explained for the Armada 370, the timer and watchdog counters decrement
> > rate is a configurable ratio of the L2/coherency fabric clock.
> > The current clocksource driver implementation chooses an abritrary ratio.
> >
> > In addition to this, both timer and watchdog counter rate can be configured
> > to use an (internal) 25 MHz fixed clock.
>
> So there are clearly two clocks fed into the HW block here. The DT
> should reflect that.
>
Right.
> > However, and as explained in this patchset, using the letter fixed clock is in
> > practice the only choice. Once CPUFreq support is implemented for the
> > Armada XP SoC the L2/coherency fabric clock will change its rate, and handling
> > such change will be problematic.
>
> It's not mandatory for an OS to implement cpufreq, so it'd be quite
> possible to still use that variable-rate clock on some HW. What SW
> may-or-may-not do on HW isn't something that should feed into the DT
> binding design.
>
Agreed.
> > Maybe the most accurate representation would be something like this...
> >
> > timer {
> > compatible = "marvell,armada-xp-timer";
> > reg = ...
> > interrupts = ...
> > clocks = ... /* either 25 MHz fixed clock
> > * or L2/coherency fabric clock */
> > };
>
> I think better would be:
>
> clocks = <&xxx ...> <&yyy ...>;
> clock-names = "fabric", "fixed";
>
> In the documentation for this HW block, there's a register that switches
> between the two clock sources. What names are used for the clocks in the
> documentation of that register? Those names should be used for
> clock-names entries.
>
Strictly speaking the documentation says the timer/watchdog counters
are incremented at a configurable rate of the "coherency fabric clock".
In addition, there's a register bit that enables/disables a
"25Mhz frequency" rate for each timer/watchdog.
The names between "" are the names used in the documentation: "coherency
fabric clock" and "25Mhz frequency" (yes, it's odd).
> Is the fact that one of "fabric" and "fixed" is variable and one
> fixed-rate more a facet of the integration of the IP block into the SoC,
> and not forced by the design of the IP block itself? If so, perhaps
> you'd want some additional properties indicating which of those clocks
> was fixed and which was variable, which would allow SW to make
> intelligent decisions re: which to use. Perhaps it can be assumed this
> information can be queried from the source of the clock though?
Not sure about this, but I think I agree with Tomasz Figa in that
this kind of details can be inside the driver.
--
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
next prev parent reply other threads:[~2013-08-17 16:38 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-13 14:43 [PATCH v4 0/6] Armada 370/XP clocksource fixes Ezequiel Garcia
2013-08-13 14:43 ` [PATCH v4 1/6] clocksource: armada-370-xp: Use BIT() Ezequiel Garcia
2013-08-13 14:43 ` [PATCH v4 2/6] clocksource: armada-370-xp: Simplify TIMER_CTRL register access Ezequiel Garcia
2013-08-13 14:43 ` [PATCH v4 3/6] clocksource: armada-370-xp: Use CLOCKSOURCE_OF_DECLARE Ezequiel Garcia
2013-08-13 14:43 ` [PATCH v4 4/6] clocksource: armada-370-xp: Introduce new compatibles Ezequiel Garcia
2013-08-13 14:43 ` [PATCH v4 5/6] clocksource: armada-370-xp: Fix device-tree binding Ezequiel Garcia
2013-08-14 15:26 ` Mark Rutland
2013-08-15 16:27 ` Ezequiel Garcia
2013-08-16 23:29 ` Stephen Warren
2013-08-17 12:09 ` Tomasz Figa
2013-08-17 12:29 ` Sebastian Hesselbarth
2013-08-17 12:34 ` Tomasz Figa
2013-08-17 16:43 ` Ezequiel Garcia
2013-08-18 23:33 ` Sebastian Hesselbarth
2013-08-18 23:01 ` Tomasz Figa
2013-08-19 16:39 ` Ezequiel Garcia
2013-08-19 1:35 ` Ezequiel Garcia
2013-08-17 16:38 ` Ezequiel Garcia [this message]
2013-08-13 14:43 ` [PATCH v4 6/6] ARM: mvebu: Fix the Armada 370/XP timer compatible strings Ezequiel Garcia
2013-08-13 19:26 ` Jason Cooper
2013-08-13 16:22 ` [PATCH v4 0/6] Armada 370/XP clocksource fixes Daniel Lezcano
2013-08-13 16:52 ` Jason Cooper
2013-08-13 17:48 ` Daniel Lezcano
2013-08-13 17:58 ` Jason Cooper
2013-08-13 18:04 ` Daniel Lezcano
2013-08-13 18:08 ` Jason Cooper
2013-08-20 12:44 ` Ezequiel Garcia
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=20130817163848.GA2765@localhost \
--to=ezequiel.garcia@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;
as well as URLs for NNTP newsgroup(s).