mirror of
https://github.com/torvalds/linux.git
synced 2024-12-05 02:23:16 +00:00
PCI: imx6: Initialize PHY before deasserting core reset
When the PHY is the reference clock provider then it must be initialized and powered on before the reset on the client is deasserted, otherwise the link will never come up. The order was changed incf236e0c0d
. Restore the correct order to make the driver work again on boards where the PHY provides the reference clock. This also changes the order for boards where the Soc is the PHY reference clock divider, but this shouldn't do any harm. Link: https://lore.kernel.org/r/20221101095714.440001-1-s.hauer@pengutronix.de Fixes:cf236e0c0d
("PCI: imx6: Do not hide PHY driver callbacks and refine the error handling") Tested-by: Richard Zhu <hongxing.zhu@nxp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
This commit is contained in:
parent
8405d8f095
commit
ae6b9a65af
@ -952,12 +952,6 @@ static int imx6_pcie_host_init(struct dw_pcie_rp *pp)
|
||||
}
|
||||
}
|
||||
|
||||
ret = imx6_pcie_deassert_core_reset(imx6_pcie);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "pcie deassert core reset failed: %d\n", ret);
|
||||
goto err_phy_off;
|
||||
}
|
||||
|
||||
if (imx6_pcie->phy) {
|
||||
ret = phy_power_on(imx6_pcie->phy);
|
||||
if (ret) {
|
||||
@ -965,6 +959,13 @@ static int imx6_pcie_host_init(struct dw_pcie_rp *pp)
|
||||
goto err_phy_off;
|
||||
}
|
||||
}
|
||||
|
||||
ret = imx6_pcie_deassert_core_reset(imx6_pcie);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "pcie deassert core reset failed: %d\n", ret);
|
||||
goto err_phy_off;
|
||||
}
|
||||
|
||||
imx6_setup_phy_mpll(imx6_pcie);
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user