diff options
Diffstat (limited to 'drivers/usb/dwc2/host.c')
-rw-r--r-- | drivers/usb/dwc2/host.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/host.c b/drivers/usb/dwc2/host.c index 13cb3472d7..510a07dfb9 100644 --- a/drivers/usb/dwc2/host.c +++ b/drivers/usb/dwc2/host.c @@ -788,3 +788,16 @@ int dwc2_register_host(struct dwc2 *dwc2) return usb_register_host(host); } + +void dwc2_host_uninit(struct dwc2 *dwc2) +{ + uint32_t hprt0; + + hprt0 = dwc2_readl(dwc2, HPRT0); + + /* Put everything in reset. */ + hprt0 &= ~(HPRT0_ENA | HPRT0_ENACHG | HPRT0_CONNDET | HPRT0_OVRCURRCHG); + hprt0 |= HPRT0_RST; + + dwc2_writel(dwc2, hprt0, HPRT0); +} |