ar71xx: improve support for TP-Link CPE510 v2
[oweals/openwrt.git] / target / linux / ramips / patches-4.14 / 0069-awake-rt305x-dwc2-controller.patch
1 --- a/drivers/usb/dwc2/platform.c
2 +++ b/drivers/usb/dwc2/platform.c
3 @@ -406,6 +406,12 @@ static int dwc2_driver_probe(struct plat
4         if (retval)
5                 return retval;
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         retval = dwc2_get_dr_mode(hsotg);
14         if (retval)
15                 goto error;