From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] i.MX: drop secondary clocks
Date: Fri, 9 Mar 2012 17:09:22 +0100 [thread overview]
Message-ID: <20120309160922.GG3852@pengutronix.de> (raw)
In-Reply-To: <20314.5967.278184.187691@ipc1.ka-ro>
On Fri, Mar 09, 2012 at 03:44:31PM +0100, Lothar Wa?mann wrote:
> Hi,
>
> Sascha Hauer writes:
> > On Fri, Mar 09, 2012 at 12:47:58PM +0100, Lothar Wa?mann wrote:
> > > Hi,
> > >
> > > Sascha Hauer writes:
> > > > On Fri, Mar 09, 2012 at 10:32:30AM +0100, Lothar Wa?mann wrote:
> > > > > Hi,
> > > > >
> > > > > Sascha Hauer writes:
> > > > > > Hi All,
> > > > > >
> > > [...]
> > > > > I think that's a bad idea! Drivers should not have to know intimate
> > > > > details about the clock logic of the CPU core they are running on!
> > > >
> > > > They don't have to. There really are different clocks connected to the
> > > > devices. If for example you have a look eSDHC Block diagram in the
> > > > reference Manual you'll see that this has three clock inputs. All
> > > > we do is to tell the driver about these three clocks which are device
> > > > specific and not SoC specific. Which of these clocks are actually
> > > > gatetable varies from SoC to SoC. Also on some SoCs two of the three
> > > > clocks may be actually the same.
> > > >
> > > At least this should be done in a way that is independent from the
> > > name of the clock on a specific SoC, but is related to the function of
> > > the clock for the driver. Thus instead of e.g. CLK_IPG and CLK_PER use
> > > CLK_REG and CLK_BITRATE.
> >
> > 'per', 'ipg' and 'ahb' seems to be a common pattern with all i.MXs. Only
> > ahb is sometimes refered to as hclk. Do you also have a name for
> > ahb/hclk? I don't insist on specific names, in the end they are just
> > names and the pattern I used at least seems mostly consistent.
> >
> CLK_BUS?
>
> > I assume that any given device has a set of clocks as inputs which
> > should get device specific names. It's the job of the clock tree
> > to know which SoC clocks map to which device clocks. If now a newer
> > UART block has an additional clock, then we would depending on the
> > device id (fsl,imx7-uart) know that it requires the additional clock
> > and request it.
> >
> It's also not the business of a device driver to know any details
> about clock dependencies on a specific SoC.
> We probably really need a bus layer that can hide the details of the
> bus architecture and their corresponding clocks from the device
> drivers.
I agree there's room for improvements, but I don't want to make that a
dependency for the generic clock support.
Does anyone know which clocks are really worth to be turned off for
powermanement? I have no idea whether we really save power when we for
example turn off aips_tz1_clk.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2012-03-09 16:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-08 21:42 [RFC] i.MX: drop secondary clocks Sascha Hauer
2012-03-08 21:42 ` [PATCH 1/2] clk: Add helper to get/put arrays of clocks Sascha Hauer
2012-03-08 21:42 ` [PATCH 2/2] spi i.MX: do not depend on grouped clocks Sascha Hauer
2012-03-09 8:03 ` [RFC] i.MX: drop secondary clocks Shawn Guo
2012-03-09 9:32 ` Lothar Waßmann
2012-03-09 10:29 ` Sascha Hauer
2012-03-09 11:47 ` Lothar Waßmann
2012-03-09 14:20 ` Richard Zhao
2012-03-09 14:22 ` Sascha Hauer
2012-03-09 14:44 ` Lothar Waßmann
2012-03-09 16:09 ` Sascha Hauer [this message]
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=20120309160922.GG3852@pengutronix.de \
--to=s.hauer@pengutronix.de \
--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).