From: shawn.guo@freescale.com (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3] ARM: ls1021a: add gating clocks to IP blocks.
Date: Fri, 26 Sep 2014 09:57:14 +0800 [thread overview]
Message-ID: <20140926015713.GG21077@dragon> (raw)
In-Reply-To: <e44a1930e8de43ec8beb6e60fa9c1e9e@BY2PR0301MB0613.namprd03.prod.outlook.com>
On Thu, Sep 25, 2014 at 05:22:29PM +0800, Xiubo Li-B47053 wrote:
...
> > > + clks[LS1021A_CLK_FLEXTIMER1_EN] = ls1021a_clk_gate("flextimer1_en",
> > > + "dummy", DCFG_CCSR_DEVDISR5,
> > > + ls1021a_clk_shift(31));
> >
> > So "dummy" and ls1021a_clk_shift() are two common things for every
> > single call of ls1021a_clk_gate(). Can we handle them in
> > ls1021a_clk_gate() wrapper, so that we can make these calls a bit
> > shorter?
> >
>
> There one gate has one parent.
Ah, yes. I missed that.
> If the 'big-endian' will as default, I think ls1021a_clk_gate() could be handled
> In ls1021a_clk_gate() wrapper to simplify the code.
Yes, that's what I meant.
...
> > > +static inline struct clk *ls1021a_clk_gate(const char *name, const char
> > *parent,
> > > + void __iomem *reg, u8 shift)
> > > +{
> > > + return clk_register_gate(NULL, name, parent, CLK_SET_RATE_PARENT |
> >
> > As the parent of the clocks registered by this function is "dummy" from
> > what I see, what is the point of setting flag CLK_SET_RATE_PARENT then?
> >
> > > + CLK_IGNORE_UNUSED, reg, shift,
> >
> > Why flag CLK_IGNORE_UNUSED?
> >
>
> As the SoC reference manual all the IP blocks will be enabled when powered up.
> But the Linux OS will disable all the IP blocks' clocks as default without this.
>
> For now, this gate driver will only used for PM support of some IP blocks. For the
> Others needed to be enabled as default.
Ok, got it. I'm fine with the flag then, and we can remove it after all
those client devices manage their clocks well.
Shawn
next prev parent reply other threads:[~2014-09-26 1:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 12:44 [PATCH v3] ARM: ls1021a: add gating clocks to IP blocks Xiubo Li
2014-09-25 8:54 ` Shawn Guo
2014-09-25 9:22 ` Li.Xiubo at freescale.com
2014-09-26 1:57 ` Shawn Guo [this message]
2014-09-26 3:14 ` Li.Xiubo at freescale.com
2014-10-16 2:30 ` Li.Xiubo at freescale.com
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=20140926015713.GG21077@dragon \
--to=shawn.guo@freescale.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).