usb: Convert all users to new usb_phy
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Mon, 13 Feb 2012 11:24:18 +0000 (13:24 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 27 Feb 2012 13:41:48 +0000 (15:41 +0200)
Use the new usb_phy_* functions with transceiver
operations instead of the old otg functions.

Includes fixes from Sascha Hauer.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Acked-by: Li Yang <leoli@freescale.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
25 files changed:
arch/arm/mach-tegra/usb_phy.c
drivers/usb/gadget/ci13xxx_msm.c
drivers/usb/gadget/ci13xxx_udc.c
drivers/usb/gadget/fsl_udc_core.c
drivers/usb/gadget/langwell_udc.c
drivers/usb/gadget/mv_udc_core.c
drivers/usb/gadget/omap_udc.c
drivers/usb/gadget/pxa25x_udc.c
drivers/usb/gadget/pxa27x_udc.c
drivers/usb/gadget/s3c-hsudc.c
drivers/usb/host/ehci-fsl.c
drivers/usb/host/ehci-msm.c
drivers/usb/host/ehci-mv.c
drivers/usb/host/ehci-mxc.c
drivers/usb/host/ehci-tegra.c
drivers/usb/host/ohci-omap.c
drivers/usb/musb/am35x.c
drivers/usb/musb/blackfin.c
drivers/usb/musb/da8xx.c
drivers/usb/musb/davinci.c
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_gadget.c
drivers/usb/musb/omap2430.c
drivers/usb/musb/tusb6010.c
drivers/usb/musb/ux500.c

index 37576a721aeb7c6b549b7201a9999901f901956f..ad321f9e2bb828a0bceea9ff3bf9a4efc3323273 100644 (file)
@@ -608,13 +608,13 @@ static int ulpi_phy_power_on(struct tegra_usb_phy *phy)
        writel(val, base + ULPI_TIMING_CTRL_1);
 
        /* Fix VbusInvalid due to floating VBUS */
-       ret = otg_io_write(phy->ulpi, 0x40, 0x08);
+       ret = usb_phy_io_write(phy->ulpi, 0x40, 0x08);
        if (ret) {
                pr_err("%s: ulpi write failed\n", __func__);
                return ret;
        }
 
-       ret = otg_io_write(phy->ulpi, 0x80, 0x0B);
+       ret = usb_phy_io_write(phy->ulpi, 0x80, 0x0B);
        if (ret) {
                pr_err("%s: ulpi write failed\n", __func__);
                return ret;
index 1fc612914c52e464ec89a82ec9e39048068c0b27..d07e44c05e9b3c035ca6a254c13bcdc2a51aa24f 100644 (file)
@@ -37,10 +37,10 @@ static void ci13xxx_msm_notify_event(struct ci13xxx *udc, unsigned event)
                 * Put the transceiver in non-driving mode. Otherwise host
                 * may not detect soft-disconnection.
                 */
-               val = otg_io_read(udc->transceiver, ULPI_FUNC_CTRL);
+               val = usb_phy_io_read(udc->transceiver, ULPI_FUNC_CTRL);
                val &= ~ULPI_FUNC_CTRL_OPMODE_MASK;
                val |= ULPI_FUNC_CTRL_OPMODE_NONDRIVING;
-               otg_io_write(udc->transceiver, val, ULPI_FUNC_CTRL);
+               usb_phy_io_write(udc->transceiver, val, ULPI_FUNC_CTRL);
                break;
        default:
                dev_dbg(dev, "unknown ci13xxx_udc event\n");
index 27e313718422a5c2f1726330ab822d1fa9f133c8..68ad160f258942ac401e1bbba87c11b33489a951 100644 (file)
@@ -2537,7 +2537,7 @@ static int ci13xxx_vbus_draw(struct usb_gadget *_gadget, unsigned mA)
        struct ci13xxx *udc = container_of(_gadget, struct ci13xxx, gadget);
 
        if (udc->transceiver)
-               return otg_set_power(udc->transceiver, mA);
+               return usb_phy_set_power(udc->transceiver, mA);
        return -ENOTSUPP;
 }
 
@@ -2900,7 +2900,7 @@ static int udc_probe(struct ci13xxx_udc_driver *driver, struct device *dev,
        if (retval < 0)
                goto free_udc;
 
-       udc->transceiver = otg_get_transceiver();
+       udc->transceiver = usb_get_transceiver();
 
        if (udc->udc_driver->flags & CI13XXX_REQUIRE_TRANSCEIVER) {
                if (udc->transceiver == NULL) {
@@ -2946,7 +2946,7 @@ static int udc_probe(struct ci13xxx_udc_driver *driver, struct device *dev,
 remove_trans:
        if (udc->transceiver) {
                otg_set_peripheral(udc->transceiver, &udc->gadget);
-               otg_put_transceiver(udc->transceiver);
+               usb_put_transceiver(udc->transceiver);
        }
 
        err("error = %i", retval);
@@ -2958,7 +2958,7 @@ unreg_device:
        device_unregister(&udc->gadget.dev);
 put_transceiver:
        if (udc->transceiver)
-               otg_put_transceiver(udc->transceiver);
+               usb_put_transceiver(udc->transceiver);
 free_udc:
        kfree(udc);
        _udc = NULL;
@@ -2982,7 +2982,7 @@ static void udc_remove(void)
 
        if (udc->transceiver) {
                otg_set_peripheral(udc->transceiver, &udc->gadget);
-               otg_put_transceiver(udc->transceiver);
+               usb_put_transceiver(udc->transceiver);
        }
 #ifdef CONFIG_USB_GADGET_DEBUG_FILES
        dbg_remove_files(&udc->gadget.dev);
index b04712f19f1efa613261c2216b08b31958ec4973..21fdfdb18ba8f4a37024ab9bdef65dcba2b7e145 100644 (file)
@@ -1217,7 +1217,7 @@ static int fsl_vbus_draw(struct usb_gadget *gadget, unsigned mA)
 
        udc = container_of(gadget, struct fsl_udc, gadget);
        if (udc->transceiver)
-               return otg_set_power(udc->transceiver, mA);
+               return usb_phy_set_power(udc->transceiver, mA);
        return -ENOTSUPP;
 }
 
@@ -2430,7 +2430,7 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
 
 #ifdef CONFIG_USB_OTG
        if (pdata->operating_mode == FSL_USB2_DR_OTG) {
-               udc_controller->transceiver = otg_get_transceiver();
+               udc_controller->transceiver = usb_get_transceiver();
                if (!udc_controller->transceiver) {
                        ERR("Can't find OTG driver!\n");
                        ret = -ENODEV;
index e2293c1588eed80a2e0ba031677f918f774305f0..b19a9e46e69df8119592b0b92572bb1cfbecc9f1 100644 (file)
@@ -1261,9 +1261,9 @@ static int langwell_vbus_draw(struct usb_gadget *_gadget, unsigned mA)
        dev_vdbg(&dev->pdev->dev, "---> %s()\n", __func__);
 
        if (dev->transceiver) {
-               dev_vdbg(&dev->pdev->dev, "otg_set_power\n");
+               dev_vdbg(&dev->pdev->dev, "usb_phy_set_power\n");
                dev_vdbg(&dev->pdev->dev, "<--- %s()\n", __func__);
-               return otg_set_power(dev->transceiver, mA);
+               return usb_phy_set_power(dev->transceiver, mA);
        }
 
        dev_vdbg(&dev->pdev->dev, "<--- %s()\n", __func__);
index f97e737d26f7ac1adf69aee9c30829ef1d67d2a9..50baf3ea336b81f82b3e96e66aafbdd47bb7b0d6 100644 (file)
@@ -2181,7 +2181,7 @@ static int __devinit mv_udc_probe(struct platform_device *dev)
 
 #ifdef CONFIG_USB_OTG_UTILS
        if (pdata->mode == MV_USB_MODE_OTG)
-               udc->transceiver = otg_get_transceiver();
+               udc->transceiver = usb_get_transceiver();
 #endif
 
        udc->clknum = pdata->clknum;
index d3529787351d5cd7c5fbc42a4655ac8402fa9656..e82c6995ce26693f07031342e32ea84100356111 100644 (file)
@@ -1345,7 +1345,7 @@ static int omap_vbus_draw(struct usb_gadget *gadget, unsigned mA)
 
        udc = container_of(gadget, struct omap_udc, gadget);
        if (udc->transceiver)
-               return otg_set_power(udc->transceiver, mA);
+               return usb_phy_set_power(udc->transceiver, mA);
        return -EOPNOTSUPP;
 }
 
@@ -1839,11 +1839,13 @@ static void devstate_irq(struct omap_udc *udc, u16 irq_src)
                                        spin_lock(&udc->lock);
                                }
                                if (udc->transceiver)
-                                       otg_set_suspend(udc->transceiver, 1);
+                                       usb_phy_set_suspend(
+                                                       udc->transceiver, 1);
                        } else {
                                VDBG("resume\n");
                                if (udc->transceiver)
-                                       otg_set_suspend(udc->transceiver, 0);
+                                       usb_phy_set_suspend(
+                                                       udc->transceiver, 0);
                                if (udc->gadget.speed == USB_SPEED_FULL
                                                && udc->driver->resume) {
                                        spin_unlock(&udc->lock);
@@ -2863,7 +2865,7 @@ static int __init omap_udc_probe(struct platform_device *pdev)
                 * use it.  Except for OTG, we don't _need_ to talk to one;
                 * but not having one probably means no VBUS detection.
                 */
-               xceiv = otg_get_transceiver();
+               xceiv = usb_get_transceiver();
                if (xceiv)
                        type = xceiv->label;
                else if (config->otg) {
@@ -3009,7 +3011,7 @@ cleanup1:
 
 cleanup0:
        if (xceiv)
-               otg_put_transceiver(xceiv);
+               usb_put_transceiver(xceiv);
 
        if (cpu_is_omap16xx() || cpu_is_omap24xx() || cpu_is_omap7xx()) {
                clk_disable(hhc_clk);
@@ -3039,7 +3041,7 @@ static int __exit omap_udc_remove(struct platform_device *pdev)
 
        pullup_disable(udc);
        if (udc->transceiver) {
-               otg_put_transceiver(udc->transceiver);
+               usb_put_transceiver(udc->transceiver);
                udc->transceiver = NULL;
        }
        omap_writew(0, UDC_SYSCON1);
index dd470635f4f783a160fb2547716ac169c50f6318..b86518e494157d0ef63c45e94613bde418e88a71 100644 (file)
@@ -995,7 +995,7 @@ static int pxa25x_udc_vbus_draw(struct usb_gadget *_gadget, unsigned mA)
        udc = container_of(_gadget, struct pxa25x_udc, gadget);
 
        if (udc->transceiver)
-               return otg_set_power(udc->transceiver, mA);
+               return usb_phy_set_power(udc->transceiver, mA);
        return -EOPNOTSUPP;
 }
 
@@ -2159,7 +2159,7 @@ static int __init pxa25x_udc_probe(struct platform_device *pdev)
        dev->dev = &pdev->dev;
        dev->mach = pdev->dev.platform_data;
 
-       dev->transceiver = otg_get_transceiver();
+       dev->transceiver = usb_get_transceiver();
 
        if (gpio_is_valid(dev->mach->gpio_pullup)) {
                if ((retval = gpio_request(dev->mach->gpio_pullup,
@@ -2238,7 +2238,7 @@ lubbock_fail0:
                gpio_free(dev->mach->gpio_pullup);
  err_gpio_pullup:
        if (dev->transceiver) {
-               otg_put_transceiver(dev->transceiver);
+               usb_put_transceiver(dev->transceiver);
                dev->transceiver = NULL;
        }
        clk_put(dev->clk);
@@ -2280,7 +2280,7 @@ static int __exit pxa25x_udc_remove(struct platform_device *pdev)
        clk_put(dev->clk);
 
        if (dev->transceiver) {
-               otg_put_transceiver(dev->transceiver);
+               usb_put_transceiver(dev->transceiver);
                dev->transceiver = NULL;
        }
 
index f4c44eb806c3bbc7c518d755c9f34f028382a651..1906ed0dcdc2f9fd20a5ec93d697fb6812b85a8e 100644 (file)
@@ -1666,7 +1666,7 @@ static int pxa_udc_vbus_draw(struct usb_gadget *_gadget, unsigned mA)
 
        udc = to_gadget_udc(_gadget);
        if (udc->transceiver)
-               return otg_set_power(udc->transceiver, mA);
+               return usb_phy_set_power(udc->transceiver, mA);
        return -EOPNOTSUPP;
 }
 
@@ -2463,7 +2463,7 @@ static int __init pxa_udc_probe(struct platform_device *pdev)
 
        udc->dev = &pdev->dev;
        udc->mach = pdev->dev.platform_data;
-       udc->transceiver = otg_get_transceiver();
+       udc->transceiver = usb_get_transceiver();
 
        gpio = udc->mach->gpio_pullup;
        if (gpio_is_valid(gpio)) {
@@ -2542,7 +2542,7 @@ static int __exit pxa_udc_remove(struct platform_device *_dev)
        if (gpio_is_valid(gpio))
                gpio_free(gpio);
 
-       otg_put_transceiver(udc->transceiver);
+       usb_put_transceiver(udc->transceiver);
 
        udc->transceiver = NULL;
        platform_set_drvdata(_dev, NULL);
index dea475a61fd33be5579662860a2e8486a87af0ed..e124bfa399f5e3e29a6edebf5f68fbd277a323b8 100644 (file)
@@ -1243,7 +1243,7 @@ static int s3c_hsudc_vbus_draw(struct usb_gadget *gadget, unsigned mA)
                return -ENODEV;
 
        if (hsudc->transceiver)
-               return otg_set_power(hsudc->transceiver, mA);
+               return usb_phy_set_power(hsudc->transceiver, mA);
 
        return -EOPNOTSUPP;
 }
@@ -1275,7 +1275,7 @@ static int __devinit s3c_hsudc_probe(struct platform_device *pdev)
        hsudc->dev = dev;
        hsudc->pd = pdev->dev.platform_data;
 
-       hsudc->transceiver = otg_get_transceiver();
+       hsudc->transceiver = usb_get_transceiver();
 
        for (i = 0; i < ARRAY_SIZE(hsudc->supplies); i++)
                hsudc->supplies[i].supply = s3c_hsudc_supply_names[i];
@@ -1377,7 +1377,7 @@ err_remap:
        release_mem_region(res->start, resource_size(res));
 err_res:
        if (hsudc->transceiver)
-               otg_put_transceiver(hsudc->transceiver);
+               usb_put_transceiver(hsudc->transceiver);
 
        regulator_bulk_free(ARRAY_SIZE(hsudc->supplies), hsudc->supplies);
 err_supplies:
index b556a72264d1084b5e6809ea5b4a3f59c5583b82..481effdc7f54beab837dbeda612f0764c1f9fd04 100644 (file)
@@ -142,7 +142,7 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver,
        if (pdata->operating_mode == FSL_USB2_DR_OTG) {
                struct ehci_hcd *ehci = hcd_to_ehci(hcd);
 
-               ehci->transceiver = otg_get_transceiver();
+               ehci->transceiver = usb_get_transceiver();
                dev_dbg(&pdev->dev, "hcd=0x%p  ehci=0x%p, transceiver=0x%p\n",
                        hcd, ehci, ehci->transceiver);
 
index ef7c4319c6e4a1cab5e6543adf3a578e905819f6..d8db5ecf5e37197fab5236ae0d775d131c3a0cd0 100644 (file)
@@ -32,7 +32,7 @@
 
 #define MSM_USB_BASE (hcd->regs)
 
-static struct usb_phy *otg;
+static struct usb_phy *phy;
 
 static int ehci_msm_reset(struct usb_hcd *hcd)
 {
@@ -145,14 +145,14 @@ static int ehci_msm_probe(struct platform_device *pdev)
         * powering up VBUS, mapping of registers address space and power
         * management.
         */
-       otg = otg_get_transceiver();
-       if (!otg) {
+       phy = usb_get_transceiver();
+       if (!phy) {
                dev_err(&pdev->dev, "unable to find transceiver\n");
                ret = -ENODEV;
                goto unmap;
        }
 
-       ret = otg_set_host(otg, &hcd->self);
+       ret = otg_set_host(phy, &hcd->self);
        if (ret < 0) {
                dev_err(&pdev->dev, "unable to register with transceiver\n");
                goto put_transceiver;
@@ -169,7 +169,7 @@ static int ehci_msm_probe(struct platform_device *pdev)
        return 0;
 
 put_transceiver:
-       otg_put_transceiver(otg);
+       usb_put_transceiver(phy);
 unmap:
        iounmap(hcd->regs);
 put_hcd:
@@ -186,8 +186,8 @@ static int __devexit ehci_msm_remove(struct platform_device *pdev)
        pm_runtime_disable(&pdev->dev);
        pm_runtime_set_suspended(&pdev->dev);
 
-       otg_set_host(otg, NULL);
-       otg_put_transceiver(otg);
+       otg_set_host(phy, NULL);
+       usb_put_transceiver(phy);
 
        usb_put_hcd(hcd);
 
index 39ca79e008d985ce927e40fc8d30f99a08a7474c..62a63b598149ee26803eab9bb8dd4bfcfb334550 100644 (file)
@@ -253,7 +253,7 @@ static int mv_ehci_probe(struct platform_device *pdev)
        ehci_mv->mode = pdata->mode;
        if (ehci_mv->mode == MV_USB_MODE_OTG) {
 #ifdef CONFIG_USB_OTG_UTILS
-               ehci_mv->otg = otg_get_transceiver();
+               ehci_mv->otg = usb_get_transceiver();
                if (!ehci_mv->otg) {
                        dev_err(&pdev->dev,
                                "unable to find transceiver\n");
@@ -303,7 +303,7 @@ err_set_vbus:
 #ifdef CONFIG_USB_OTG_UTILS
 err_put_transceiver:
        if (ehci_mv->otg)
-               otg_put_transceiver(ehci_mv->otg);
+               usb_put_transceiver(ehci_mv->otg);
 #endif
 err_disable_clk:
        mv_ehci_disable(ehci_mv);
@@ -333,7 +333,7 @@ static int mv_ehci_remove(struct platform_device *pdev)
 
        if (ehci_mv->otg) {
                otg_set_host(ehci_mv->otg, NULL);
-               otg_put_transceiver(ehci_mv->otg);
+               usb_put_transceiver(ehci_mv->otg);
        }
 
        if (ehci_mv->mode == MV_USB_MODE_HOST) {
index 55978fcfa4b2ed3d7ef9e71af242bdd4e2a32884..b762fe0955b96194da360b669b4d4b5d4b3fe0cb 100644 (file)
@@ -220,7 +220,7 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
        /* Initialize the transceiver */
        if (pdata->otg) {
                pdata->otg->io_priv = hcd->regs + ULPI_VIEWPORT_OFFSET;
-               ret = otg_init(pdata->otg);
+               ret = usb_phy_init(pdata->otg);
                if (ret) {
                        dev_err(dev, "unable to init transceiver, probably missing\n");
                        ret = -ENODEV;
@@ -247,9 +247,11 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
                 * It's in violation of USB specs
                 */
                if (machine_is_mx51_efikamx() || machine_is_mx51_efikasb()) {
-                       flags = otg_io_read(pdata->otg, ULPI_OTG_CTRL);
+                       flags = usb_phy_io_read(pdata->otg,
+                                                       ULPI_OTG_CTRL);
                        flags |= ULPI_OTG_CTRL_CHRGVBUS;
-                       ret = otg_io_write(pdata->otg, flags, ULPI_OTG_CTRL);
+                       ret = usb_phy_io_write(pdata->otg, flags,
+                                                       ULPI_OTG_CTRL);
                        if (ret) {
                                dev_err(dev, "unable to set CHRVBUS\n");
                                goto err_add;
@@ -297,7 +299,7 @@ static int __exit ehci_mxc_drv_remove(struct platform_device *pdev)
                pdata->exit(pdev);
 
        if (pdata->otg)
-               otg_shutdown(pdata->otg);
+               usb_phy_shutdown(pdata->otg);
 
        usb_remove_hcd(hcd);
        iounmap(hcd->regs);
index 2e157144dcf6e13c2a348e01121c949cc6d4f4f8..701a0bf586231287954908ab010d71681d58300e 100644 (file)
@@ -733,7 +733,7 @@ static int tegra_ehci_probe(struct platform_device *pdev)
 
 #ifdef CONFIG_USB_OTG_UTILS
        if (pdata->operating_mode == TEGRA_USB_OTG) {
-               tegra->transceiver = otg_get_transceiver();
+               tegra->transceiver = usb_get_transceiver();
                if (tegra->transceiver)
                        otg_set_host(tegra->transceiver, &hcd->self);
        }
@@ -751,7 +751,7 @@ fail:
 #ifdef CONFIG_USB_OTG_UTILS
        if (tegra->transceiver) {
                otg_set_host(tegra->transceiver, NULL);
-               otg_put_transceiver(tegra->transceiver);
+               usb_put_transceiver(tegra->transceiver);
        }
 #endif
        tegra_usb_phy_close(tegra->phy);
@@ -809,7 +809,7 @@ static int tegra_ehci_remove(struct platform_device *pdev)
 #ifdef CONFIG_USB_OTG_UTILS
        if (tegra->transceiver) {
                otg_set_host(tegra->transceiver, NULL);
-               otg_put_transceiver(tegra->transceiver);
+               usb_put_transceiver(tegra->transceiver);
        }
 #endif
 
index db3968656d210df897d9030d25bb93a857100be8..744e25da800fa75e95aab2b04299035d09e8fe9a 100644 (file)
@@ -210,7 +210,7 @@ static int ohci_omap_init(struct usb_hcd *hcd)
 
 #ifdef CONFIG_USB_OTG
        if (need_transceiver) {
-               ohci->transceiver = otg_get_transceiver();
+               ohci->transceiver = usb_get_transceiver();
                if (ohci->transceiver) {
                        int     status = otg_set_host(ohci->transceiver,
                                                &ohci_to_hcd(ohci)->self);
index cb942b6cfe2baa228fb2018d48e6a27a7d16da20..ba96740de8969ea9927efcfb7271f8cbc4bd693c 100644 (file)
@@ -364,7 +364,7 @@ static int am35x_musb_init(struct musb *musb)
                return -ENODEV;
 
        usb_nop_xceiv_register();
-       musb->xceiv = otg_get_transceiver();
+       musb->xceiv = usb_get_transceiver();
        if (!musb->xceiv)
                return -ENODEV;
 
@@ -406,7 +406,7 @@ static int am35x_musb_exit(struct musb *musb)
        if (data->set_phy_power)
                data->set_phy_power(0);
 
-       otg_put_transceiver(musb->xceiv);
+       usb_put_transceiver(musb->xceiv);
        usb_nop_xceiv_unregister();
 
        return 0;
index fc8e9edbcb826d2c2cc6f3b9eb28819cd7afceed..5fefd656671b76392f08eb3e1da691190a23dfd8 100644 (file)
@@ -415,7 +415,7 @@ static int bfin_musb_init(struct musb *musb)
        gpio_direction_output(musb->config->gpio_vrsel, 0);
 
        usb_nop_xceiv_register();
-       musb->xceiv = otg_get_transceiver();
+       musb->xceiv = usb_get_transceiver();
        if (!musb->xceiv) {
                gpio_free(musb->config->gpio_vrsel);
                return -ENODEV;
@@ -440,7 +440,7 @@ static int bfin_musb_exit(struct musb *musb)
 {
        gpio_free(musb->config->gpio_vrsel);
 
-       otg_put_transceiver(musb->xceiv);
+       usb_put_transceiver(musb->xceiv);
        usb_nop_xceiv_unregister();
        return 0;
 }
index f0cb7767fa6ad47b512dc4bf9489accb8d0ee404..bd38119bc66c21b3a6537e52b23174bfd729621b 100644 (file)
@@ -425,7 +425,7 @@ static int da8xx_musb_init(struct musb *musb)
                goto fail;
 
        usb_nop_xceiv_register();
-       musb->xceiv = otg_get_transceiver();
+       musb->xceiv = usb_get_transceiver();
        if (!musb->xceiv)
                goto fail;
 
@@ -458,7 +458,7 @@ static int da8xx_musb_exit(struct musb *musb)
 
        phy_off();
 
-       otg_put_transceiver(musb->xceiv);
+       usb_put_transceiver(musb->xceiv);
        usb_nop_xceiv_unregister();
 
        return 0;
index f2a63dd0dfce275c641260b4b4d8436748a801fb..49a47d244a273fe27aff0d25b29103014d3b1f34 100644 (file)
@@ -384,7 +384,7 @@ static int davinci_musb_init(struct musb *musb)
        u32             revision;
 
        usb_nop_xceiv_register();
-       musb->xceiv = otg_get_transceiver();
+       musb->xceiv = usb_get_transceiver();
        if (!musb->xceiv)
                return -ENODEV;
 
@@ -443,7 +443,7 @@ static int davinci_musb_init(struct musb *musb)
        return 0;
 
 fail:
-       otg_put_transceiver(musb->xceiv);
+       usb_put_transceiver(musb->xceiv);
        usb_nop_xceiv_unregister();
        return -ENODEV;
 }
@@ -492,7 +492,7 @@ static int davinci_musb_exit(struct musb *musb)
 
        phy_off();
 
-       otg_put_transceiver(musb->xceiv);
+       usb_put_transceiver(musb->xceiv);
        usb_nop_xceiv_unregister();
 
        return 0;
index f9ecd5ebf267992c27d6a3131c5e3abbf8e9c73a..7e9be74dba4dd129a04e244f294d76af613c2cf4 100644 (file)
@@ -131,9 +131,9 @@ static inline struct musb *dev_to_musb(struct device *dev)
 /*-------------------------------------------------------------------------*/
 
 #ifndef CONFIG_BLACKFIN
-static int musb_ulpi_read(struct usb_phy *otg, u32 offset)
+static int musb_ulpi_read(struct usb_phy *phy, u32 offset)
 {
-       void __iomem *addr = otg->io_priv;
+       void __iomem *addr = phy->io_priv;
        int     i = 0;
        u8      r;
        u8      power;
@@ -165,10 +165,9 @@ static int musb_ulpi_read(struct usb_phy *otg, u32 offset)
        return musb_readb(addr, MUSB_ULPI_REG_DATA);
 }
 
-static int musb_ulpi_write(struct usb_phy *otg,
-               u32 offset, u32 data)
+static int musb_ulpi_write(struct usb_phy *phy, u32 offset, u32 data)
 {
-       void __iomem *addr = otg->io_priv;
+       void __iomem *addr = phy->io_priv;
        int     i = 0;
        u8      r = 0;
        u8      power;
@@ -200,7 +199,7 @@ static int musb_ulpi_write(struct usb_phy *otg,
 #define musb_ulpi_write                NULL
 #endif
 
-static struct otg_io_access_ops musb_ulpi_access = {
+static struct usb_phy_io_ops musb_ulpi_access = {
        .read = musb_ulpi_read,
        .write = musb_ulpi_write,
 };
index 0524a34be3c70a195c9f5e2e737f804673018f03..3a1793663d914a409c88835e1e80b67f20ad0c6e 100644 (file)
@@ -1703,7 +1703,7 @@ static int musb_gadget_vbus_draw(struct usb_gadget *gadget, unsigned mA)
 
        if (!musb->xceiv->set_power)
                return -EOPNOTSUPP;
-       return otg_set_power(musb->xceiv, mA);
+       return usb_phy_set_power(musb->xceiv, mA);
 }
 
 static int musb_gadget_pullup(struct usb_gadget *gadget, int is_on)
index a427fcb134309e027fa09382013c05d438245ef5..96a3d3763cc4d467ed232a84c1a0a7dbc986c4c2 100644 (file)
@@ -247,7 +247,7 @@ static void musb_otg_notifier_work(struct work_struct *data_notifier_work)
 
                if (!is_otg_enabled(musb) || musb->gadget_driver) {
                        pm_runtime_get_sync(musb->controller);
-                       otg_init(musb->xceiv);
+                       usb_phy_init(musb->xceiv);
                        omap2430_musb_set_vbus(musb, 1);
                }
                break;
@@ -257,7 +257,7 @@ static void musb_otg_notifier_work(struct work_struct *data_notifier_work)
 
                if (musb->gadget_driver)
                        pm_runtime_get_sync(musb->controller);
-               otg_init(musb->xceiv);
+               usb_phy_init(musb->xceiv);
                break;
 
        case USB_EVENT_NONE:
@@ -273,7 +273,7 @@ static void musb_otg_notifier_work(struct work_struct *data_notifier_work)
                        if (musb->xceiv->set_vbus)
                                otg_set_vbus(musb->xceiv, 0);
                }
-               otg_shutdown(musb->xceiv);
+               usb_phy_shutdown(musb->xceiv);
                break;
        default:
                dev_dbg(musb->controller, "ID float\n");
@@ -291,7 +291,7 @@ static int omap2430_musb_init(struct musb *musb)
         * up through ULPI.  TWL4030-family PMICs include one,
         * which needs a driver, drivers aren't always needed.
         */
-       musb->xceiv = otg_get_transceiver();
+       musb->xceiv = usb_get_transceiver();
        if (!musb->xceiv) {
                pr_err("HS USB OTG: no transceiver configured\n");
                return -ENODEV;
@@ -326,7 +326,7 @@ static int omap2430_musb_init(struct musb *musb)
                        musb_readl(musb->mregs, OTG_SIMENABLE));
 
        musb->nb.notifier_call = musb_otg_notifications;
-       status = otg_register_notifier(musb->xceiv, &musb->nb);
+       status = usb_register_notifier(musb->xceiv, &musb->nb);
 
        if (status)
                dev_dbg(musb->controller, "notification register failed\n");
@@ -350,7 +350,7 @@ static void omap2430_musb_enable(struct musb *musb)
        switch (musb->xceiv->last_event) {
 
        case USB_EVENT_ID:
-               otg_init(musb->xceiv);
+               usb_phy_init(musb->xceiv);
                if (data->interface_type != MUSB_INTERFACE_UTMI)
                        break;
                devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
@@ -369,7 +369,7 @@ static void omap2430_musb_enable(struct musb *musb)
                break;
 
        case USB_EVENT_VBUS:
-               otg_init(musb->xceiv);
+               usb_phy_init(musb->xceiv);
                break;
 
        default:
@@ -380,7 +380,7 @@ static void omap2430_musb_enable(struct musb *musb)
 static void omap2430_musb_disable(struct musb *musb)
 {
        if (musb->xceiv->last_event)
-               otg_shutdown(musb->xceiv);
+               usb_phy_shutdown(musb->xceiv);
 }
 
 static int omap2430_musb_exit(struct musb *musb)
@@ -389,7 +389,7 @@ static int omap2430_musb_exit(struct musb *musb)
        cancel_work_sync(&musb->otg_notifier_work);
 
        omap2430_low_level_exit(musb);
-       otg_put_transceiver(musb->xceiv);
+       usb_put_transceiver(musb->xceiv);
 
        return 0;
 }
@@ -495,7 +495,7 @@ static int omap2430_runtime_suspend(struct device *dev)
                                                OTG_INTERFSEL);
 
        omap2430_low_level_exit(musb);
-       otg_set_suspend(musb->xceiv, 1);
+       usb_phy_set_suspend(musb->xceiv, 1);
 
        return 0;
 }
@@ -509,7 +509,7 @@ static int omap2430_runtime_resume(struct device *dev)
        musb_writel(musb->mregs, OTG_INTERFSEL,
                                        musb->context.otg_interfsel);
 
-       otg_set_suspend(musb->xceiv, 0);
+       usb_phy_set_suspend(musb->xceiv, 0);
 
        return 0;
 }
index 0665c14cc54049112cac99065a82122271e3d073..496cc0364836d55f7d099afb288b19e91607efbb 100644 (file)
@@ -1078,7 +1078,7 @@ static int tusb_musb_init(struct musb *musb)
        int                     ret;
 
        usb_nop_xceiv_register();
-       musb->xceiv = otg_get_transceiver();
+       musb->xceiv = usb_get_transceiver();
        if (!musb->xceiv)
                return -ENODEV;
 
@@ -1130,7 +1130,7 @@ done:
                if (sync)
                        iounmap(sync);
 
-               otg_put_transceiver(musb->xceiv);
+               usb_put_transceiver(musb->xceiv);
                usb_nop_xceiv_unregister();
        }
        return ret;
@@ -1146,7 +1146,7 @@ static int tusb_musb_exit(struct musb *musb)
 
        iounmap(musb->sync_va);
 
-       otg_put_transceiver(musb->xceiv);
+       usb_put_transceiver(musb->xceiv);
        usb_nop_xceiv_unregister();
        return 0;
 }
index f7e04bf34a13a86f7439b2033b255137f10d039b..0f5667415b78cc2eb82aa6350d0875ca68785f71 100644 (file)
@@ -37,7 +37,7 @@ struct ux500_glue {
 
 static int ux500_musb_init(struct musb *musb)
 {
-       musb->xceiv = otg_get_transceiver();
+       musb->xceiv = usb_get_transceiver();
        if (!musb->xceiv) {
                pr_err("HS USB OTG: no transceiver configured\n");
                return -ENODEV;
@@ -48,7 +48,7 @@ static int ux500_musb_init(struct musb *musb)
 
 static int ux500_musb_exit(struct musb *musb)
 {
-       otg_put_transceiver(musb->xceiv);
+       usb_put_transceiver(musb->xceiv);
 
        return 0;
 }
@@ -160,7 +160,7 @@ static int ux500_suspend(struct device *dev)
        struct ux500_glue       *glue = dev_get_drvdata(dev);
        struct musb             *musb = glue_to_musb(glue);
 
-       otg_set_suspend(musb->xceiv, 1);
+       usb_phy_set_suspend(musb->xceiv, 1);
        clk_disable(glue->clk);
 
        return 0;
@@ -178,7 +178,7 @@ static int ux500_resume(struct device *dev)
                return ret;
        }
 
-       otg_set_suspend(musb->xceiv, 0);
+       usb_phy_set_suspend(musb->xceiv, 0);
 
        return 0;
 }