aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/davinci.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-01 11:45:33 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-01 11:45:33 -0500
commit8062d94a545457a83d5291bd62c3bfd14200bba0 (patch)
treea6a7aaaea5dff00f7415a93189720a1164ae30dd /drivers/usb/musb/davinci.c
parent15e68a803573974409972e761d8f08f03fce5bdb (diff)
parent6e13c6505cdff9766d5268ffb8c972c1a2f996e6 (diff)
Merge tag 'xceiv-for-v3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
USB: transceiver changes for 3.4 Here we have a big rework done by Heikki Krogerus (thanks) which splits OTG functionality away from transceivers. We have known for quite a long time that struct otg_transceiver was a bad name for the structure, considering transceiver is far from being OTG-specific (see 4e67185).
Diffstat (limited to 'drivers/usb/musb/davinci.c')
-rw-r--r--drivers/usb/musb/davinci.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
index 0ba3e75285cf..97ab975fa442 100644
--- a/drivers/usb/musb/davinci.c
+++ b/drivers/usb/musb/davinci.c
@@ -265,6 +265,7 @@ static irqreturn_t davinci_musb_interrupt(int irq, void *__hci)
265 unsigned long flags; 265 unsigned long flags;
266 irqreturn_t retval = IRQ_NONE; 266 irqreturn_t retval = IRQ_NONE;
267 struct musb *musb = __hci; 267 struct musb *musb = __hci;
268 struct usb_otg *otg = musb->xceiv->otg;
268 void __iomem *tibase = musb->ctrl_base; 269 void __iomem *tibase = musb->ctrl_base;
269 struct cppi *cppi; 270 struct cppi *cppi;
270 u32 tmp; 271 u32 tmp;
@@ -331,14 +332,14 @@ static irqreturn_t davinci_musb_interrupt(int irq, void *__hci)
331 WARNING("VBUS error workaround (delay coming)\n"); 332 WARNING("VBUS error workaround (delay coming)\n");
332 } else if (is_host_enabled(musb) && drvvbus) { 333 } else if (is_host_enabled(musb) && drvvbus) {
333 MUSB_HST_MODE(musb); 334 MUSB_HST_MODE(musb);
334 musb->xceiv->default_a = 1; 335 otg->default_a = 1;
335 musb->xceiv->state = OTG_STATE_A_WAIT_VRISE; 336 musb->xceiv->state = OTG_STATE_A_WAIT_VRISE;
336 portstate(musb->port1_status |= USB_PORT_STAT_POWER); 337 portstate(musb->port1_status |= USB_PORT_STAT_POWER);
337 del_timer(&otg_workaround); 338 del_timer(&otg_workaround);
338 } else { 339 } else {
339 musb->is_active = 0; 340 musb->is_active = 0;
340 MUSB_DEV_MODE(musb); 341 MUSB_DEV_MODE(musb);
341 musb->xceiv->default_a = 0; 342 otg->default_a = 0;
342 musb->xceiv->state = OTG_STATE_B_IDLE; 343 musb->xceiv->state = OTG_STATE_B_IDLE;
343 portstate(musb->port1_status &= ~USB_PORT_STAT_POWER); 344 portstate(musb->port1_status &= ~USB_PORT_STAT_POWER);
344 } 345 }
@@ -383,7 +384,7 @@ static int davinci_musb_init(struct musb *musb)
383 u32 revision; 384 u32 revision;
384 385
385 usb_nop_xceiv_register(); 386 usb_nop_xceiv_register();
386 musb->xceiv = otg_get_transceiver(); 387 musb->xceiv = usb_get_transceiver();
387 if (!musb->xceiv) 388 if (!musb->xceiv)
388 return -ENODEV; 389 return -ENODEV;
389 390
@@ -442,7 +443,7 @@ static int davinci_musb_init(struct musb *musb)
442 return 0; 443 return 0;
443 444
444fail: 445fail:
445 otg_put_transceiver(musb->xceiv); 446 usb_put_transceiver(musb->xceiv);
446 usb_nop_xceiv_unregister(); 447 usb_nop_xceiv_unregister();
447 return -ENODEV; 448 return -ENODEV;
448} 449}
@@ -464,7 +465,7 @@ static int davinci_musb_exit(struct musb *musb)
464 davinci_musb_source_power(musb, 0 /*off*/, 1); 465 davinci_musb_source_power(musb, 0 /*off*/, 1);
465 466
466 /* delay, to avoid problems with module reload */ 467 /* delay, to avoid problems with module reload */
467 if (is_host_enabled(musb) && musb->xceiv->default_a) { 468 if (is_host_enabled(musb) && musb->xceiv->otg->default_a) {
468 int maxdelay = 30; 469 int maxdelay = 30;
469 u8 devctl, warn = 0; 470 u8 devctl, warn = 0;
470 471
@@ -491,7 +492,7 @@ static int davinci_musb_exit(struct musb *musb)
491 492
492 phy_off(); 493 phy_off();
493 494
494 otg_put_transceiver(musb->xceiv); 495 usb_put_transceiver(musb->xceiv);
495 usb_nop_xceiv_unregister(); 496 usb_nop_xceiv_unregister();
496 497
497 return 0; 498 return 0;