Merge tag 'xceiv-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Sep 2012 20:48:01 +0000 (13:48 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Sep 2012 20:48:01 +0000 (13:48 -0700)
usb: xceiv: patches for v3.7 merge window

nop xceiv got its own header to avoid polluting otg.h. It has also
learned to work as USB2 and USB3 phys so we can use it on USB3
controllers.

Together with those two changes to nop xceiv, we're adding basic
PHY support to dwc3 driver, this is to allow platforms which actually
have a SW-controllable PHY talk to them through dwc3 driver.

We're adding a new phy driver for the OMAP architecture. This driver
is for the PHY found in OMAP4 SoCs, and a new phy driver for the
marvell architecture. An extra phy driver - for Tegra SoCs - is now
moving from arch/arm/mach-tegra* to drivers/usb/phy.

Also here, there's the creation of <linux/usb/phy.h> which should be
used from now on for PHY drivers, even those which don't support
OTG.

1  2 
drivers/usb/host/ehci-tegra.c
drivers/usb/musb/musb_dsps.c

index 75eca42dd6072f332750f7b54b92d89139296251,65408f7ae92bd7ac6216b76c83829546723c6205..6223d1757848c6d43db7aa59d7042b1c8c736f02
@@@ -712,10 -712,12 +712,12 @@@ static int tegra_ehci_probe(struct plat
        if (IS_ERR(tegra->phy)) {
                dev_err(&pdev->dev, "Failed to open USB phy\n");
                err = -ENXIO;
 -              goto fail_phy;
 +              goto fail_io;
        }
  
-       err = tegra_usb_phy_power_on(tegra->phy);
+       usb_phy_init(&tegra->phy->u_phy);
+       err = usb_phy_set_suspend(&tegra->phy->u_phy, 0);
        if (err) {
                dev_err(&pdev->dev, "Failed to power on the phy\n");
                goto fail;
  
  fail:
  #ifdef CONFIG_USB_OTG_UTILS
 -      if (!IS_ERR_OR_NULL(tegra->transceiver)) {
 +      if (!IS_ERR_OR_NULL(tegra->transceiver))
                otg_set_host(tegra->transceiver->otg, NULL);
 -              usb_put_phy(tegra->transceiver);
 -      }
  #endif
-       tegra_usb_phy_close(tegra->phy);
+       usb_phy_shutdown(&tegra->phy->u_phy);
 -fail_phy:
 -      iounmap(hcd->regs);
  fail_io:
        clk_disable_unprepare(tegra->emc_clk);
 -      clk_put(tegra->emc_clk);
  fail_emc_clk:
        clk_disable_unprepare(tegra->clk);
 -fail_clken:
 -      clk_put(tegra->clk);
  fail_clk:
        usb_put_hcd(hcd);
 -fail_hcd:
 -      kfree(tegra);
        return err;
  }
  
@@@ -789,15 -799,20 +791,14 @@@ static int tegra_ehci_remove(struct pla
  #endif
  
        usb_remove_hcd(hcd);
-       tegra_usb_phy_close(tegra->phy);
        usb_put_hcd(hcd);
  
 -      iounmap(hcd->regs);
+       usb_phy_shutdown(&tegra->phy->u_phy);
        clk_disable_unprepare(tegra->clk);
 -      clk_put(tegra->clk);
  
        clk_disable_unprepare(tegra->emc_clk);
 -      clk_put(tegra->emc_clk);
  
 -      kfree(tegra);
        return 0;
  }
  
Simple merge