Commit 94a3ef6f authored by Peter 'p2' De Schrijver's avatar Peter 'p2' De Schrijver Committed by Kevin Hilman

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: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent 01cbd4d1
...@@ -57,6 +57,4 @@ obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \ ...@@ -57,6 +57,4 @@ obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \
mmc-twl4030.o mmc-twl4030.o
# Platform specific device init code # Platform specific device init code
ifeq ($(CONFIG_USB_MUSB_SOC),y)
obj-y += usb-musb.o obj-y += usb-musb.o
endif
...@@ -31,6 +31,17 @@ ...@@ -31,6 +31,17 @@
#include <mach/mux.h> #include <mach/mux.h>
#include <mach/usb.h> #include <mach/usb.h>
#define OTG_SYSCONFIG (OMAP34XX_HSUSB_OTG_BASE + 0x404)
static void __init usb_musb_pm_init(void)
{
/* Ensure force-idle mode for OTG controller */
if (cpu_is_omap34xx())
omap_writel(0, OTG_SYSCONFIG);
}
#ifdef CONFIG_USB_MUSB_SOC
static struct resource musb_resources[] = { static struct resource musb_resources[] = {
[0] = { /* start and end set dynamically */ [0] = { /* start and end set dynamically */
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
...@@ -183,4 +194,13 @@ void __init usb_musb_init(void) ...@@ -183,4 +194,13 @@ void __init usb_musb_init(void)
printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n"); printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
return; return;
} }
usb_musb_pm_init();
}
#else
void __init usb_musb_init(void)
{
usb_musb_pm_init();
} }
#endif /* CONFIG_USB_MUSB_SOC */
...@@ -27,13 +27,7 @@ ...@@ -27,13 +27,7 @@
#define UDC_BASE OMAP2_UDC_BASE #define UDC_BASE OMAP2_UDC_BASE
#define OMAP_OHCI_BASE OMAP2_OHCI_BASE #define OMAP_OHCI_BASE OMAP2_OHCI_BASE
#ifdef CONFIG_USB_MUSB_SOC
extern void usb_musb_init(void); extern void usb_musb_init(void);
#else
static inline void usb_musb_init(void)
{
}
#endif
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment