f5283ed1238acbff205a67c495d4848d71efe7da
[openwrt/openwrt.git] / target / linux / ramips / patches-5.4 / 0069-awake-rt305x-dwc2-controller.patch
1 --- a/drivers/usb/dwc2/platform.c
2 +++ b/drivers/usb/dwc2/platform.c
3 @@ -430,6 +430,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 (readl(hsotg->regs + PCGCTL) & 0x0f) {
9 + writel(0x00, hsotg->regs + PCGCTL);
10 + /* TODO: mdelay(25) here? vendor driver don't use it */
11 + }
12 +
13 hsotg->needs_byte_swap = dwc2_check_core_endianness(hsotg);
14
15 retval = dwc2_get_dr_mode(hsotg);