summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorNitin Kumbhar <nkumbhar@nvidia.com>2011-04-01 17:00:08 +0530
committerNitin Kumbhar <nkumbhar@nvidia.com>2011-04-01 17:00:08 +0530
commit677368f44ce65fe2292f696f0bfd568d3ac78436 (patch)
treee8317363967fbeef2680f4bca50bbda970d17f61 /drivers/usb
parenta8a882acd1b12930328b0090ff40a984f754eda6 (diff)
parent17a2400a982bbf7aaabe89d7bacf32f600d4e751 (diff)
merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36
Conflicts: drivers/serial/tegra_hsuart.c drivers/usb/host/ehci-tegra.c Change-Id: Ief6c03a63615a41e85de59ad14dedef309d0b2fb
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ehci-tegra.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 29ae36d22e12..184c1783d6c7 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -36,6 +36,8 @@
#define TEGRA_USB_DMA_ALIGN 32
+#define STS_SRI (1<<7) /* SOF Recieved */
+
struct tegra_ehci_hcd {
struct ehci_hcd *ehci;
struct tegra_usb_phy *phy;
@@ -81,9 +83,9 @@ static int tegra_ehci_hub_control(
{
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
int ports = HCS_N_PORTS(ehci->hcs_params);
- u32 __iomem *status_reg = &ehci->regs->port_status[
- (wIndex & 0xff) - 1];
u32 temp, status;
+ u32 __iomem *status_reg;
+ u32 usbsts_reg;
unsigned long flags;
int retval = 0;
unsigned selector;
@@ -161,6 +163,26 @@ static int tegra_ehci_hub_control(
ehci->reset_done[wIndex-1] = jiffies + msecs_to_jiffies(25);
+ ehci_dbg(ehci, "%s:USBSTS = 0x%x", __func__,
+ ehci_readl(ehci, &ehci->regs->status));
+ usbsts_reg = ehci_readl(ehci, &ehci->regs->status);
+ ehci_writel(ehci, usbsts_reg, &ehci->regs->status);
+ usbsts_reg = ehci_readl(ehci, &ehci->regs->status);
+ udelay(20);
+
+ if (handshake(ehci, &ehci->regs->status, STS_SRI, STS_SRI, 2000))
+ pr_err("%s: timeout set for STS_SRI\n", __func__);
+
+ usbsts_reg = ehci_readl(ehci, &ehci->regs->status);
+ ehci_writel(ehci, usbsts_reg, &ehci->regs->status);
+
+ if (handshake(ehci, &ehci->regs->status, STS_SRI, 0, 2000))
+ pr_err("%s: timeout clear STS_SRI\n", __func__);
+
+ if (handshake(ehci, &ehci->regs->status, STS_SRI, STS_SRI, 2000))
+ pr_err("%s: timeout set STS_SRI\n", __func__);
+
+ udelay(20);
temp &= ~(PORT_RWC_BITS | PORT_WAKE_BITS);
/* start resume signalling */
ehci_writel(ehci, temp | PORT_RESUME, status_reg);