lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 26 Sep 2014 09:57:14 +0800
From:	Shawn Guo <shawn.guo@...escale.com>
To:	Xiubo Li-B47053 <Li.Xiubo@...escale.com>
CC:	"shawn.guo@...aro.org" <shawn.guo@...aro.org>,
	"mark.rutland@....com" <mark.rutland@....com>,
	"u.kleine-koenig@...gutronix.de" <u.kleine-koenig@...gutronix.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v3] ARM: ls1021a: add gating clocks to IP blocks.

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ