netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shawn Guo <shawn.guo@freescale.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: <davem@davemloft.net>, <gerg@snapgear.com>, <baruch@tkos.co.il>,
	<eric@eukrea.com>, <bryan.wu@canonical.com>,
	<r64343@freescale.com>, <B32542@freescale.com>,
	<lw@karo-electronics.de>, <w.sang@pengutronix.de>,
	<s.hauer@pengutronix.de>, <netdev@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 06/10] ARM: mx28: update clocks for dual fec support
Date: Tue, 4 Jan 2011 22:26:44 +0800	[thread overview]
Message-ID: <20110104142643.GB21274@freescale.com> (raw)
In-Reply-To: <20110104135818.GD25121@pengutronix.de>

Hi Uwe,

On Tue, Jan 04, 2011 at 02:58:18PM +0100, Uwe Kleine-König wrote:
> Hello Shawn,
> 
> On Tue, Jan 04, 2011 at 05:24:12PM +0800, Shawn Guo wrote:
> > Register clocks fec.0 and fec.1 for dual fec support.
> > 
> > Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
> > ---
> > Changes for v2:
> >  - Rebase the patch against patch below which gets fundamental
> >    clocks explicitly called in clk_enable.
> >    [PATCH v4] ARM: mxs: Change duart device to use amba-pl011
> >  - Register clocks fec.0 and fec.1 respectively than use wildcard
> >    NULL for both instances.
> > 
> >  arch/arm/mach-mxs/clock-mx28.c |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/arm/mach-mxs/clock-mx28.c b/arch/arm/mach-mxs/clock-mx28.c
> > index f20b254..f79587b 100644
> > --- a/arch/arm/mach-mxs/clock-mx28.c
> > +++ b/arch/arm/mach-mxs/clock-mx28.c
> > @@ -607,6 +607,7 @@ static struct clk_lookup lookups[] = {
> >  	/* for amba-pl011 driver */
> >  	_REGISTER_CLOCK("duart", NULL, uart_clk)
> >  	_REGISTER_CLOCK("fec.0", NULL, fec_clk)
> > +	_REGISTER_CLOCK("fec.1", NULL, fec_clk)
> Did you verify this works as intended?  I didn't and consider it
> possible that after
> 
> 	clk_enable("fec.0");
> 	clk_enable("fec.1");
> 	clk_disable("fec.1");
> 
> the clk is off.  Probably it just works, just want to prevent hard to
> find bugs ...
> 
The clk should not be off.  Looking at _REGISTER_CLOCK below, we are
registering both fec.0 and fec.1 on the same one fec_clk.  IOW, the
usecount of the clk is working to control the on/off of the clk.

#define _REGISTER_CLOCK(d, n, c) \
	{ \
		.dev_id = d, \
		.con_id = n, \
		.clk = &c, \
	},

-- 
Regards,
Shawn


  reply	other threads:[~2011-01-04 14:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-04  9:24 [PATCH v2 00/10] net/fec: add dual fec support for i.MX28 Shawn Guo
2011-01-04  9:24 ` [PATCH v2 01/10] net/fec: fix MMFR_OP type in fec_enet_mdio_write Shawn Guo
2011-01-04  9:24 ` [PATCH v2 02/10] net/fec: remove the use of "index" which is legacy Shawn Guo
2011-01-04  9:24 ` [PATCH v2 03/10] net/fec: add mac field into platform data and consolidate fec_get_mac Shawn Guo
2011-01-04  9:24 ` [PATCH v2 04/10] net/fec: improve pm for better suspend/resume Shawn Guo
2011-01-04  9:24 ` [PATCH v2 05/10] net/fec: add dual fec support for mx28 Shawn Guo
2011-01-04  9:59   ` Baruch Siach
2011-01-04 14:13     ` Shawn Guo
2011-01-04 15:07       ` Baruch Siach
2011-01-05  8:45       ` Sascha Hauer
2011-01-05  9:03         ` Uwe Kleine-König
2011-01-05  9:40           ` Shawn Guo
2011-01-04  9:24 ` [PATCH v2 06/10] ARM: mx28: update clocks for dual fec support Shawn Guo
2011-01-04 13:58   ` Uwe Kleine-König
2011-01-04 14:26     ` Shawn Guo [this message]
2011-01-04  9:24 ` [PATCH v2 07/10] ARM: mx28: add the second fec device registration Shawn Guo
2011-01-04  9:24 ` [PATCH v2 08/10] ARM: mxs: add ocotp read function Shawn Guo
2011-01-04  9:24 ` [PATCH v2 09/10] ARM: mx28: read fec mac address from ocotp Shawn Guo
2011-01-04  9:24 ` [PATCH v2 10/10] ARM: mxs: add initial pm support Shawn Guo

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=20110104142643.GB21274@freescale.com \
    --to=shawn.guo@freescale.com \
    --cc=B32542@freescale.com \
    --cc=baruch@tkos.co.il \
    --cc=bryan.wu@canonical.com \
    --cc=davem@davemloft.net \
    --cc=eric@eukrea.com \
    --cc=gerg@snapgear.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=lw@karo-electronics.de \
    --cc=netdev@vger.kernel.org \
    --cc=r64343@freescale.com \
    --cc=s.hauer@pengutronix.de \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=w.sang@pengutronix.de \
    /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).