diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/usb-musb.c | 20 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/usb.h | 6 |
3 files changed, 20 insertions, 8 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 */ | ||
diff --git a/arch/arm/plat-omap/include/mach/usb.h b/arch/arm/plat-omap/include/mach/usb.h index 69f0ceed500b..f337e1761e2c 100644 --- a/arch/arm/plat-omap/include/mach/usb.h +++ b/arch/arm/plat-omap/include/mach/usb.h | |||
@@ -27,13 +27,7 @@ | |||
27 | #define UDC_BASE OMAP2_UDC_BASE | 27 | #define UDC_BASE OMAP2_UDC_BASE |
28 | #define OMAP_OHCI_BASE OMAP2_OHCI_BASE | 28 | #define OMAP_OHCI_BASE OMAP2_OHCI_BASE |
29 | 29 | ||
30 | #ifdef CONFIG_USB_MUSB_SOC | ||
31 | extern void usb_musb_init(void); | 30 | extern void usb_musb_init(void); |
32 | #else | ||
33 | static inline void usb_musb_init(void) | ||
34 | { | ||
35 | } | ||
36 | #endif | ||
37 | 31 | ||
38 | #endif | 32 | #endif |
39 | 33 | ||