diff mbox series

[2/7] usb: musb: omap2430: Wait on enable to avoid babble

Message ID 20191009212145.28495-3-tony@atomide.com (mailing list archive)
State New, archived
Headers show
Series musb host improvments mostly for omap2430 glue | expand

Commit Message

Tony Lindgren Oct. 9, 2019, 9:21 p.m. UTC
We can babble interrupt if we attempt to switch to USB host mode too
soon after enabling musb. Let's fix the issue by waiting a bit in
runtime_resume.

Cc: Jacopo Mondi <jacopo@jmondi.org>
Cc: Marcel Partap <mpartap@gmx.net>
Cc: Merlijn Wajer <merlijn@wizzup.org>
Cc: Michael Scott <hashcode0f@gmail.com>
Cc: NeKit <nekit1000@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/usb/musb/omap2430.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Sergei Shtylyov Oct. 10, 2019, 9:46 a.m. UTC | #1
Hello!

On 10.10.2019 0:21, Tony Lindgren wrote:

> We can babble interrupt if we attempt to switch to USB host mode too
         ^ verb missing?

> soon after enabling musb. Let's fix the issue by waiting a bit in
> runtime_resume.
> 
> Cc: Jacopo Mondi <jacopo@jmondi.org>
> Cc: Marcel Partap <mpartap@gmx.net>
> Cc: Merlijn Wajer <merlijn@wizzup.org>
> Cc: Michael Scott <hashcode0f@gmail.com>
> Cc: NeKit <nekit1000@gmail.com>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: Sebastian Reichel <sre@kernel.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
[...]

MBR, Sergei
Tony Lindgren Oct. 16, 2019, 3:39 p.m. UTC | #2
* Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> [191010 09:46]:
> Hello!
> 
> On 10.10.2019 0:21, Tony Lindgren wrote:
> 
> > We can babble interrupt if we attempt to switch to USB host mode too
>         ^ verb missing?

Thanks for catching it, it should say "We can get babble...".

Bin, do you need a resend of the whole series if no
other comments?

Regards,

Tony
diff mbox series

Patch

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -550,6 +550,9 @@  static int omap2430_runtime_resume(struct device *dev)
 	musb_writel(musb->mregs, OTG_INTERFSEL,
 		    musb->context.otg_interfsel);
 
+	/* Wait for musb to get oriented. Otherwise we can get babble */
+	usleep_range(200000, 250000);
+
 	return 0;
 }