From d03dfe43ca671fa55948654e5587dc7f6309c040 Mon Sep 17 00:00:00 2001 From: sakumisu <1203593632@qq.com> Date: Sun, 1 Sep 2024 11:59:11 +0800 Subject: update(port/dwc2/usb_hc_dwc2): power enable at last for common with other host ip --- port/dwc2/usb_hc_dwc2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/port/dwc2/usb_hc_dwc2.c b/port/dwc2/usb_hc_dwc2.c index 3171f60e..8b039c71 100644 --- a/port/dwc2/usb_hc_dwc2.c +++ b/port/dwc2/usb_hc_dwc2.c @@ -498,9 +498,6 @@ int usb_hc_init(struct usbh_bus *bus) /* Restart the Phy Clock */ USB_OTG_PCGCCTL = 0U; - dwc2_drivebus(bus, 1); - usb_osal_msleep(200); - /* Set default Max speed support */ USB_OTG_HOST->HCFG &= ~(USB_OTG_HCFG_FSLSS); @@ -531,6 +528,9 @@ int usb_hc_init(struct usbh_bus *bus) USB_OTG_GLB->GINTMSK |= (USB_OTG_GINTMSK_PRTIM | USB_OTG_GINTMSK_HCIM | USB_OTG_GINTSTS_DISCINT); + dwc2_drivebus(bus, 1); + usb_osal_msleep(200); + USB_OTG_GLB->GAHBCFG |= USB_OTG_GAHBCFG_GINT; return ret; -- cgit v1.3.1