aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/omap_udc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/omap_udc.c')
-rw-r--r--drivers/usb/gadget/omap_udc.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c
index 576cd8578b4..ace8a652b32 100644
--- a/drivers/usb/gadget/omap_udc.c
+++ b/drivers/usb/gadget/omap_udc.c
@@ -1213,7 +1213,7 @@ static int omap_wakeup(struct usb_gadget *gadget)
1213 /* NOTE: non-OTG systems may use SRP TOO... */ 1213 /* NOTE: non-OTG systems may use SRP TOO... */
1214 } else if (!(udc->devstat & UDC_ATT)) { 1214 } else if (!(udc->devstat & UDC_ATT)) {
1215 if (udc->transceiver) 1215 if (udc->transceiver)
1216 retval = otg_start_srp(udc->transceiver); 1216 retval = otg_start_srp(udc->transceiver->otg);
1217 } 1217 }
1218 spin_unlock_irqrestore(&udc->lock, flags); 1218 spin_unlock_irqrestore(&udc->lock, flags);
1219 1219
@@ -1345,7 +1345,7 @@ static int omap_vbus_draw(struct usb_gadget *gadget, unsigned mA)
1345 1345
1346 udc = container_of(gadget, struct omap_udc, gadget); 1346 udc = container_of(gadget, struct omap_udc, gadget);
1347 if (udc->transceiver) 1347 if (udc->transceiver)
1348 return otg_set_power(udc->transceiver, mA); 1348 return usb_phy_set_power(udc->transceiver, mA);
1349 return -EOPNOTSUPP; 1349 return -EOPNOTSUPP;
1350} 1350}
1351 1351
@@ -1839,11 +1839,13 @@ static void devstate_irq(struct omap_udc *udc, u16 irq_src)
1839 spin_lock(&udc->lock); 1839 spin_lock(&udc->lock);
1840 } 1840 }
1841 if (udc->transceiver) 1841 if (udc->transceiver)
1842 otg_set_suspend(udc->transceiver, 1); 1842 usb_phy_set_suspend(
1843 udc->transceiver, 1);
1843 } else { 1844 } else {
1844 VDBG("resume\n"); 1845 VDBG("resume\n");
1845 if (udc->transceiver) 1846 if (udc->transceiver)
1846 otg_set_suspend(udc->transceiver, 0); 1847 usb_phy_set_suspend(
1848 udc->transceiver, 0);
1847 if (udc->gadget.speed == USB_SPEED_FULL 1849 if (udc->gadget.speed == USB_SPEED_FULL
1848 && udc->driver->resume) { 1850 && udc->driver->resume) {
1849 spin_unlock(&udc->lock); 1851 spin_unlock(&udc->lock);
@@ -2154,7 +2156,8 @@ static int omap_udc_start(struct usb_gadget_driver *driver,
2154 2156
2155 /* connect to bus through transceiver */ 2157 /* connect to bus through transceiver */
2156 if (udc->transceiver) { 2158 if (udc->transceiver) {
2157 status = otg_set_peripheral(udc->transceiver, &udc->gadget); 2159 status = otg_set_peripheral(udc->transceiver->otg,
2160 &udc->gadget);
2158 if (status < 0) { 2161 if (status < 0) {
2159 ERR("can't bind to transceiver\n"); 2162 ERR("can't bind to transceiver\n");
2160 if (driver->unbind) { 2163 if (driver->unbind) {
@@ -2200,7 +2203,7 @@ static int omap_udc_stop(struct usb_gadget_driver *driver)
2200 omap_vbus_session(&udc->gadget, 0); 2203 omap_vbus_session(&udc->gadget, 0);
2201 2204
2202 if (udc->transceiver) 2205 if (udc->transceiver)
2203 (void) otg_set_peripheral(udc->transceiver, NULL); 2206 (void) otg_set_peripheral(udc->transceiver->otg, NULL);
2204 else 2207 else
2205 pullup_disable(udc); 2208 pullup_disable(udc);
2206 2209
@@ -2650,7 +2653,7 @@ static void omap_udc_release(struct device *dev)
2650} 2653}
2651 2654
2652static int __init 2655static int __init
2653omap_udc_setup(struct platform_device *odev, struct otg_transceiver *xceiv) 2656omap_udc_setup(struct platform_device *odev, struct usb_phy *xceiv)
2654{ 2657{
2655 unsigned tmp, buf; 2658 unsigned tmp, buf;
2656 2659
@@ -2790,7 +2793,7 @@ static int __init omap_udc_probe(struct platform_device *pdev)
2790{ 2793{
2791 int status = -ENODEV; 2794 int status = -ENODEV;
2792 int hmc; 2795 int hmc;
2793 struct otg_transceiver *xceiv = NULL; 2796 struct usb_phy *xceiv = NULL;
2794 const char *type = NULL; 2797 const char *type = NULL;
2795 struct omap_usb_config *config = pdev->dev.platform_data; 2798 struct omap_usb_config *config = pdev->dev.platform_data;
2796 struct clk *dc_clk; 2799 struct clk *dc_clk;
@@ -2863,7 +2866,7 @@ static int __init omap_udc_probe(struct platform_device *pdev)
2863 * use it. Except for OTG, we don't _need_ to talk to one; 2866 * use it. Except for OTG, we don't _need_ to talk to one;
2864 * but not having one probably means no VBUS detection. 2867 * but not having one probably means no VBUS detection.
2865 */ 2868 */
2866 xceiv = otg_get_transceiver(); 2869 xceiv = usb_get_transceiver();
2867 if (xceiv) 2870 if (xceiv)
2868 type = xceiv->label; 2871 type = xceiv->label;
2869 else if (config->otg) { 2872 else if (config->otg) {
@@ -3009,7 +3012,7 @@ cleanup1:
3009 3012
3010cleanup0: 3013cleanup0:
3011 if (xceiv) 3014 if (xceiv)
3012 otg_put_transceiver(xceiv); 3015 usb_put_transceiver(xceiv);
3013 3016
3014 if (cpu_is_omap16xx() || cpu_is_omap24xx() || cpu_is_omap7xx()) { 3017 if (cpu_is_omap16xx() || cpu_is_omap24xx() || cpu_is_omap7xx()) {
3015 clk_disable(hhc_clk); 3018 clk_disable(hhc_clk);
@@ -3039,7 +3042,7 @@ static int __exit omap_udc_remove(struct platform_device *pdev)
3039 3042
3040 pullup_disable(udc); 3043 pullup_disable(udc);
3041 if (udc->transceiver) { 3044 if (udc->transceiver) {
3042 otg_put_transceiver(udc->transceiver); 3045 usb_put_transceiver(udc->transceiver);
3043 udc->transceiver = NULL; 3046 udc->transceiver = NULL;
3044 } 3047 }
3045 omap_writew(0, UDC_SYSCON1); 3048 omap_writew(0, UDC_SYSCON1);