Merge "dwc3: gadget: Remove soft reset as part of gadget run_stop"
This commit is contained in:
commit
f1587d8660
1 changed files with 0 additions and 19 deletions
|
@ -1818,7 +1818,6 @@ static int dwc3_gadget_run_stop(struct dwc3 *dwc, int is_on, int suspend)
|
||||||
{
|
{
|
||||||
u32 reg;
|
u32 reg;
|
||||||
u32 timeout = 500;
|
u32 timeout = 500;
|
||||||
ktime_t start, diff;
|
|
||||||
|
|
||||||
reg = dwc3_readl(dwc->regs, DWC3_DCTL);
|
reg = dwc3_readl(dwc->regs, DWC3_DCTL);
|
||||||
if (is_on) {
|
if (is_on) {
|
||||||
|
@ -1831,24 +1830,6 @@ static int dwc3_gadget_run_stop(struct dwc3 *dwc, int is_on, int suspend)
|
||||||
if (dwc->revision >= DWC3_REVISION_194A)
|
if (dwc->revision >= DWC3_REVISION_194A)
|
||||||
reg &= ~DWC3_DCTL_KEEP_CONNECT;
|
reg &= ~DWC3_DCTL_KEEP_CONNECT;
|
||||||
|
|
||||||
start = ktime_get();
|
|
||||||
/* issue device SoftReset */
|
|
||||||
dwc3_writel(dwc->regs, DWC3_DCTL, reg | DWC3_DCTL_CSFTRST);
|
|
||||||
do {
|
|
||||||
reg = dwc3_readl(dwc->regs, DWC3_DCTL);
|
|
||||||
if (!(reg & DWC3_DCTL_CSFTRST))
|
|
||||||
break;
|
|
||||||
|
|
||||||
diff = ktime_sub(ktime_get(), start);
|
|
||||||
/* poll for max. 10ms */
|
|
||||||
if (ktime_to_ms(diff) > DWC3_SOFT_RESET_TIMEOUT) {
|
|
||||||
printk_ratelimited(KERN_ERR
|
|
||||||
"%s:core Reset Timed Out\n", __func__);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
cpu_relax();
|
|
||||||
} while (true);
|
|
||||||
|
|
||||||
|
|
||||||
dwc3_event_buffers_setup(dwc);
|
dwc3_event_buffers_setup(dwc);
|
||||||
dwc3_gadget_restart(dwc);
|
dwc3_gadget_restart(dwc);
|
||||||
|
|
Loading…
Add table
Reference in a new issue