]> git.ipfire.org Git - thirdparty/kernel/stable.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:26:18 +0000 (13:26 +0100)
commit1ba8b87b406d784aa1a6f89184adbeafb32c51d7
treefeaba693504fed408335d2d752d2fc6b8a0aebda
parent3ef6dd0566ccee5aee7c3e6eb322090bf249788f
PCI: imx6: Initialize PHY before deasserting core reset

[ Upstream commit ae6b9a65af480144da323436d90e149501ea8937 ]

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 cf236e0c0d59.
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: cf236e0c0d59 ("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