summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorSuresh Mangipudi <smangipudi@nvidia.com>2011-09-14 14:33:45 +0530
committerVarun Colbert <vcolbert@nvidia.com>2011-09-27 17:48:32 -0700
commitc1152c404f5742f4bf7473d378d586b620e78a59 (patch)
tree42931ace03e568031cbe810ad41c2d95c78b3841 /arch/arm
parent00affb2c03ac7918ffc0961375855d5e4ff3fbb1 (diff)
usb: ehci: tegra: Hotplug detection
Removed the polling/PMC based method for the usb hotplug detection. Bug 865094 Reviewed-on: http://git-master/r/52284 (cherry picked from commit fcded668224e1ea37ff8b239b32867afcd4081b0) Change-Id: I8be9890d88f34af465f5e14a708443641b491ba3 Reviewed-on: http://git-master/r/54649 Reviewed-by: Rakesh Bodla <rbodla@nvidia.com> Tested-by: Rakesh Bodla <rbodla@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-tegra/include/mach/usb_phy.h2
-rw-r--r--arch/arm/mach-tegra/usb_phy.c48
2 files changed, 0 insertions, 50 deletions
diff --git a/arch/arm/mach-tegra/include/mach/usb_phy.h b/arch/arm/mach-tegra/include/mach/usb_phy.h
index ae6b60d44495..2b70e7e3b899 100644
--- a/arch/arm/mach-tegra/include/mach/usb_phy.h
+++ b/arch/arm/mach-tegra/include/mach/usb_phy.h
@@ -143,6 +143,4 @@ bool tegra_usb_phy_charger_detect(struct tegra_usb_phy *phy);
int __init tegra_usb_phy_init(struct usb_phy_plat_data *pdata, int size);
-bool tegra_usb_phy_is_device_detected(struct tegra_usb_phy *phy);
-
#endif /* __MACH_USB_PHY_H */
diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c
index f1ff319fa028..c774abfd1d99 100644
--- a/arch/arm/mach-tegra/usb_phy.c
+++ b/arch/arm/mach-tegra/usb_phy.c
@@ -1161,10 +1161,6 @@ static int utmi_phy_power_off(struct tegra_usb_phy *phy, bool is_dpd)
unsigned long val;
void __iomem *base = phy->regs;
-#ifndef CONFIG_ARCH_TEGRA_2x_SOC
- if (phy->mode == TEGRA_USB_PHY_MODE_HOST)
- utmip_setup_pmc_wake_detect(phy);
-#endif
if (phy->mode == TEGRA_USB_PHY_MODE_DEVICE) {
val = readl(base + USB_SUSP_CTRL);
val &= ~USB_WAKEUP_DEBOUNCE_COUNT(~0);
@@ -1217,13 +1213,6 @@ static int utmi_phy_power_off(struct tegra_usb_phy *phy, bool is_dpd)
val |= UTMIP_RESET;
writel(val, base + USB_SUSP_CTRL);
}
-#ifndef CONFIG_ARCH_TEGRA_2x_SOC
- if (phy->instance == 2) {
- val = readl(base + USB_SUSP_CTRL);
- val |= UTMIP_RESET;
- writel(val, base + USB_SUSP_CTRL);
- }
-#endif
utmip_pad_power_off(phy, true);
return 0;
}
@@ -2476,40 +2465,3 @@ int __init tegra_usb_phy_init(struct usb_phy_plat_data *pdata, int size)
return 0;
}
-bool tegra_usb_phy_is_device_detected(struct tegra_usb_phy *phy)
-{
- bool ret = 0;
-#ifndef CONFIG_ARCH_TEGRA_2x_SOC
- void __iomem *pmc_base = IO_ADDRESS(TEGRA_PMC_BASE);
- unsigned int inst = phy->instance;
- u32 val;
-
- /* Change wake event to FSK */
- val = readl(pmc_base + PMC_SLEEP_CFG);
- val |= UTMIP_WAKE_VAL(phy->instance, WAKE_VAL_FSK);
- writel(val, pmc_base + PMC_SLEEP_CFG);
-
- /* The minimum time for the registers to get updated */
- udelay(130);
-
- val = readl(pmc_base + UTMIP_UHSIC_STATUS);
- if ((UTMIP_USBON_VAL(phy->instance) |
- UTMIP_USBOP_VAL(phy->instance)) &val) {
- val = readl(pmc_base + PMC_SLEEP_CFG);
- val &= ~UTMIP_WAKE_VAL(inst, 0x0);
- val |= UTMIP_WAKE_VAL(inst, WAKE_VAL_NONE);
- writel(val, pmc_base + PMC_SLEEP_CFG);
-
- val = readl(pmc_base + PMC_TRIGGERS);
- val |= UTMIP_CLR_WAKE_ALARM(inst) | UTMIP_CLR_WALK_PTR(inst);
- writel(val, pmc_base + PMC_TRIGGERS);
-
- val = readl(pmc_base + PMC_SLEEP_CFG);
- val &= ~(UTMIP_MASTER_ENABLE(inst) |UTMIP_FSLS_USE_PMC(inst) |
- UTMIP_RCTRL_USE_PMC(inst) |UTMIP_TCTRL_USE_PMC(inst));
- writel(val, pmc_base + PMC_SLEEP_CFG);
- ret = 1;
- }
-#endif
- return ret;
-}