aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-tegra.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-11 16:48:01 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-11 16:48:01 -0400
commitdcb9cf39c533a95be7dd0b2f7dfd73e04bf17c2d (patch)
tree7377bc0f6c36e94f17dafd93a003380186021d95 /drivers/usb/host/ehci-tegra.c
parent7135f08e47de094f8748507806efa8d7ba27a964 (diff)
parent363366cf61c544ea476f3d220f43a95cb03014f5 (diff)
Merge tag 'xceiv-for-v3.7' of git://git.kernel.org/pub/scm/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 <linux/usb/phy.h> which should be used from now on for PHY drivers, even those which don't support OTG.
Diffstat (limited to 'drivers/usb/host/ehci-tegra.c')
-rw-r--r--drivers/usb/host/ehci-tegra.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 75eca42dd607..6223d1757848 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -27,7 +27,7 @@
27#include <linux/of_gpio.h> 27#include <linux/of_gpio.h>
28#include <linux/pm_runtime.h> 28#include <linux/pm_runtime.h>
29 29
30#include <mach/usb_phy.h> 30#include <linux/usb/tegra_usb_phy.h>
31#include <mach/iomap.h> 31#include <mach/iomap.h>
32 32
33#define TEGRA_USB_DMA_ALIGN 32 33#define TEGRA_USB_DMA_ALIGN 32
@@ -49,7 +49,7 @@ static void tegra_ehci_power_up(struct usb_hcd *hcd)
49 49
50 clk_prepare_enable(tegra->emc_clk); 50 clk_prepare_enable(tegra->emc_clk);
51 clk_prepare_enable(tegra->clk); 51 clk_prepare_enable(tegra->clk);
52 tegra_usb_phy_power_on(tegra->phy); 52 usb_phy_set_suspend(&tegra->phy->u_phy, 0);
53 tegra->host_resumed = 1; 53 tegra->host_resumed = 1;
54} 54}
55 55
@@ -58,7 +58,7 @@ static void tegra_ehci_power_down(struct usb_hcd *hcd)
58 struct tegra_ehci_hcd *tegra = dev_get_drvdata(hcd->self.controller); 58 struct tegra_ehci_hcd *tegra = dev_get_drvdata(hcd->self.controller);
59 59
60 tegra->host_resumed = 0; 60 tegra->host_resumed = 0;
61 tegra_usb_phy_power_off(tegra->phy); 61 usb_phy_set_suspend(&tegra->phy->u_phy, 1);
62 clk_disable_unprepare(tegra->clk); 62 clk_disable_unprepare(tegra->clk);
63 clk_disable_unprepare(tegra->emc_clk); 63 clk_disable_unprepare(tegra->emc_clk);
64} 64}
@@ -715,7 +715,9 @@ static int tegra_ehci_probe(struct platform_device *pdev)
715 goto fail_io; 715 goto fail_io;
716 } 716 }
717 717
718 err = tegra_usb_phy_power_on(tegra->phy); 718 usb_phy_init(&tegra->phy->u_phy);
719
720 err = usb_phy_set_suspend(&tegra->phy->u_phy, 0);
719 if (err) { 721 if (err) {
720 dev_err(&pdev->dev, "Failed to power on the phy\n"); 722 dev_err(&pdev->dev, "Failed to power on the phy\n");
721 goto fail; 723 goto fail;
@@ -761,7 +763,7 @@ fail:
761 if (!IS_ERR_OR_NULL(tegra->transceiver)) 763 if (!IS_ERR_OR_NULL(tegra->transceiver))
762 otg_set_host(tegra->transceiver->otg, NULL); 764 otg_set_host(tegra->transceiver->otg, NULL);
763#endif 765#endif
764 tegra_usb_phy_close(tegra->phy); 766 usb_phy_shutdown(&tegra->phy->u_phy);
765fail_io: 767fail_io:
766 clk_disable_unprepare(tegra->emc_clk); 768 clk_disable_unprepare(tegra->emc_clk);
767fail_emc_clk: 769fail_emc_clk:
@@ -789,11 +791,10 @@ static int tegra_ehci_remove(struct platform_device *pdev)
789#endif 791#endif
790 792
791 usb_remove_hcd(hcd); 793 usb_remove_hcd(hcd);
792
793 tegra_usb_phy_close(tegra->phy);
794
795 usb_put_hcd(hcd); 794 usb_put_hcd(hcd);
796 795
796 usb_phy_shutdown(&tegra->phy->u_phy);
797
797 clk_disable_unprepare(tegra->clk); 798 clk_disable_unprepare(tegra->clk);
798 799
799 clk_disable_unprepare(tegra->emc_clk); 800 clk_disable_unprepare(tegra->emc_clk);