Skip to content

Commit 541768b

Browse files
r-vigneshFelipe Balbi
authored andcommitted
usb: dwc3: core: Call dwc3_core_get_phy() before initializing phys
commit f54edb5 ("usb: dwc3: core: initialize ULPI before trying to get the PHY") moved call to dwc3_core_get_phy() from dwc3_probe() to dwc3_core_init() after dwc3_core_soft_reset(). But dwc3_core_soft_reset() calls phy_init(), therefore dwc3_core_get_phy() needs to be called before dwc3_core_soft_reset(). Fix this by moving call to dwc3_core_get_phy() before dwc3_core_soft_reset(). This fixes the following abort seen on DRA7xx platforms [ 24.769118] usb usb2: SerialNumber: xhci-hcd.1.auto [ 24.781144] hub 2-0:1.0: USB hub found [ 24.787836] hub 2-0:1.0: 1 port detected [ 24.809939] Unhandled fault: imprecise external abort (0x1406) at 0x00000000 Reported-by: Carlos Hernandez <[email protected]> Signed-off-by: Vignesh R <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
1 parent 5771a8c commit 541768b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/usb/dwc3/core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -766,15 +766,15 @@ static int dwc3_core_init(struct dwc3 *dwc)
766766
dwc->maximum_speed = USB_SPEED_HIGH;
767767
}
768768

769-
ret = dwc3_core_soft_reset(dwc);
769+
ret = dwc3_core_get_phy(dwc);
770770
if (ret)
771771
goto err0;
772772

773-
ret = dwc3_phy_setup(dwc);
773+
ret = dwc3_core_soft_reset(dwc);
774774
if (ret)
775775
goto err0;
776776

777-
ret = dwc3_core_get_phy(dwc);
777+
ret = dwc3_phy_setup(dwc);
778778
if (ret)
779779
goto err0;
780780

0 commit comments

Comments
 (0)