usb: dwc3: core: Call dwc3_core_get_phy() before initializing phys
authorVignesh R <vigneshr@ti.com>
Thu, 29 Jun 2017 05:25:14 +0000 (10:55 +0530)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 17 Jul 2017 07:58:56 +0000 (10:58 +0300)
commit541768b08a400d9d292cfd9c898401b8178856ac
treeb14e103763242586a06dcb9a640fa52e50c9a499
parent5771a8c08880cdca3bfb4a3fc6d309d6bba20877
usb: dwc3: core: Call dwc3_core_get_phy() before initializing phys

commit f54edb539c116 ("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 <ceh@ti.com>
Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/core.c