diff options
author | Vinayak Pane <vpane@nvidia.com> | 2011-12-13 20:34:30 -0800 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2012-01-30 12:31:39 -0800 |
commit | a882618b895bfad07b59f97e70964fc3adda82e0 (patch) | |
tree | 5a27cc536e873e2e7891f5fc54ccaca415bb7969 /arch/arm/mach-tegra/usb_phy.c | |
parent | bac4549bd4c8a8481db8d1c89e08702c8d7e0794 (diff) |
tegra: usb: phy: Pullup HSIC strobe at idle
Correcting the strobe and SOFs behaviour. This avoids run-stop
bit to start before actual bus_reset. Also, pullup the
strobe signal during idle and wait for connect detect
after bus idle.
Bug 898008
Bug 922444
Reviewed-on: http://git-master/r/73261
Change-Id: I01999521013677f159ee9c12f2d7bcb453c3b39d
Signed-off-by: Vinayak Pane <vpane@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/77748
Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'arch/arm/mach-tegra/usb_phy.c')
-rw-r--r-- | arch/arm/mach-tegra/usb_phy.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c index 8820a2626282..32ae3744b3ae 100644 --- a/arch/arm/mach-tegra/usb_phy.c +++ b/arch/arm/mach-tegra/usb_phy.c @@ -2806,14 +2806,26 @@ int tegra_usb_phy_bus_idle(struct tegra_usb_phy *phy) val = readl(base + UHSIC_PADS_CFG1); val &= ~UHSIC_RPD_STROBE; -#ifdef CONFIG_ARCH_TEGRA_2x_SOC + /* safe to enable RPU on STROBE at all times during idle */ val |= UHSIC_RPU_STROBE; -#endif writel(val, base + UHSIC_PADS_CFG1); + val = readl(base + USB_USBCMD); + val &= ~USB_USBCMD_RS; + writel(val, base + USB_USBCMD); + if (uhsic_config->usb_phy_ready && uhsic_config->usb_phy_ready()) return -EAGAIN; + + /* wait for connect detect */ + if (utmi_wait_register(base + UHSIC_STAT_CFG0, + UHSIC_CONNECT_DETECT, UHSIC_CONNECT_DETECT) < 0) { + pr_err("%s: timeout waiting for hsic connect detect\n", + __func__); + return -ETIMEDOUT; + } + } return 0; } |