All of lore.kernel.org
 help / color / mirror / Atom feed
From: B19295@freescale.com (Lin Tony-B19295)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/7] add usb phy clocks to clock tree
Date: Fri, 22 Jul 2011 06:02:00 +0000	[thread overview]
Message-ID: <97D3A72708D04647A5AC84A04996E5B51622DF@039-SN1MPN1-006.039d.mgd.msft.net> (raw)
In-Reply-To: <20110720191034.GL26347@pengutronix.de>

> -----Original Message-----
> From: Sascha Hauer [mailto:s.hauer at pengutronix.de]
> Sent: Thursday, July 21, 2011 3:11 AM
> To: Lin Tony-B19295
> Cc: linux-usb at vger.kernel.org; koen.beel.barco at gmail.com; balbi at ti.com;
> linux-arm-kernel at lists.infradead.org
> Subject: Re: [PATCH 3/7] add usb phy clocks to clock tree
> 
> On Wed, Jul 20, 2011 at 07:08:22PM +0800, Tony Lin wrote:
> > Signed-off-by: Tony Lin <tony.lin@freescale.com>
> > ---
> >  arch/arm/mach-mxs/clock-mx28.c |   18 ++++++++++++++++++
> >  1 files changed, 18 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/mach-mxs/clock-mx28.c
> > b/arch/arm/mach-mxs/clock-mx28.c index 5dcc59d..6fd0fe6 100644
> > --- a/arch/arm/mach-mxs/clock-mx28.c
> > +++ b/arch/arm/mach-mxs/clock-mx28.c
> > @@ -570,7 +570,23 @@ static struct clk usb1_clk = {
> >  	.disable = _raw_clk_disable,
> >  	.parent = &pll1_clk,
> >  };
> > +/* usb phy clock for usb0 */
> > +static struct clk usb_phy_clk0 = {
> > +	.parent = &pll0_clk,
> > +	.enable = _raw_clk_disable, /* EN_USB_CLKS = 1 means ON */
> > +	.disable = _raw_clk_enable,
> > +	.enable_reg = CLKCTRL_BASE_ADDR + HW_CLKCTRL_PLL0CTRL0,
> > +	.enable_shift = 18,
> > +};
> >
> > +/* usb phy clock for usb1 */
> > +static struct clk usb_phy_clk1 = {
> > +	.parent = &pll1_clk,
> > +	.enable = _raw_clk_disable,
> > +	.disable = _raw_clk_enable,
> > +	.enable_reg = CLKCTRL_BASE_ADDR + HW_CLKCTRL_PLL1CTRL0,
> > +	.enable_shift = 18,
> > +};
> >  #define _DEFINE_CLOCK(name, er, es, p)					\
> >  	static struct clk name = {					\
> >  		.enable_reg	= CLKCTRL_BASE_ADDR + HW_CLKCTRL_##er,	\
> > @@ -629,6 +645,8 @@ static struct clk_lookup lookups[] = {
> >  	_REGISTER_CLOCK("flexcan.1", NULL, can1_clk)
> >  	_REGISTER_CLOCK(NULL, "usb0", usb0_clk)
> >  	_REGISTER_CLOCK(NULL, "usb1", usb1_clk)
> > +	_REGISTER_CLOCK(NULL, "usb0_phy", usb_phy_clk0)
> > +	_REGISTER_CLOCK(NULL, "usb1_phy", usb_phy_clk1)
> 
> This looks suspicious. The phys are real devices, but this shows you do
> not intend to use them as devices. Really the phys should be drivers.
> 
> Sascha
> 
Hi Sascha:

	I didn't get it. Shouldn't I register PHY clocks here?
'_REGISTER_CLOCK("mxc-ehci.0", "usb_phy1", usb_phy1_clk)'
	This is what mx51/53 did in clock-mx51-mx53.c

BR
Tony


> >  	_REGISTER_CLOCK("mxs-pwm.0", NULL, pwm_clk)
> >  	_REGISTER_CLOCK("mxs-pwm.1", NULL, pwm_clk)
> >  	_REGISTER_CLOCK("mxs-pwm.2", NULL, pwm_clk)
> > --
> > 1.7.0.4
> >
> >
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> >
> 
> --
> 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
> |

  reply	other threads:[~2011-07-22  6:02 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-20 11:08 [PATCH 0/7] ARM: mx28: add usb host function Tony Lin
2011-07-20 10:57 ` Felipe Balbi
2011-07-20 11:08 ` [PATCH 1/7] consolidate definitions and structures to share among platforms Tony Lin
2011-07-20 10:59   ` Felipe Balbi
2011-07-20 11:03     ` Lin Tony-B19295
2011-07-20 11:16       ` Felipe Balbi
2011-07-20 11:21         ` Lin Tony-B19295
2011-07-20 11:08 ` [PATCH 2/7] enable usb1 phy power supply Tony Lin
2011-07-20 11:01   ` Felipe Balbi
2011-07-20 11:41   ` Wolfram Sang
2011-07-22  2:16     ` Lin Tony-B19295
2011-07-20 19:08   ` Sascha Hauer
2011-07-22  2:20     ` Lin Tony-B19295
2011-07-20 11:08 ` [PATCH 3/7] add usb phy clocks to clock tree Tony Lin
2011-07-20 11:02   ` Felipe Balbi
2011-07-20 11:05     ` Lin Tony-B19295
2011-07-20 19:10   ` Sascha Hauer
2011-07-22  6:02     ` Lin Tony-B19295 [this message]
2011-07-22  9:18       ` Sascha Hauer
2011-07-20 11:08 ` [PATCH 4/7] mx28: add usb host phy functions Tony Lin
2011-07-20 11:12   ` Felipe Balbi
2011-07-20 19:26   ` Sascha Hauer
2011-07-22  2:23     ` Lin Tony-B19295
2011-07-21  6:04   ` Lothar Waßmann
2011-07-20 11:08 ` [PATCH 5/7] ehci mxc: make it more flexible to be used for mx28 Tony Lin
2011-07-20 11:05   ` Arnaud Patard (Rtp)
2011-07-20 11:08     ` Lin Tony-B19295
2011-07-20 11:45       ` Wolfram Sang
2011-07-20 11:14   ` Felipe Balbi
2011-07-20 11:21     ` Lin Tony-B19295
2011-07-20 11:23       ` Felipe Balbi
2011-07-20 11:25         ` Lin Tony-B19295
2011-07-20 11:27           ` Felipe Balbi
2011-07-20 13:59   ` Alan Stern
2011-07-22  5:18     ` Lin Tony-B19295
2011-07-20 19:41   ` Sascha Hauer
2011-07-20 11:08 ` [PATCH 6/7] add macro definitions according to ehci-mxc driver change Tony Lin
2011-07-20 19:43   ` Sascha Hauer
2011-07-21  6:06   ` Lothar Waßmann
2011-07-20 11:08 ` [PATCH 7/7] add usb host function to default config Tony Lin
2011-07-20 20:07 ` [PATCH 0/7] ARM: mx28: add usb host function Sascha Hauer

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=97D3A72708D04647A5AC84A04996E5B51622DF@039-SN1MPN1-006.039d.mgd.msft.net \
    --to=b19295@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.