summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorSuresh Mangipudi <smangipudi@nvidia.com>2012-07-24 12:52:00 +0530
committerSimone Willett <swillett@nvidia.com>2012-07-27 18:18:40 -0700
commit1ba003bf6ab67b77e684ee7ca88de6897c16e074 (patch)
treece53f92104227df0808b374f3f8087590885061f /drivers/usb
parent3d51e1972471a6daf203b7e0b05e42afe117f3a7 (diff)
usb: ehci: tegra: Update RUN bit properly.
Read the RUN bit and update it properly. Remove unused variable. Change-Id: I1df5dc99ce40e2ca15f0ade28d156a7262467519 Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com> Reviewed-on: http://git-master/r/117958 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ehci-tegra.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 41e0fce515e3..51670a91726e 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -210,6 +210,7 @@ static int tegra_ehci_hub_control(
switch (typeReq) {
case GetPortStatus:
if (tegra->port_resuming) {
+ u32 cmd;
int delay = ehci->reset_done[wIndex-1] - jiffies;
/* Sometimes it seems we get called too soon... In that case, wait.*/
if (delay > 0) {
@@ -224,9 +225,11 @@ static int tegra_ehci_hub_control(
tegra_usb_phy_post_resume(tegra->phy);
tegra->port_resuming = 0;
/* If run bit is not set by now enable it */
- if (ehci->command & CMD_RUN) {
+ cmd = ehci_readl(ehci, &ehci->regs->command);
+ if (!(cmd & CMD_RUN)) {
+ cmd |= CMD_RUN;
ehci->command |= CMD_RUN;
- ehci_writel(ehci, ehci->command, &ehci->regs->command);
+ ehci_writel(ehci, cmd, &ehci->regs->command);
}
/* Now we can safely re-enable irqs */
ehci_writel(ehci, INTR_MASK, &ehci->regs->intr_enable);