From: Greg Kroah-Hartman Date: Tue, 11 Sep 2012 20:48:01 +0000 (-0700) Subject: Merge tag 'xceiv-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=dcb9cf39c533a95be7dd0b2f7dfd73e04bf17c2d;p=openwrt%2Fstaging%2Fblogic.git Merge tag 'xceiv-for-v3.7' of git://git./linux/kernel/git/balbi/usb into usb-next 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 which should be used from now on for PHY drivers, even those which don't support OTG. --- dcb9cf39c533a95be7dd0b2f7dfd73e04bf17c2d diff --cc drivers/usb/host/ehci-tegra.c index 75eca42dd607,65408f7ae92b..6223d1757848 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@@ -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; @@@ -758,16 -759,25 +760,16 @@@ 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); + usb_phy_shutdown(&tegra->phy->u_phy); - iounmap(hcd->regs); + clk_disable_unprepare(tegra->clk); - clk_put(tegra->clk); clk_disable_unprepare(tegra->emc_clk); - clk_put(tegra->emc_clk); - kfree(tegra); return 0; }