diff options
author | Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com> | 2009-01-19 12:09:22 -0500 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-05-28 13:59:09 -0400 |
commit | 94a3ef6f2888ae995a8d112e277ed8465a9457fb (patch) | |
tree | e5ffaac8e9da9200faeae481f052b06e41ae8b99 /arch/arm/mach-omap2 | |
parent | 01cbd4d11558e2e4c10f14bb8aecd799b22bca35 (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/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/usb-musb.c | 20 |
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 |
60 | ifeq ($(CONFIG_USB_MUSB_SOC),y) | ||
61 | obj-y += usb-musb.o | 60 | obj-y += usb-musb.o |
62 | endif | ||
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 | |||
36 | static 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 | |||
34 | static struct resource musb_resources[] = { | 45 | static 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 | ||
202 | void __init usb_musb_init(void) | ||
203 | { | ||
204 | usb_musb_pm_init(); | ||
186 | } | 205 | } |
206 | #endif /* CONFIG_USB_MUSB_SOC */ | ||