mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-12 22:46:48 +07:00
usb: dwc3: core: initialize ULPI before trying to get the PHY
If don't reorder initialization like this, we will never be able to get a reference to ULPI PHYs. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
parent
e0082698b6
commit
f54edb539c
@ -721,6 +721,8 @@ static void dwc3_core_setup_global_control(struct dwc3 *dwc)
|
|||||||
dwc3_writel(dwc->regs, DWC3_GCTL, reg);
|
dwc3_writel(dwc->regs, DWC3_GCTL, reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int dwc3_core_get_phy(struct dwc3 *dwc);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dwc3_core_init - Low-level initialization of DWC3 Core
|
* dwc3_core_init - Low-level initialization of DWC3 Core
|
||||||
* @dwc: Pointer to our controller context structure
|
* @dwc: Pointer to our controller context structure
|
||||||
@ -759,6 +761,10 @@ static int dwc3_core_init(struct dwc3 *dwc)
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto err0;
|
goto err0;
|
||||||
|
|
||||||
|
ret = dwc3_core_get_phy(dwc);
|
||||||
|
if (ret)
|
||||||
|
goto err0;
|
||||||
|
|
||||||
dwc3_core_setup_global_control(dwc);
|
dwc3_core_setup_global_control(dwc);
|
||||||
dwc3_core_num_eps(dwc);
|
dwc3_core_num_eps(dwc);
|
||||||
|
|
||||||
@ -1156,10 +1162,6 @@ static int dwc3_probe(struct platform_device *pdev)
|
|||||||
platform_set_drvdata(pdev, dwc);
|
platform_set_drvdata(pdev, dwc);
|
||||||
dwc3_cache_hwparams(dwc);
|
dwc3_cache_hwparams(dwc);
|
||||||
|
|
||||||
ret = dwc3_core_get_phy(dwc);
|
|
||||||
if (ret)
|
|
||||||
goto err0;
|
|
||||||
|
|
||||||
spin_lock_init(&dwc->lock);
|
spin_lock_init(&dwc->lock);
|
||||||
|
|
||||||
pm_runtime_set_active(dev);
|
pm_runtime_set_active(dev);
|
||||||
|
Loading…
Reference in New Issue
Block a user