Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ba8216f authored by Venu Byravarasu's avatar Venu Byravarasu Committed by Felipe Balbi
Browse files

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: default avatarVenu Byravarasu <vbyravarasu@nvidia.com>
Tested-by: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent de4217d9
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
obj-$(CONFIG_TEGRA_SYSTEM_DMA)		+= dma.o
obj-$(CONFIG_CPU_FREQ)                  += cpu-tegra.o
obj-$(CONFIG_TEGRA_PCI)			+= pcie.o
obj-$(CONFIG_USB_SUPPORT)		+= usb_phy.o

obj-$(CONFIG_ARCH_TEGRA_2x_SOC)		+= board-dt-tegra20.o
obj-$(CONFIG_ARCH_TEGRA_3x_SOC)		+= board-dt-tegra30.o
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@
#include <mach/irqs.h>
#include <mach/iomap.h>
#include <mach/dma.h>
#include <mach/usb_phy.h>
#include <linux/usb/tegra_usb_phy.h>

#include "gpio-names.h"
#include "devices.h"
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
#include <linux/platform_device.h>
#include <linux/platform_data/tegra_usb.h>

#include <mach/usb_phy.h>
#include <linux/usb/tegra_usb_phy.h>

extern struct tegra_ulpi_config tegra_ehci2_ulpi_phy_config;

+8 −6
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@
#include <linux/of_gpio.h>
#include <linux/pm_runtime.h>

#include <mach/usb_phy.h>
#include <linux/usb/tegra_usb_phy.h>
#include <mach/iomap.h>

#define TEGRA_USB_DMA_ALIGN 32
@@ -49,7 +49,7 @@ static void tegra_ehci_power_up(struct usb_hcd *hcd)

	clk_prepare_enable(tegra->emc_clk);
	clk_prepare_enable(tegra->clk);
	tegra_usb_phy_power_on(tegra->phy);
	usb_phy_set_suspend(&tegra->phy->u_phy, 0);
	tegra->host_resumed = 1;
}

@@ -58,7 +58,7 @@ static void tegra_ehci_power_down(struct usb_hcd *hcd)
	struct tegra_ehci_hcd *tegra = dev_get_drvdata(hcd->self.controller);

	tegra->host_resumed = 0;
	tegra_usb_phy_power_off(tegra->phy);
	usb_phy_set_suspend(&tegra->phy->u_phy, 1);
	clk_disable_unprepare(tegra->clk);
	clk_disable_unprepare(tegra->emc_clk);
}
@@ -715,7 +715,9 @@ static int tegra_ehci_probe(struct platform_device *pdev)
		goto fail_phy;
	}

	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;
@@ -762,7 +764,7 @@ fail:
		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:
@@ -801,7 +803,7 @@ static int tegra_ehci_remove(struct platform_device *pdev)
	usb_remove_hcd(hcd);
	usb_put_hcd(hcd);

	tegra_usb_phy_close(tegra->phy);
	usb_phy_shutdown(&tegra->phy->u_phy);
	iounmap(hcd->regs);

	clk_disable_unprepare(tegra->clk);
+1 −0
Original line number Diff line number Diff line
@@ -6,3 +6,4 @@ ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG

obj-$(CONFIG_USB_ISP1301)		+= isp1301.o
obj-$(CONFIG_MV_U3D_PHY)		+= mv_u3d_phy.o
obj-$(CONFIG_USB_EHCI_TEGRA)	+= tegra_usb_phy.o
Loading