diff options
author | Richard Zhu <hongxing.zhu@nxp.com> | 2017-04-10 13:36:23 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | 336a50109ed84fc4139dc762c4fe86121ca84efc (patch) | |
tree | ea5e811e99f6f67d96db3703930b7e05826c96b1 /drivers/pci/host/pci-imx6.c | |
parent | 18862f99e90ae73842156221345a0d40dbd726b0 (diff) |
MLK-14644 PCI: imx: toggle the perst after the release of rc's reset
imxcommunity reports that Intel Wireless 3160 doesn't
work if the perst# is toggled before the release of rc
controller's reset.
Specification doesn't specify the exactly sequence of
the toggle of the perst# and the release of the rc
controller reset. Just find the following description
in the chapter 4.2.2 of the PCI Local Bus Specification.
"The system must guarantee that the bus remains in the idle
state for a minimum time delay following the deassertion
of RST# to a device before the system will permit the first
assertion of FRAME#."
Toggle the perst# after the release of rc's reset to
fix the issue.
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
(cherry picked from commit ba75c5e4795ab36d7765fe3ac03f0c4320828c78)
Diffstat (limited to 'drivers/pci/host/pci-imx6.c')
-rw-r--r-- | drivers/pci/host/pci-imx6.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c index d81e2afed251..b0b369e1c0fe 100644 --- a/drivers/pci/host/pci-imx6.c +++ b/drivers/pci/host/pci-imx6.c @@ -460,16 +460,6 @@ static void imx6_pcie_deassert_core_reset(struct imx6_pcie *imx6_pcie) /* allow the clocks to stabilize */ udelay(200); - /* Some boards don't have PCIe reset GPIO. */ - if (gpio_is_valid(imx6_pcie->reset_gpio)) { - gpio_set_value_cansleep(imx6_pcie->reset_gpio, - imx6_pcie->gpio_active_high); - mdelay(20); - gpio_set_value_cansleep(imx6_pcie->reset_gpio, - !imx6_pcie->gpio_active_high); - mdelay(20); - } - switch (imx6_pcie->variant) { case IMX6SX: regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR5, @@ -540,6 +530,16 @@ static void imx6_pcie_deassert_core_reset(struct imx6_pcie *imx6_pcie) break; } + /* Some boards don't have PCIe reset GPIO. */ + if (gpio_is_valid(imx6_pcie->reset_gpio)) { + gpio_set_value_cansleep(imx6_pcie->reset_gpio, + imx6_pcie->gpio_active_high); + mdelay(20); + gpio_set_value_cansleep(imx6_pcie->reset_gpio, + !imx6_pcie->gpio_active_high); + mdelay(20); + } + return; err_ref_clk: |