diff options
author | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2020-12-23 11:55:42 +0200 |
---|---|---|
committer | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2020-12-24 19:11:30 +0200 |
commit | 393f77ff380a7880cdf35b96143b0a7c947bc7d1 (patch) | |
tree | 33aa2aa397d9855b8cac2834bf62995b58412941 | |
parent | 9165d659e4a66ce01b785d2f645c5b36efb364cc (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.c | 1 |
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 ac2b1e740caa..1fd06bb5840e 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -2431,6 +2431,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); |