summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSuresh Mangipudi <smangipudi@nvidia.com>2011-09-14 14:33:45 +0530
committerVarun Colbert <vcolbert@nvidia.com>2011-09-14 17:00:27 -0700
commitfcded668224e1ea37ff8b239b32867afcd4081b0 (patch)
tree4f070618cecc8d672ed188167123ffbb737228fd /arch
parentb57dc4b9ba62b4f8f37508e90c02ff390cc07f83 (diff)
usb: ehci: tegra: Hotplug detection
Removed the polling/PMC based method for the usb hotplug detection. Bug 865094 Change-Id: Idad6eb4a25fc0c589b46f11d5d8a47a41b60f251 Reviewed-on: http://git-master/r/52284 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'arch')
-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 342d6c2bce43..dc1ec561a910 100644
--- a/arch/arm/mach-tegra/include/mach/usb_phy.h
+++ b/arch/arm/mach-tegra/include/mach/usb_phy.h
@@ -147,6 +147,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 56819103ffeb..eb3d07887221 100644
--- a/arch/arm/mach-tegra/usb_phy.c
+++ b/arch/arm/mach-tegra/usb_phy.c
@@ -1200,10 +1200,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);
@@ -1256,13 +1252,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;
}
@@ -2526,40 +2515,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;
-}