aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorPeter 'p2' De Schrijver <peter.de-schrijver@nokia.com>2009-01-19 12:09:22 -0500
committerKevin Hilman <khilman@deeprootsystems.com>2009-05-28 13:59:09 -0400
commit94a3ef6f2888ae995a8d112e277ed8465a9457fb (patch)
treee5ffaac8e9da9200faeae481f052b06e41ae8b99 /arch/arm/mach-omap2
parent01cbd4d11558e2e4c10f14bb8aecd799b22bca35 (diff)
OMAP3: PM: Ensure MUSB block can idle when driver not loaded
Otherwise, bootloaders may leave MUSB in a state which prevents retention. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/Makefile2
-rw-r--r--arch/arm/mach-omap2/usb-musb.c20
2 files changed, 20 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 6fd1c1f77398..3935a359e7e9 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -57,6 +57,4 @@ obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \
57 mmc-twl4030.o 57 mmc-twl4030.o
58 58
59# Platform specific device init code 59# Platform specific device init code
60ifeq ($(CONFIG_USB_MUSB_SOC),y)
61obj-y += usb-musb.o 60obj-y += usb-musb.o
62endif
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index 215d463b70e3..d85296dc896c 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -31,6 +31,17 @@
31#include <mach/mux.h> 31#include <mach/mux.h>
32#include <mach/usb.h> 32#include <mach/usb.h>
33 33
34#define OTG_SYSCONFIG (OMAP34XX_HSUSB_OTG_BASE + 0x404)
35
36static void __init usb_musb_pm_init(void)
37{
38 /* Ensure force-idle mode for OTG controller */
39 if (cpu_is_omap34xx())
40 omap_writel(0, OTG_SYSCONFIG);
41}
42
43#ifdef CONFIG_USB_MUSB_SOC
44
34static struct resource musb_resources[] = { 45static struct resource musb_resources[] = {
35 [0] = { /* start and end set dynamically */ 46 [0] = { /* start and end set dynamically */
36 .flags = IORESOURCE_MEM, 47 .flags = IORESOURCE_MEM,
@@ -183,4 +194,13 @@ void __init usb_musb_init(void)
183 printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n"); 194 printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
184 return; 195 return;
185 } 196 }
197
198 usb_musb_pm_init();
199}
200
201#else
202void __init usb_musb_init(void)
203{
204 usb_musb_pm_init();
186} 205}
206#endif /* CONFIG_USB_MUSB_SOC */