summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Suvorov <oleksandr.suvorov@toradex.com>2020-12-23 11:55:42 +0200
committerOleksandr Suvorov <oleksandr.suvorov@toradex.com>2021-01-28 14:48:19 +0200
commit05a42b87e050a78bd8cf466ec7c4e51864235856 (patch)
treeedd875ce1f989d87ef03f0097d55edff1eeb8541
parentf328e9c6dcf796e16637e81dbc016db5e1aa1a83 (diff)
pci: pci-imx6: fix kernel hanging on imx6q
The resume from a suspend state on SoC i.MX6Q leads to a kernel hanging. Adding a 10ms delay after clearing the bit TEST_POWERDOWN of IOMUXC_GPR1 regiater fixes this issue. There is not enough information about the testing "powerdown" mode on i.MX6Q, but we can do some assumption. According to "49.6.1.2 Power-On Reset" section of the "i.MX6D/6Q APRM", the time between bringing up the PHY power supplies and the reference clock is up and stable is (< 10ms) + (> 10mks) ~= 10ms. So using this value seems reasonable. Related-to: ELB-3012 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
-rw-r--r--drivers/pci/controller/dwc/pci-imx6.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index de02d08c23ad..6fb5ef0594fe 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -2390,6 +2390,7 @@ static int imx6_pcie_resume_noirq(struct device *dev)
*/
regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1,
IMX6Q_GPR1_PCIE_TEST_PD, 0);
+ msleep(10);
} else {
imx6_pcie_assert_core_reset(imx6_pcie);
imx6_pcie_init_phy(imx6_pcie);