Skip to content

Commit

Permalink
USB: DWC3: Issue device soft reset before core soft reset
Browse files Browse the repository at this point in the history
Synopsys specification clearly states under section "Device Power-On or
Soft Reset" that DCTL.CSftRst=1 should be first step.  So, just follow
what specification says.

Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Pratyush Anand authored and Felipe Balbi committed Jun 22, 2012
1 parent 45627ac commit 58a0f23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/dwc3/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,6 @@ static int __devinit dwc3_core_init(struct dwc3 *dwc)
}
dwc->revision = reg;

dwc3_core_soft_reset(dwc);

/* issue device SoftReset too */
timeout = jiffies + msecs_to_jiffies(500);
dwc3_writel(dwc->regs, DWC3_DCTL, DWC3_DCTL_CSFTRST);
Expand All @@ -354,6 +352,8 @@ static int __devinit dwc3_core_init(struct dwc3 *dwc)
cpu_relax();
} while (true);

dwc3_core_soft_reset(dwc);

dwc3_cache_hwparams(dwc);

reg = dwc3_readl(dwc->regs, DWC3_GCTL);
Expand Down

0 comments on commit 58a0f23

Please sign in to comment.