From: Niilo Minkkinen <ext-niilo.1.minkkinen@nokia.com>
Date: Mon, 18 May 2009 14:54:16 +0000 (+0300)
Subject: usb: musb: disable OTG AUTOIDLE only with omap3430
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9a4b5e36ce58febdd2039dd4d129ee7edf4f5536;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git

usb: musb: disable OTG AUTOIDLE only with omap3430

Omap3 MUSB AUTOIDLE functionality configured through OTG_SYSCONFIG
register prevents the device from going into retention.
This is a workaround (by Richard Woodruff/TI), as his comment :
> A new MUSB bug which is a match to data below was identified very
> recently (on hardware and in simulation).
> This bug is in 3430 and not 3630.
> As a priority test (and as new default) you should have engineers
> disable autoidle for MUSB block.
> This is the workaround which will show up in next errata.

Signed-off-by: Niilo Minkkinen <ext-niilo.1.minkkinen@nokia.com>
Signed-off-by: Richard Woodruff <r-woodruff2@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 48930f25c450..34875201ee04 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -227,7 +227,12 @@ int __init musb_platform_init(struct musb *musb)
 	l &= ~AUTOIDLE;		/* disable auto idle */
 	l &= ~NOIDLE;		/* remove possible noidle */
 	l |= SMARTIDLE;		/* enable smart idle */
-	l |= AUTOIDLE;		/* enable auto idle */
+	/*
+	 * MUSB AUTOIDLE don't work in 3430.
+	 * Workaround by Richard Woodruff/TI
+	 */
+	if (!cpu_is_omap3430())
+		l |= AUTOIDLE;		/* enable auto idle */
 	omap_writel(l, OTG_SYSCONFIG);
 
 	l = omap_readl(OTG_INTERFSEL);