summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorNitin Kumbhar <nkumbhar@nvidia.com>2011-05-11 20:11:43 +0530
committerNitin Kumbhar <nkumbhar@nvidia.com>2011-05-11 20:11:43 +0530
commitfc12cc0d42360a66ad990e89592013be60004fb3 (patch)
tree3125ee702f9eea20d377ef0c74b18f6d00a2b164 /arch
parent4cd4ce07fc92c737003f8ead295626b17284c85b (diff)
arm: tegra: usb_phy: ulpi fix for tegra_3x_soc
Change-Id: Ia7155f3e94c127b18f2909f9f80583e5f74b8483
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/usb_phy.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c
index 9b66eb22f522..3ebde0232649 100644
--- a/arch/arm/mach-tegra/usb_phy.c
+++ b/arch/arm/mach-tegra/usb_phy.c
@@ -1055,6 +1055,7 @@ static void ulpi_set_trimmer(void __iomem *base, u8 data, u8 sdn, u8 dir)
static void ulpi_phy_restore_start(struct tegra_usb_phy *phy,
enum tegra_usb_phy_port_speed port_speed)
{
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
unsigned long val;
void __iomem *base = phy->regs;
@@ -1066,10 +1067,12 @@ static void ulpi_phy_restore_start(struct tegra_usb_phy *phy,
val = readl(base + ULPI_TIMING_CTRL_0);
val &= ~ULPI_OUTPUT_PINMUX_BYP;
writel(val, base + ULPI_TIMING_CTRL_0);
+#endif
}
static void ulpi_phy_restore_end(struct tegra_usb_phy *phy)
{
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
unsigned long val;
void __iomem *base = phy->regs;
@@ -1080,6 +1083,7 @@ static void ulpi_phy_restore_end(struct tegra_usb_phy *phy)
tegra_pinmux_set_tristate(TEGRA_PINGROUP_UAA, TEGRA_TRI_NORMAL);
tegra_pinmux_set_tristate(TEGRA_PINGROUP_UAB, TEGRA_TRI_NORMAL);
tegra_pinmux_set_tristate(TEGRA_PINGROUP_UDA, TEGRA_TRI_NORMAL);
+#endif
}
static int ulpi_phy_power_on(struct tegra_usb_phy *phy)
@@ -1118,13 +1122,16 @@ static int ulpi_phy_power_on(struct tegra_usb_phy *phy)
val |= USB_SUSP_CLR;
writel(val, base + USB_SUSP_CTRL);
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
if (utmi_wait_register(base + USB_SUSP_CTRL, USB_PHY_CLK_VALID,
USB_PHY_CLK_VALID) < 0)
pr_err("%s: timeout waiting for phy to stabilize\n", __func__);
if (utmi_wait_register(base + USB_SUSP_CTRL, USB_CLKEN, USB_CLKEN) < 0)
pr_err("%s: timeout waiting for AHB clock\n", __func__);
-
+#else
+ udelay(100);
+#endif
val = readl(base + USB_SUSP_CTRL);
val &= ~USB_SUSP_CLR;
writel(val, base + USB_SUSP_CTRL);