diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2012-02-13 06:24:15 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-02-13 06:52:54 -0500 |
commit | d445b6da8da491e025eb60576ce959f6a3a56a4f (patch) | |
tree | 06bf3afc86c3c6248a9c2d980cf359bdb008447e /drivers/usb/musb/davinci.c | |
parent | 76eb57ec1bf3201d2f417cafa5c974e7c0b6aaf9 (diff) |
usb: musb: Start using struct usb_otg
Use struct usb_otg members with OTG specific functions instead
of usb_phy members.
[ balbi@ti.com: added a missing change on musb_gadget.c to avoid
a compile error on a later patch ]
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/davinci.c')
-rw-r--r-- | drivers/usb/musb/davinci.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c index 7c569f51212a..f2a63dd0dfce 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 | } |
@@ -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 | ||