From: benh@kernel.crashing.org (Benjamin Herrenschmidt)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC,PATCH 1/7] arm: add a common struct clk
Date: Fri, 08 Jan 2010 21:01:13 +1100 [thread overview]
Message-ID: <1262944873.585.17.camel@pasglop> (raw)
In-Reply-To: <20100108094214.GA23420@n2100.arm.linux.org.uk>
On Fri, 2010-01-08 at 09:42 +0000, Russell King - ARM Linux wrote:
> What is clear from the clk API as implemented today is that what's
> right
> for one platform isn't right for another platform. That's why we have
> each platform implementing struct clk in their own way.
Such platforms would just not set CONFIG_HAVE_COMMON_STRUCT_CLK then.
I think what Jeremy is trying to achieve is a way for platforms that
which to use the device-tree to retrieve the clock binding to be able to
chose to do so, using as much common code as possible.
The problem with the more "static" variants of struct clk is that while
they are probably fine for a single SoC with a reasonably unified clock
mechanism, having more than one clock source programmed differently and
wanting to deal with potentially out-of-SoC clock links between devices
becomes quickly prohibitive without function pointers.
The moment you start having function pointers, you may as well have a
common infrastructure for "indirect" clk ops since that eases code
re-use. Which you do already in some of the ARM platforms afaik.
For example, while discussing the porting of struct clk to powerpc a
while back with some ARM folks, some people told me one issue they had
was to use it to represent clocks between an external i2c PLL chip and
an external device.
Such a scenario becomes trivial to deal with using the device-tree, as
the i2c clock provider "registers" with the device-tree aware clock
infrastructure, which will then transparently, bind the device to the
clock provider and provide the right struct clk to the device.
But again, if a platform choice to use or not to use that facility. If a
platform prefers not to use the facility, for example for performances
reasons, or because of a lot of existing code which would be hard to
update or not worth changing, that platform then just needs to not set
CONFIG_HAVE_COMMON_STRUCT_CLK.
Cheers,
Ben.
next prev parent reply other threads:[~2010-01-08 10:01 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-07 23:44 [RFC,PATCH 1/7] arm: add a common struct clk Jeremy Kerr
2010-01-07 23:44 ` [RFC,PATCH 5/7] arm/realview: use generic " Jeremy Kerr
2010-01-07 23:44 ` [RFC,PATCH 7/7] arm/icst307: remove icst307_ps_to_vco Jeremy Kerr
2010-01-07 23:44 ` [RFC,PATCH 2/7] arm: generic support for fixed-rate clocks Jeremy Kerr
2010-01-07 23:44 ` [RFC,PATCH 4/7] arm/versatile: remove oscoff from clk_versatile Jeremy Kerr
2010-01-07 23:44 ` [RFC, PATCH 6/7] arm/icst307: use common struct clk, unify realview and versatile clocks Jeremy Kerr
2010-01-08 1:11 ` H Hartley Sweeten
2010-01-08 1:35 ` Jeremy Kerr
2010-01-07 23:44 ` [RFC,PATCH 3/7] arm/versatile: use generic struct clk Jeremy Kerr
2010-01-08 0:30 ` [RFC,PATCH 1/7] arm: add a common " H Hartley Sweeten
2010-01-08 1:20 ` Jeremy Kerr
2010-01-08 3:26 ` Jeremy Kerr
2010-01-08 9:42 ` Russell King - ARM Linux
2010-01-08 10:01 ` Benjamin Herrenschmidt [this message]
2010-01-08 11:18 ` Russell King - ARM Linux
2010-01-08 11:45 ` Benjamin Herrenschmidt
2010-01-08 12:59 ` Russell King - ARM Linux
2010-01-08 19:45 ` Benjamin Herrenschmidt
2010-01-11 3:37 ` Jeremy Kerr
2010-01-12 8:00 ` Francesco VIRLINZI
2010-01-12 8:50 ` Benjamin Herrenschmidt
2010-01-08 16:25 ` H Hartley Sweeten
2010-01-08 19:33 ` Benjamin Herrenschmidt
2010-01-08 1:17 ` Benjamin Herrenschmidt
2010-01-08 1:38 ` Jeremy Kerr
2010-01-11 5:38 ` Jeremy Kerr
2010-01-11 10:46 ` Mark Brown
2010-01-11 19:48 ` Benjamin Herrenschmidt
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=1262944873.585.17.camel@pasglop \
--to=benh@kernel.crashing.org \
--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).