aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r--drivers/usb/musb/blackfin.c7
-rw-r--r--drivers/usb/musb/davinci.c2
-rw-r--r--drivers/usb/musb/musb_core.c5
-rw-r--r--drivers/usb/musb/omap2430.c1
-rw-r--r--drivers/usb/musb/tusb6010.c4
5 files changed, 12 insertions, 7 deletions
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
index b611420a8050..611a9d274363 100644
--- a/drivers/usb/musb/blackfin.c
+++ b/drivers/usb/musb/blackfin.c
@@ -342,8 +342,10 @@ int __init musb_platform_init(struct musb *musb, void *board_data)
342 342
343 usb_nop_xceiv_register(); 343 usb_nop_xceiv_register();
344 musb->xceiv = otg_get_transceiver(); 344 musb->xceiv = otg_get_transceiver();
345 if (!musb->xceiv) 345 if (!musb->xceiv) {
346 gpio_free(musb->config->gpio_vrsel);
346 return -ENODEV; 347 return -ENODEV;
348 }
347 349
348 if (ANOMALY_05000346) { 350 if (ANOMALY_05000346) {
349 bfin_write_USB_APHY_CALIB(ANOMALY_05000346_value); 351 bfin_write_USB_APHY_CALIB(ANOMALY_05000346_value);
@@ -394,8 +396,9 @@ int __init musb_platform_init(struct musb *musb, void *board_data)
394 396
395int musb_platform_exit(struct musb *musb) 397int musb_platform_exit(struct musb *musb)
396{ 398{
397
398 gpio_free(musb->config->gpio_vrsel); 399 gpio_free(musb->config->gpio_vrsel);
399 400
401 otg_put_transceiver(musb->xceiv);
402 usb_nop_xceiv_unregister();
400 return 0; 403 return 0;
401} 404}
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
index 57624361c1de..6e67629f50cc 100644
--- a/drivers/usb/musb/davinci.c
+++ b/drivers/usb/musb/davinci.c
@@ -446,6 +446,7 @@ int __init musb_platform_init(struct musb *musb, void *board_data)
446fail: 446fail:
447 clk_disable(musb->clock); 447 clk_disable(musb->clock);
448 448
449 otg_put_transceiver(musb->xceiv);
449 usb_nop_xceiv_unregister(); 450 usb_nop_xceiv_unregister();
450 return -ENODEV; 451 return -ENODEV;
451} 452}
@@ -496,6 +497,7 @@ int musb_platform_exit(struct musb *musb)
496 497
497 clk_disable(musb->clock); 498 clk_disable(musb->clock);
498 499
500 otg_put_transceiver(musb->xceiv);
499 usb_nop_xceiv_unregister(); 501 usb_nop_xceiv_unregister();
500 502
501 return 0; 503 return 0;
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 540c766c4f86..0707b296cce4 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1921,10 +1921,6 @@ static void musb_free(struct musb *musb)
1921 dma_controller_destroy(c); 1921 dma_controller_destroy(c);
1922 } 1922 }
1923 1923
1924#ifdef CONFIG_USB_MUSB_OTG
1925 put_device(musb->xceiv->dev);
1926#endif
1927
1928#ifdef CONFIG_USB_MUSB_HDRC_HCD 1924#ifdef CONFIG_USB_MUSB_HDRC_HCD
1929 usb_put_hcd(musb_to_hcd(musb)); 1925 usb_put_hcd(musb_to_hcd(musb));
1930#else 1926#else
@@ -2247,7 +2243,6 @@ static int __exit musb_remove(struct platform_device *pdev)
2247#endif 2243#endif
2248 musb_writeb(musb->mregs, MUSB_DEVCTL, 0); 2244 musb_writeb(musb->mregs, MUSB_DEVCTL, 0);
2249 musb_platform_exit(musb); 2245 musb_platform_exit(musb);
2250 musb_writeb(musb->mregs, MUSB_DEVCTL, 0);
2251 2246
2252 musb_free(musb); 2247 musb_free(musb);
2253 iounmap(ctrl_base); 2248 iounmap(ctrl_base);
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 2111a241dd03..ed618bde1eec 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -320,5 +320,6 @@ int musb_platform_exit(struct musb *musb)
320 320
321 musb_platform_suspend(musb); 321 musb_platform_suspend(musb);
322 322
323 otg_put_transceiver(musb->xceiv);
323 return 0; 324 return 0;
324} 325}
diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c
index 3c48e77a0aa2..bde40efc7046 100644
--- a/drivers/usb/musb/tusb6010.c
+++ b/drivers/usb/musb/tusb6010.c
@@ -1152,6 +1152,8 @@ done:
1152 if (ret < 0) { 1152 if (ret < 0) {
1153 if (sync) 1153 if (sync)
1154 iounmap(sync); 1154 iounmap(sync);
1155
1156 otg_put_transceiver(musb->xceiv);
1155 usb_nop_xceiv_unregister(); 1157 usb_nop_xceiv_unregister();
1156 } 1158 }
1157 return ret; 1159 return ret;
@@ -1166,6 +1168,8 @@ int musb_platform_exit(struct musb *musb)
1166 musb->board_set_power(0); 1168 musb->board_set_power(0);
1167 1169
1168 iounmap(musb->sync_va); 1170 iounmap(musb->sync_va);
1171
1172 otg_put_transceiver(musb->xceiv);
1169 usb_nop_xceiv_unregister(); 1173 usb_nop_xceiv_unregister();
1170 return 0; 1174 return 0;
1171} 1175}