Merge "dwc3: gadget: Remove soft reset as part of gadget run_stop"

This commit is contained in:
Linux Build Service Account 2018-11-09 16:15:27 -08:00 committed by Gerrit - the friendly Code Review server
commit f1587d8660

View file

@ -1818,7 +1818,6 @@ static int dwc3_gadget_run_stop(struct dwc3 *dwc, int is_on, int suspend)
{
u32 reg;
u32 timeout = 500;
ktime_t start, diff;
reg = dwc3_readl(dwc->regs, DWC3_DCTL);
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)
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_gadget_restart(dwc);