diff options
Diffstat (limited to 'drivers/usb/musb/omap2430.c')
-rw-r--r-- | drivers/usb/musb/omap2430.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index c5d4c44d0ffa..ba85f273e487 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
@@ -51,9 +51,7 @@ static void musb_do_idle(unsigned long _musb) | |||
51 | { | 51 | { |
52 | struct musb *musb = (void *)_musb; | 52 | struct musb *musb = (void *)_musb; |
53 | unsigned long flags; | 53 | unsigned long flags; |
54 | #ifdef CONFIG_USB_MUSB_HDRC_HCD | ||
55 | u8 power; | 54 | u8 power; |
56 | #endif | ||
57 | u8 devctl; | 55 | u8 devctl; |
58 | 56 | ||
59 | spin_lock_irqsave(&musb->lock, flags); | 57 | spin_lock_irqsave(&musb->lock, flags); |
@@ -70,7 +68,6 @@ static void musb_do_idle(unsigned long _musb) | |||
70 | MUSB_HST_MODE(musb); | 68 | MUSB_HST_MODE(musb); |
71 | } | 69 | } |
72 | break; | 70 | break; |
73 | #ifdef CONFIG_USB_MUSB_HDRC_HCD | ||
74 | case OTG_STATE_A_SUSPEND: | 71 | case OTG_STATE_A_SUSPEND: |
75 | /* finish RESUME signaling? */ | 72 | /* finish RESUME signaling? */ |
76 | if (musb->port1_status & MUSB_PORT_STAT_RESUME) { | 73 | if (musb->port1_status & MUSB_PORT_STAT_RESUME) { |
@@ -87,15 +84,12 @@ static void musb_do_idle(unsigned long _musb) | |||
87 | musb->xceiv->state = OTG_STATE_A_HOST; | 84 | musb->xceiv->state = OTG_STATE_A_HOST; |
88 | } | 85 | } |
89 | break; | 86 | break; |
90 | #endif | ||
91 | #ifdef CONFIG_USB_MUSB_HDRC_HCD | ||
92 | case OTG_STATE_A_HOST: | 87 | case OTG_STATE_A_HOST: |
93 | devctl = musb_readb(musb->mregs, MUSB_DEVCTL); | 88 | devctl = musb_readb(musb->mregs, MUSB_DEVCTL); |
94 | if (devctl & MUSB_DEVCTL_BDEVICE) | 89 | if (devctl & MUSB_DEVCTL_BDEVICE) |
95 | musb->xceiv->state = OTG_STATE_B_IDLE; | 90 | musb->xceiv->state = OTG_STATE_B_IDLE; |
96 | else | 91 | else |
97 | musb->xceiv->state = OTG_STATE_A_WAIT_BCON; | 92 | musb->xceiv->state = OTG_STATE_A_WAIT_BCON; |
98 | #endif | ||
99 | default: | 93 | default: |
100 | break; | 94 | break; |
101 | } | 95 | } |
@@ -243,13 +237,11 @@ static int musb_otg_notifications(struct notifier_block *nb, | |||
243 | dev_dbg(musb->controller, "ID GND\n"); | 237 | dev_dbg(musb->controller, "ID GND\n"); |
244 | 238 | ||
245 | if (is_otg_enabled(musb)) { | 239 | if (is_otg_enabled(musb)) { |
246 | #ifdef CONFIG_USB_GADGET_MUSB_HDRC | ||
247 | if (musb->gadget_driver) { | 240 | if (musb->gadget_driver) { |
248 | pm_runtime_get_sync(musb->controller); | 241 | pm_runtime_get_sync(musb->controller); |
249 | otg_init(musb->xceiv); | 242 | otg_init(musb->xceiv); |
250 | omap2430_musb_set_vbus(musb, 1); | 243 | omap2430_musb_set_vbus(musb, 1); |
251 | } | 244 | } |
252 | #endif | ||
253 | } else { | 245 | } else { |
254 | pm_runtime_get_sync(musb->controller); | 246 | pm_runtime_get_sync(musb->controller); |
255 | otg_init(musb->xceiv); | 247 | otg_init(musb->xceiv); |
@@ -260,21 +252,16 @@ static int musb_otg_notifications(struct notifier_block *nb, | |||
260 | case USB_EVENT_VBUS: | 252 | case USB_EVENT_VBUS: |
261 | dev_dbg(musb->controller, "VBUS Connect\n"); | 253 | dev_dbg(musb->controller, "VBUS Connect\n"); |
262 | 254 | ||
263 | #ifdef CONFIG_USB_GADGET_MUSB_HDRC | ||
264 | if (musb->gadget_driver) | 255 | if (musb->gadget_driver) |
265 | pm_runtime_get_sync(musb->controller); | 256 | pm_runtime_get_sync(musb->controller); |
266 | #endif | ||
267 | otg_init(musb->xceiv); | 257 | otg_init(musb->xceiv); |
268 | break; | 258 | break; |
269 | 259 | ||
270 | case USB_EVENT_NONE: | 260 | case USB_EVENT_NONE: |
271 | dev_dbg(musb->controller, "VBUS Disconnect\n"); | 261 | dev_dbg(musb->controller, "VBUS Disconnect\n"); |
272 | 262 | ||
273 | #ifdef CONFIG_USB_GADGET_MUSB_HDRC | ||
274 | if (is_otg_enabled(musb) || is_peripheral_enabled(musb)) | 263 | if (is_otg_enabled(musb) || is_peripheral_enabled(musb)) |
275 | if (musb->gadget_driver) | 264 | if (musb->gadget_driver) { |
276 | #endif | ||
277 | { | ||
278 | pm_runtime_mark_last_busy(musb->controller); | 265 | pm_runtime_mark_last_busy(musb->controller); |
279 | pm_runtime_put_autosuspend(musb->controller); | 266 | pm_runtime_put_autosuspend(musb->controller); |
280 | } | 267 | } |