summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorVinod Atyam <vatyam@nvidia.com>2012-06-12 21:30:02 +0530
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-06-14 06:09:22 -0700
commit55a62c544614c7fde350ac1f4a080b267a211456 (patch)
treee39f7b710eaaff005b725517e8dd1bfddfc90bfe /arch
parente97981334b3c651799064f2bbc4bc5410f2a63a7 (diff)
ARM: tegra: usb_phy: Fixing HSIC port power code
Fixing the port power code for HSIC. During USB driver re-designing, port power code was incorrectly merged. Fixing the code now. Bug 889618 Bug 951061 Change-Id: I1b65662ed864343911abaffb58439ca2996543e7 Signed-off-by: Vinod Atyam <vatyam@nvidia.com> Reviewed-on: http://git-master/r/108302 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/tegra2_usb_phy.c3
-rw-r--r--arch/arm/mach-tegra/tegra3_usb_phy.c10
-rw-r--r--arch/arm/mach-tegra/usb_phy.c3
3 files changed, 5 insertions, 11 deletions
diff --git a/arch/arm/mach-tegra/tegra2_usb_phy.c b/arch/arm/mach-tegra/tegra2_usb_phy.c
index 7b18333cc77c..f0d5ebda2a37 100644
--- a/arch/arm/mach-tegra/tegra2_usb_phy.c
+++ b/arch/arm/mach-tegra/tegra2_usb_phy.c
@@ -1177,6 +1177,9 @@ static int uhsic_phy_bus_port_power(struct tegra_usb_phy *phy)
val &= ~USB_USBCMD_RS;
writel(val, base + USB_USBCMD);
+ if (phy->pdata->ops && phy->pdata->ops->port_power)
+ phy->pdata->ops->port_power();
+
if (usb_phy_reg_status_wait(base + UHSIC_STAT_CFG0,
UHSIC_CONNECT_DETECT, UHSIC_CONNECT_DETECT, 2000)) {
pr_err("%s: timeout waiting for UHSIC_CONNECT_DETECT\n",
diff --git a/arch/arm/mach-tegra/tegra3_usb_phy.c b/arch/arm/mach-tegra/tegra3_usb_phy.c
index e404382daca0..01ebc2f89bf7 100644
--- a/arch/arm/mach-tegra/tegra3_usb_phy.c
+++ b/arch/arm/mach-tegra/tegra3_usb_phy.c
@@ -2212,9 +2212,6 @@ int uhsic_phy_bus_port_power(struct tegra_usb_phy *phy)
void __iomem *base = phy->regs;
DBG("%s(%d) inst:[%d]\n", __func__, __LINE__, phy->inst);
- val = readl(base + UHSIC_STAT_CFG0);
- val &= ~UHSIC_CONNECT_DETECT;
- writel(val, base + UHSIC_STAT_CFG0);
val = readl(base + USB_USBMODE);
val |= USB_USBMODE_HOST;
@@ -2239,13 +2236,10 @@ int uhsic_phy_bus_port_power(struct tegra_usb_phy *phy)
val = readl(base + UHSIC_PADS_CFG1);
val &= ~UHSIC_RPD_STROBE;
- /* safe to enable RPU on STROBE at all times during idle */
- val |= UHSIC_RPU_STROBE;
writel(val, base + UHSIC_PADS_CFG1);
- val = readl(base + USB_USBCMD);
- val &= ~USB_USBCMD_RS;
- writel(val, base + USB_USBCMD);
+ if (phy->pdata->ops && phy->pdata->ops->port_power)
+ phy->pdata->ops->port_power();
if (usb_phy_reg_status_wait(base + UHSIC_STAT_CFG0,
UHSIC_CONNECT_DETECT, UHSIC_CONNECT_DETECT, 25000)) {
diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c
index 07fb86ed285c..041a5434ca03 100644
--- a/arch/arm/mach-tegra/usb_phy.c
+++ b/arch/arm/mach-tegra/usb_phy.c
@@ -623,9 +623,6 @@ int tegra_usb_phy_port_power(struct tegra_usb_phy *phy)
if (phy->ops && phy->ops->port_power)
status = phy->ops->port_power(phy);
- if (phy->pdata->ops && phy->pdata->ops->port_power)
- phy->pdata->ops->port_power();
-
return status;
}
int tegra_usb_phy_bus_reset(struct tegra_usb_phy *phy)