]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: imx6: Initialize PHY before deasserting core reset
authorSascha Hauer <s.hauer@pengutronix.de>
Tue, 1 Nov 2022 09:57:14 +0000 (10:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:32 +0000 (13:32 +0100)
commitf8eafa85f8f6657932e0b104d6dbea941b6cdd50
treed6f09d6b62792ce55890e67700e1498867f6e058
parent948aa27a93783b440595396c6309f5fc360d40b7
PCI: imx6: Initialize PHY before deasserting core reset

[ Upstream commit 3fde08b84b492253fb7884d3d7dc937edac6e346 ]

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 in 19a4c3c6b9a5.
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: 19a4c3c6b9a5 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/dwc/pci-imx6.c