From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: i.MX6: clk: Remove usbphy clock hacks
Date: Fri, 28 Feb 2014 11:12:47 +0100 [thread overview]
Message-ID: <20140228101246.GA17250@pengutronix.de> (raw)
In-Reply-To: <20140228004050.GA23189@shlinux1.ap.freescale.net>
On Fri, Feb 28, 2014 at 08:40:51AM +0800, Peter Chen wrote:
> On Thu, Feb 27, 2014 at 03:47:45PM +0100, Sascha Hauer wrote:
> > > portsc = PORTSC_PTS(PTS_UTMI) | PORTSC_PTW;
> > > lpm = DEVLC_PTS(PTS_UTMI) | DEVLC_PTW;
> > > break;
> > > case USBPHY_INTERFACE_MODE_ULPI:
> > > portsc = PORTSC_PTS(PTS_ULPI);
> > > lpm = DEVLC_PTS(PTS_ULPI);
> > > + ret = usb_phy_init(ci->transceiver);
> > > + if (ret)
> > > + return ret;
> > > break;
> > > case USBPHY_INTERFACE_MODE_SERIAL:
> > > portsc = PORTSC_PTS(PTS_SERIAL);
> > > lpm = DEVLC_PTS(PTS_SERIAL);
> > > sts = 1;
> > > + ret = usb_phy_init(ci->transceiver);
> > > + if (ret)
> > > + return ret;
> > > break;
> > > case USBPHY_INTERFACE_MODE_HSIC:
> > > + ret = usb_phy_init(ci->transceiver);
> > > + if (ret)
> > > + return ret;
> > > portsc = PORTSC_PTS(PTS_HSIC);
> > > lpm = DEVLC_PTS(PTS_HSIC);
> >
> > It seems you try to adjust the order in which PORTSC is configured and
> > the phy is initialized. Instead of ordering the phy setup and register
> > writes you just reorder some variable initializations.
> >
> > We discussed this back and forth here and think that the phy clock
> > should be enabled/disabled via runtime pm ops as needed by the chipidea
> > driver. Hacking the init order depending on the phy type like you did above
> > doesn't sound like a good plan.
> >
>
> The portsc.pts is only need to be set only time, at initialization routine,
> the same for phy init.
>
> After init finishes, we can control phy clock by runtime pm, it was what
> I did for PM patchset for chipidea driver.
I'm talking about runtime pm for the phy, not for the chipidea driver.
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 |
next prev parent reply other threads:[~2014-02-28 10:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-27 8:18 [PATCH] ARM: i.MX6: clk: Remove usbphy clock hacks Sascha Hauer
2014-02-27 12:06 ` Peter Chen
2014-02-27 14:47 ` Sascha Hauer
2014-02-28 0:40 ` Peter Chen
2014-02-28 10:12 ` Sascha Hauer [this message]
2014-03-03 1:58 ` Peter Chen
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=20140228101246.GA17250@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).