aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/am35x.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/am35x.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/am35x.c')
-rw-r--r--drivers/usb/musb/am35x.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c
index 5285bda1dc4e..9f3eda91ea4d 100644
--- a/drivers/usb/musb/am35x.c
+++ b/drivers/usb/musb/am35x.c
@@ -226,6 +226,7 @@ static irqreturn_t am35x_musb_interrupt(int irq, void *hci)
226 struct device *dev = musb->controller; 226 struct device *dev = musb->controller;
227 struct musb_hdrc_platform_data *plat = dev->platform_data; 227 struct musb_hdrc_platform_data *plat = dev->platform_data;
228 struct omap_musb_board_data *data = plat->board_data; 228 struct omap_musb_board_data *data = plat->board_data;
229 struct usb_otg *otg = musb->xceiv->otg;
229 unsigned long flags; 230 unsigned long flags;
230 irqreturn_t ret = IRQ_NONE; 231 irqreturn_t ret = IRQ_NONE;
231 u32 epintr, usbintr; 232 u32 epintr, usbintr;
@@ -289,14 +290,14 @@ static irqreturn_t am35x_musb_interrupt(int irq, void *hci)
289 WARNING("VBUS error workaround (delay coming)\n"); 290 WARNING("VBUS error workaround (delay coming)\n");
290 } else if (is_host_enabled(musb) && drvvbus) { 291 } else if (is_host_enabled(musb) && drvvbus) {
291 MUSB_HST_MODE(musb); 292 MUSB_HST_MODE(musb);
292 musb->xceiv->default_a = 1; 293 otg->default_a = 1;
293 musb->xceiv->state = OTG_STATE_A_WAIT_VRISE; 294 musb->xceiv->state = OTG_STATE_A_WAIT_VRISE;
294 portstate(musb->port1_status |= USB_PORT_STAT_POWER); 295 portstate(musb->port1_status |= USB_PORT_STAT_POWER);
295 del_timer(&otg_workaround); 296 del_timer(&otg_workaround);
296 } else { 297 } else {
297 musb->is_active = 0; 298 musb->is_active = 0;
298 MUSB_DEV_MODE(musb); 299 MUSB_DEV_MODE(musb);
299 musb->xceiv->default_a = 0; 300 otg->default_a = 0;
300 musb->xceiv->state = OTG_STATE_B_IDLE; 301 musb->xceiv->state = OTG_STATE_B_IDLE;
301 portstate(musb->port1_status &= ~USB_PORT_STAT_POWER); 302 portstate(musb->port1_status &= ~USB_PORT_STAT_POWER);
302 } 303 }
@@ -363,7 +364,7 @@ static int am35x_musb_init(struct musb *musb)
363 return -ENODEV; 364 return -ENODEV;
364 365
365 usb_nop_xceiv_register(); 366 usb_nop_xceiv_register();
366 musb->xceiv = otg_get_transceiver(); 367 musb->xceiv = usb_get_transceiver();
367 if (!musb->xceiv) 368 if (!musb->xceiv)
368 return -ENODEV; 369 return -ENODEV;
369 370
@@ -405,7 +406,7 @@ static int am35x_musb_exit(struct musb *musb)
405 if (data->set_phy_power) 406 if (data->set_phy_power)
406 data->set_phy_power(0); 407 data->set_phy_power(0);
407 408
408 otg_put_transceiver(musb->xceiv); 409 usb_put_transceiver(musb->xceiv);
409 usb_nop_xceiv_unregister(); 410 usb_nop_xceiv_unregister();
410 411
411 return 0; 412 return 0;