From: pwalmsley@nvidia.com (Paul Walmsley)
To: linux-arm-kernel@lists.infradead.org
Subject: regression: Clock changes in next-20141205 break at least omap4
Date: Tue, 16 Dec 2014 13:01:17 -0700 [thread overview]
Message-ID: <54908F8D.2020202@nvidia.com> (raw)
In-Reply-To: <5490816E.7060706@codeaurora.org>
+ Tero
On 12/16/2014 12:01 PM, Stephen Boyd wrote:
> On 12/15/2014 05:31 PM, Paul Walmsley wrote:
>> I just took a quick glance at Tero's second patch, and it looks like a
>> hack to me. Better to fix the problem in the core CCF code if
>> possible. I don't think there's any reason why a PLL couldn't have
>> just one parent clock. But I'm fine with merging it as a short-term
>> fix if fixing the core code is difficult or risky.
> Can you describe what's wrong?
Took a closer look at it, at your prompting.
The first observation is that the issue seems to be limited to
TI-specific clock code in drivers/clk/ti. So nothing to worry about in
terms of the CCF core, it looks.
The second observation is that this appears to only be a problem due to
the current DT data in arch/arm/boot/dts/omap3xxx-clocks.dtsi:
dpll3_ck: dpll3_ck {
#clock-cells = <0>;
compatible = "ti,omap3-dpll-core-clock";
clocks = <&sys_ck>, <&sys_ck>;
reg = <0x0d00>, <0x0d20>, <0x0d40>, <0x0d30>;
};
It lists two entries for the "clocks" node for some reason.
of_ti_dpll_setup() only seems to require one.
So unless there's some good reason to list two of them in the DTS file,
the right fix would probably have been to fix the DT data.
> Does the PLL have a mux with two inputs that map to the same clock?
>
I don't think so.
...
Generally speaking, I suspect the way we model PLLs isn't quite right
(although it's been a while since I've looked at that particular code).
This was probably my fault, in the final analysis, for taking a shortcut
here a long time ago.
Unless one wishes to implement support for multiple clock parents, it's
probably not quite right to state that a PLL's reference clock is a
"parent" in a clock tree sense. When a PLL is active, the output clock
originates from a VCO of some kind that is internal to the PLL. The
reference clock is just used by the PLL internal logic to close the
control loop. Some PLL-like clock sources use a third clock that is
used to clock some of the PLL's internal logic (let's call this a
"functional clock.")
So the reference clock and functional clock are (usually) required by
the PLL to operate, and should therefore be required by the PLL clock
driver code in the kernel; but one could claim that they aren't
technically parent clocks of the PLL in a clock tree sense, since the
downstream output clock isn't directly derived from either of those clocks.
Otherwise if we want to represent those clocks accurately in the Linux
clock tree, we probably need to state that clocks can have multiple
"parents" that often need to be active simultaneously, and we should
propagate usecount changes accordingly up all of the parent paths.
...
Anyway, thanks for following up on this,
- Paul
next prev parent reply other threads:[~2014-12-16 20:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-05 16:55 regression: Clock changes in next-20141205 break at least omap4 Tony Lindgren
2014-12-05 18:21 ` Stephen Boyd
2014-12-05 18:38 ` Tony Lindgren
[not found] ` <20141212194238.20398.33333@quantum>
[not found] ` <alpine.DEB.2.02.1412122310570.29716@utopia.booyaka.com>
[not found] ` <20141215220224.20398.98259@quantum>
2014-12-16 0:21 ` Paul Walmsley
2014-12-16 0:38 ` Tony Lindgren
2014-12-16 1:31 ` Paul Walmsley
2014-12-16 19:01 ` Stephen Boyd
2014-12-16 20:01 ` Paul Walmsley [this message]
2014-12-16 20:23 ` Russell King - ARM Linux
2014-12-16 20:45 ` Paul Walmsley
2014-12-16 20:57 ` Russell King - ARM Linux
2014-12-16 22:25 ` Paul Walmsley
2014-12-17 9:52 ` Lucas Stach
2014-12-17 11:59 ` Tero Kristo
2014-12-19 16:45 ` Paul Walmsley
2014-12-18 19:23 ` Paul Walmsley
2014-12-18 23:37 ` Mike Turquette
2014-12-19 2:15 ` Paul Walmsley
2014-12-20 0:23 ` Mike Turquette
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=54908F8D.2020202@nvidia.com \
--to=pwalmsley@nvidia.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).