diff options
author | Venu Byravarasu <vbyravarasu@nvidia.com> | 2012-09-05 09:20:23 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-09-05 09:43:57 -0400 |
commit | 1ba8216f0bc02af6ba70d1108d60eb1b064395e4 (patch) | |
tree | 6b7c478d2e4f63ff837678c4a99a4a854801ec86 /drivers/usb/host/ehci-tegra.c | |
parent | de4217d90fed1b1714a270ceb5d092f7314e8bda (diff) |
usb: move phy driver from mach-tegra to drivers/usb
As part of this patch:
1. Moved existing tegra phy driver to drivers/USB directory.
2. Added standard USB phy driver APIs to tegra phy driver.
Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/host/ehci-tegra.c')
-rw-r--r-- | drivers/usb/host/ehci-tegra.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 950e95efa381..65408f7ae92b 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_phy; | 715 | goto fail_phy; |
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; |
@@ -762,7 +764,7 @@ fail: | |||
762 | usb_put_phy(tegra->transceiver); | 764 | usb_put_phy(tegra->transceiver); |
763 | } | 765 | } |
764 | #endif | 766 | #endif |
765 | tegra_usb_phy_close(tegra->phy); | 767 | usb_phy_shutdown(&tegra->phy->u_phy); |
766 | fail_phy: | 768 | fail_phy: |
767 | iounmap(hcd->regs); | 769 | iounmap(hcd->regs); |
768 | fail_io: | 770 | fail_io: |
@@ -801,7 +803,7 @@ static int tegra_ehci_remove(struct platform_device *pdev) | |||
801 | usb_remove_hcd(hcd); | 803 | usb_remove_hcd(hcd); |
802 | usb_put_hcd(hcd); | 804 | usb_put_hcd(hcd); |
803 | 805 | ||
804 | tegra_usb_phy_close(tegra->phy); | 806 | usb_phy_shutdown(&tegra->phy->u_phy); |
805 | iounmap(hcd->regs); | 807 | iounmap(hcd->regs); |
806 | 808 | ||
807 | clk_disable_unprepare(tegra->clk); | 809 | clk_disable_unprepare(tegra->clk); |