When reboot or shutdown, hcd clean urbs and disable host interrupts. But
there may pending interrupts, so clean them.
Change-Id: Ide34aab5857a790a0912fb56ebe18d43ba228cf0
Signed-off-by: Feng Mingli <fml@rock-chips.com>
Signed-off-by: Yunzhi Li <lyz@rock-chips.com>
intr_mask.b.nptxfempty = 1;
DWC_MODIFY_REG32(&global_regs->gintmsk, intr_mask.d32, 0);
+ /* Clear pending interrupts */
+ DWC_WRITE_REG32(&global_regs->gintsts, intr_mask.d32);
}
/**
pldata = hcd->core_if->otg_dev->pldata;
DWC_DEBUGPL(DBG_HCD, "DWC OTG HCD STOP\n");
- /* Turn off all host-specific interrupts. */
- dwc_otg_disable_host_interrupts(hcd->core_if);
-
/*
* Set status flags for the hub driver.
*/
* and the QH lists (via ..._hcd_endpoint_disable).
*/
DWC_SPINLOCK_IRQSAVE(hcd->lock, &flags);
+ /* Turn off all host-specific interrupts. */
+ dwc_otg_disable_host_interrupts(hcd->core_if);
+
kill_all_urbs(hcd);
DWC_SPINUNLOCK_IRQRESTORE(hcd->lock, flags);