aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/da8xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/musb/da8xx.c')
-rw-r--r--drivers/usb/musb/da8xx.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c
index 01c8f2ece08..8bd9566f3fb 100644
--- a/drivers/usb/musb/da8xx.c
+++ b/drivers/usb/musb/da8xx.c
@@ -294,6 +294,7 @@ static irqreturn_t da8xx_musb_interrupt(int irq, void *hci)
294{ 294{
295 struct musb *musb = hci; 295 struct musb *musb = hci;
296 void __iomem *reg_base = musb->ctrl_base; 296 void __iomem *reg_base = musb->ctrl_base;
297 struct usb_otg *otg = musb->xceiv->otg;
297 unsigned long flags; 298 unsigned long flags;
298 irqreturn_t ret = IRQ_NONE; 299 irqreturn_t ret = IRQ_NONE;
299 u32 status; 300 u32 status;
@@ -351,14 +352,14 @@ static irqreturn_t da8xx_musb_interrupt(int irq, void *hci)
351 WARNING("VBUS error workaround (delay coming)\n"); 352 WARNING("VBUS error workaround (delay coming)\n");
352 } else if (is_host_enabled(musb) && drvvbus) { 353 } else if (is_host_enabled(musb) && drvvbus) {
353 MUSB_HST_MODE(musb); 354 MUSB_HST_MODE(musb);
354 musb->xceiv->default_a = 1; 355 otg->default_a = 1;
355 musb->xceiv->state = OTG_STATE_A_WAIT_VRISE; 356 musb->xceiv->state = OTG_STATE_A_WAIT_VRISE;
356 portstate(musb->port1_status |= USB_PORT_STAT_POWER); 357 portstate(musb->port1_status |= USB_PORT_STAT_POWER);
357 del_timer(&otg_workaround); 358 del_timer(&otg_workaround);
358 } else { 359 } else {
359 musb->is_active = 0; 360 musb->is_active = 0;
360 MUSB_DEV_MODE(musb); 361 MUSB_DEV_MODE(musb);
361 musb->xceiv->default_a = 0; 362 otg->default_a = 0;
362 musb->xceiv->state = OTG_STATE_B_IDLE; 363 musb->xceiv->state = OTG_STATE_B_IDLE;
363 portstate(musb->port1_status &= ~USB_PORT_STAT_POWER); 364 portstate(musb->port1_status &= ~USB_PORT_STAT_POWER);
364 } 365 }
@@ -424,7 +425,7 @@ static int da8xx_musb_init(struct musb *musb)
424 goto fail; 425 goto fail;
425 426
426 usb_nop_xceiv_register(); 427 usb_nop_xceiv_register();
427 musb->xceiv = otg_get_transceiver(); 428 musb->xceiv = usb_get_transceiver();
428 if (!musb->xceiv) 429 if (!musb->xceiv)
429 goto fail; 430 goto fail;
430 431
@@ -457,7 +458,7 @@ static int da8xx_musb_exit(struct musb *musb)
457 458
458 phy_off(); 459 phy_off();
459 460
460 otg_put_transceiver(musb->xceiv); 461 usb_put_transceiver(musb->xceiv);
461 usb_nop_xceiv_unregister(); 462 usb_nop_xceiv_unregister();
462 463
463 return 0; 464 return 0;