diff options
author | Nitin Kumbhar <nkumbhar@nvidia.com> | 2010-11-16 18:28:16 +0530 |
---|---|---|
committer | Nitin Kumbhar <nkumbhar@nvidia.com> | 2010-11-16 18:28:16 +0530 |
commit | eab94951f140beb6ed5465208cf0b0bd518b7bdc (patch) | |
tree | f932bc5893de5eb6630394b75bfac7a66f39e7e8 /arch/arm/mach-tegra/usb_phy.c | |
parent | 05d829ac1d6a8429a61b56cef3a1adfb50168c4e (diff) | |
parent | 1730a615ef7ff48c40c3dd55296df8c580072850 (diff) |
merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36
Change-Id: I8f323ecc04e0ccefa31d6533b58b7878675bf8c9
Diffstat (limited to 'arch/arm/mach-tegra/usb_phy.c')
-rw-r--r-- | arch/arm/mach-tegra/usb_phy.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c index 45aec0572545..71e581512151 100644 --- a/arch/arm/mach-tegra/usb_phy.c +++ b/arch/arm/mach-tegra/usb_phy.c @@ -67,6 +67,7 @@ #define UTMIP_PHY_ENABLE (1 << 12) #define ULPI_PHY_ENABLE (1 << 13) #define USB_SUSP_SET (1 << 14) +#define USB_WAKEUP_DEBOUNCE_COUNT(x) (((x) & 0x7) << 16) #define USB1_LEGACY_CTRL 0x410 #define USB1_NO_LEGACY_MODE (1 << 0) @@ -466,13 +467,18 @@ static void utmi_phy_power_off(struct tegra_usb_phy *phy) void __iomem *base = phy->regs; utmi_phy_clk_disable(phy); + if (phy->instance == 0 && phy->mode == TEGRA_USB_PHY_MODE_HOST) { gpio_free(TEGRA_GPIO_PD0); tegra_pinmux_set_tristate(TEGRA_PINGROUP_SLXK, TEGRA_TRI_TRISTATE); } - val = readl(base + USB_SUSP_CTRL); - val |= USB_WAKE_ON_CNNT_EN_DEV | USB_WAKE_ON_DISCON_EN_DEV; - writel(val, base + USB_SUSP_CTRL); + + if (phy->mode == TEGRA_USB_PHY_MODE_DEVICE) { + val = readl(base + USB_SUSP_CTRL); + val &= ~USB_WAKEUP_DEBOUNCE_COUNT(~0); + val |= USB_WAKE_ON_CNNT_EN_DEV | USB_WAKEUP_DEBOUNCE_COUNT(5); + writel(val, base + USB_SUSP_CTRL); + } val = readl(base + USB_SUSP_CTRL); val |= UTMIP_RESET; |