From: mturquette@ti.com (Mike Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: common clock framework
Date: Tue, 22 May 2012 11:57:17 -0700 [thread overview]
Message-ID: <20120522185717.GA4386@gmail.com> (raw)
In-Reply-To: <AAD1C6EB06EE3649B35B7E026785068D1A74B2C270@SC-VEXCH2.marvell.com>
On 20120518-01:41, Chao Xie wrote:
> Issue 2: clock with dependency As we know that each vendor may have
> some version of SOCs, and these SOC may share some same components.
> For example, device a need function clock A while device B need
> function clock B, there share some bus, and there a clock for the bus
> clock gating. It means that if we want device B working, we need
> enable clock B and clock bus. In fact, we can not consider that clock
> bus is the parent of clock A/B, because clock A/B has inputs from
> PLLs. So how do we control these clocks? If leaving the dependency in
> clock tree, we need additional patch for it. If leaving it to device
> driver, it will make the device driver to know more details about
> clock framework, and for different SOCs share same device driver, the
> clock framework may not same. So it will make the device driver to be
> SOCs depended, and will need more detailed platform data.
This has been discussed in this thread already. Functional dependencies
are outside the scope of the clock framework.
The brute force solution is to put a clk_prepare_enable() call for both
the functional clock and the bus clock in your driver. A better
approach (and one employed in the OMAP platform code) is to abstract
away these details from the drivers. OMAP uses the pm_runtime
framework which makes life easier for drivers by simply calling
pm_runtime_get/pm_runtime_put, which takes care of functional clocks as
well as bus clocks (and other stuff).
The details of the callbacks used by the pm_runtime framework can be
different for each SoC, which addresses your concerns above.
I agree that the details of bus clocks should be abstracted away
somewhere, but the clock framework is not the place for that.
Regards,
Mike
next prev parent reply other threads:[~2012-05-22 18:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-04 2:02 common clock framework Chao Xie
2012-05-04 8:21 ` Sascha Hauer
2012-05-04 8:45 ` Chao Xie
2012-05-04 9:15 ` Russell King - ARM Linux
2012-05-04 10:20 ` Sascha Hauer
2012-05-04 23:08 ` Turquette, Mike
2012-05-05 8:28 ` Sascha Hauer
2012-05-05 17:44 ` Turquette, Mike
2012-05-08 9:01 ` Mark Brown
2012-05-08 17:29 ` Turquette, Mike
[not found] ` <CAG9bXv=T7v_MBUOmCsp4n0SNmYY_DOEkhQXAp0rTGpdi6KkXNA@mail.gmail.com>
2012-05-06 23:49 ` Mike Turquette
2012-05-07 3:49 ` Raul Xiong
[not found] ` <AAD1C6EB06EE3649B35B7E026785068D1A74B2C256@SC-VEXCH2.marvell.com>
[not found] ` <A63A0DC671D719488CD1A6CD8BDC16CF1A0F044EB4@SC-VEXCH4.marvell.com>
[not found] ` <53612FE6B944314AAADB181E45A45B6413D3FF9F37@sc-vexch3.marvell.com>
2012-05-18 8:41 ` Chao Xie
2012-05-22 18:57 ` Mike Turquette [this message]
2012-05-22 19:11 ` Mike Turquette
2012-06-14 13:09 ` Lei Wen
[not found] <AAD1C6EB06EE3649B35B7E026785068D1A749F0DB6@SC-VEXCH2.marvell.com>
[not found] ` <CAJOA=zPAy3AV6Dg9sE+fro1ZCmbxeCH8aeR5-YqffZphRkUQMQ@mail.gmail.com>
[not found] ` <AAD1C6EB06EE3649B35B7E026785068D1A749F10CC@SC-VEXCH2.marvell.com>
2012-04-25 4:40 ` Turquette, Mike
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=20120522185717.GA4386@gmail.com \
--to=mturquette@ti.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).