Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1211826
| From | Ramneek Mehresh <ramneek.mehresh@freescale.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH 3/8][v3]usb:fsl:otg: Add support to add/remove usb host driver |
| Date | 2015-08-24 08:20 +0200 |
| Message-ID | <q0TgR-7Oj-5@gated-at.bofh.it> (permalink) |
| References | <pZqJY-3Q7-23@gated-at.bofh.it> <pZyRc-7lc-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> -----Original Message-----
> From: Alan Stern [mailto:stern@rowland.harvard.edu]
> Sent: Thursday, August 20, 2015 7:40 PM
> To: Mehresh Ramneek-B31383 <ramneek.mehresh@freescale.com>
> Cc: linux-kernel@vger.kernel.org; balbi@ti.com;
> gregkh@linuxfoundation.org; linux-usb@vger.kernel.org; Li Yang-Leo-R58472
> <LeoLi@freescale.com>
> Subject: RE: [PATCH 3/8][v3]usb:fsl:otg: Add support to add/remove usb
> host driver
>
> On Thu, 20 Aug 2015, Ramneek Mehresh wrote:
>
> > > > --- a/drivers/usb/host/ehci-fsl.h
> > > > +++ b/drivers/usb/host/ehci-fsl.h
> > > > @@ -63,4 +63,22 @@
> > > > #define UTMI_PHY_EN (1<<9)
> > > > #define ULPI_PHY_CLK_SEL (1<<10)
> > > > #define PHY_CLK_VALID (1<<17)
> > > > +
> > > > +struct ehci_fsl {
> > > > +#ifdef CONFIG_PM
> > > > + /* Saved USB PHY settings, need to restore after deep sleep. */
> > > > + u32 usb_ctrl;
> > > > +#endif
> > >
> > > Do you need this #ifdef?
> > >
> > Yes, this is required for deep-sleep support...we need to save/restore
> controller
> > registers during deep-sleep when usb controller power is shut-off. Don't
> need this
> > during normal usb operation...saving/restoring usb controller registers in
> non deep-sleep
> > scenario will add unnecessary delays
>
> What I meant was, can you keep the "u32 usb_ctrl;" line but get rid of
> the "#ifdef CONFIG_PM" and "#endif" lines?
>
> Alan Stern
I do understand that. However, USB suspend/resume functionality work in context of
PM. Only in this context, we need to save/restore usb controller register
for deep-sleep functionality. If you see usage of this in ehci-fsl.c file, it's used in
ehci_fsl_drv_suspend() under CONFIG_PM to save USB CNTL register.
If I remove CONFIG_PM from struct ehci_fsl{}, I'll need to change the entire driver
also to make suspend and resume functionalities compile by default.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
RE: [PATCH 3/8][v3]usb:fsl:otg: Add support to add/remove usb host driver Ramneek Mehresh <ramneek.mehresh@freescale.com> - 2015-08-20 07:40 +0200
RE: [PATCH 3/8][v3]usb:fsl:otg: Add support to add/remove usb host driver Alan Stern <stern@rowland.harvard.edu> - 2015-08-20 16:20 +0200
RE: [PATCH 3/8][v3]usb:fsl:otg: Add support to add/remove usb host driver Ramneek Mehresh <ramneek.mehresh@freescale.com> - 2015-08-24 08:20 +0200
RE: [PATCH 3/8][v3]usb:fsl:otg: Add support to add/remove usb host driver Alan Stern <stern@rowland.harvard.edu> - 2015-08-24 16:40 +0200
csiph-web