Fresh pull from upstream
[librecmc/librecmc.git] / target / linux / ramips / patches-4.4 / 0069-awake-rt305x-dwc2-controller.patch
1 --- a/drivers/usb/dwc2/platform.c
2 +++ b/drivers/usb/dwc2/platform.c
3 @@ -375,6 +375,12 @@ static int dwc2_driver_probe(struct plat
4         dev_dbg(&dev->dev, "mapped PA %08lx to VA %p\n",
5                 (unsigned long)res->start, hsotg->regs);
6  
7 +       /* Enable USB port before any regs access */
8 +       if (dwc2_readl(hsotg->regs + PCGCTL) & 0x0f) {
9 +               dwc2_writel(0x00, hsotg->regs + PCGCTL);
10 +               /* TODO: mdelay(25) here? vendor driver don't use it */
11 +       }
12 +
13         hsotg->dr_mode = usb_get_dr_mode(&dev->dev);
14         if (IS_ENABLED(CONFIG_USB_DWC2_HOST) &&
15                         hsotg->dr_mode != USB_DR_MODE_HOST) {