From: Peter Chen <peter.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org,
rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org,
rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org,
balbi-l0cyMroinI0@public.gmane.org,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
marex-ynQEQJNshbs@public.gmane.org,
mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
m.grzeschik-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
matt-sEEEE4iEDtaXzmuOJsdVMQ@public.gmane.org,
maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org
Subject: Re: [PATCH v2 1/4] ARM i.MX6: use reserved bit for mxs phy clock gate
Date: Wed, 16 Jan 2013 10:10:37 +0800 [thread overview]
Message-ID: <20130116021035.GE16514@nchen-desktop> (raw)
In-Reply-To: <20130116014855.GA8118-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
On Wed, Jan 16, 2013 at 09:48:57AM +0800, Shawn Guo wrote:
> On Wed, Jan 16, 2013 at 09:18:46AM +0800, Peter Chen wrote:
> > On Tue, Jan 15, 2013 at 07:33:16PM +0800, Shawn Guo wrote:
> > > On Tue, Jan 15, 2013 at 02:08:34PM +0800, Peter Chen wrote:
> > > > For mxs-phy user i.mx6q, the PHY's clock is controlled by
> > > > hardware automatically, the software only needs to enable it
> > > > at probe, disable it at remove. During the runtime,
> > > > we don't need to control it. So for the usbphy clk policy:
> > > >
> > > > - Keep refcount for usbphy as clk framework needs to know if
> > > > it is off or on.
> > >
> I thought it might be okay to access anatop for enabling the clock in
> usb driver. But I found it's just too ugly to do that when I look at
> the code a little bit closer. I prefer to keep clock driver unchanged
> and just call clk_prepare_enable() at platform level to enable the
> clock. I really dislike the code accessing anatop for enabling the
> clock. That's the part different from you v1 patch.
It is a way, but how to consolidate other mxx-phy users, like mx28.
It needs to call clk_prepare_enable runtime.
>
> > I send the v2 patch due to below reasons,
> > There are other PLL3 users, it is better keep refcount
> > to all its children, or the user will be confused when the
> > PLL3 goes to disable, but the usb otg part is still used
> >
> This is the part I'm not sure how it works. You said, the PLL will be
> managed by hardware during USB suspend/resume. I assume that it means
> the PLL will be powered off when USB suspends and be powered on when
> USB resumes. If that's the case, how other users of the PLL work when
> PLL is powered off by USB hardware.
It is a little complicated:
You can understand both PLL7 and PLL3 like below:
PLL_POWER_BIT && usb_is_not_suspend
For PLL7: USB host 1 is the only user, so we can keep PLL7_POWER_BIT is always on
and let the usb hardware controller it automatically. Other way is let the
clock framework and usb hardware controller it together.
For PLL3, as there are other users, so software must control PLL3_POWER_BIT,
or the PLL3 will be off if the usb enters suspend.
This PLL_POWER_BIT is not related to usbphy clock gate, this power bit can be
usbphy's parent.
>
> Shawn
>
> > For PLL7, we can do it, and let the PLL7 be out of clock framework
> > management.
> >
> > But I still think keep usbphy as PLL child is better solution,
> > in that case, the clock maintainer can know the real clock usage.
> >
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2013-01-16 2:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-15 6:08 [PATCH v2 1/4] ARM i.MX6: use reserved bit for mxs phy clock gate Peter Chen
[not found] ` <1358230117-19443-1-git-send-email-peter.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2013-01-15 6:08 ` [PATCH v2 2/4] usb: mxs-phy: change clock usage for i.mx6q Peter Chen
2013-01-15 6:08 ` [PATCH v2 3/4] usb: mxs-phy: add set_suspend API Peter Chen
2013-01-15 6:08 ` [PATCH v2 4/4] usb: chipidea: imx: Add system suspend/resume API Peter Chen
2013-01-15 11:33 ` [PATCH v2 1/4] ARM i.MX6: use reserved bit for mxs phy clock gate Shawn Guo
2013-01-16 1:18 ` Peter Chen
2013-01-16 1:48 ` Shawn Guo
[not found] ` <20130116014855.GA8118-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2013-01-16 2:10 ` Peter Chen [this message]
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=20130116021035.GE16514@nchen-desktop \
--to=peter.chen-kzfg59tc24xl57midrcfdg@public.gmane.org \
--cc=alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=m.grzeschik-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=marex-ynQEQJNshbs@public.gmane.org \
--cc=matt-sEEEE4iEDtaXzmuOJsdVMQ@public.gmane.org \
--cc=maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
--cc=shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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).