diff options
author | Richard Zhu <hongxing.zhu@nxp.com> | 2017-05-05 17:22:39 +0800 |
---|---|---|
committer | Anson Huang <Anson.Huang@nxp.com> | 2017-06-09 22:20:12 +0800 |
commit | 43a210f90546580849814aa9179aa932d0e373d2 (patch) | |
tree | e3dfc2175cfd93b2264d96d55bba7e6e63d7e82a /drivers/pci | |
parent | e841dcac5e02d06e552a865a5f49e1cb349d380f (diff) |
MLK-14795 PCI: designware: fail to read the ep mem on rc board
The mem_base address is configured as the outbound
memory region twice when imx pcie ep/rc validation
is enabled.
Mask the one contained in desigware driver to fix
this issue.
Remove the usleep_range usage in designware driver,
since that function maybe used in imx noirq pm
calls.
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/host/pcie-designware.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c index f9c0ecfcd138..1974e973115b 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c @@ -241,7 +241,8 @@ static void dw_pcie_prog_outbound_atu(struct pcie_port *pp, int index, if (val == PCIE_ATU_ENABLE) return; - usleep_range(LINK_WAIT_IATU_MIN, LINK_WAIT_IATU_MAX); + if (!IS_ENABLED(CONFIG_PCI_IMX6)) + usleep_range(LINK_WAIT_IATU_MIN, LINK_WAIT_IATU_MAX); } dev_err(pp->dev, "iATU is not being enabled\n"); } @@ -907,9 +908,11 @@ void dw_pcie_setup_rc(struct pcie_port *pp) dev_dbg(pp->dev, "iATU unroll: %s\n", pp->iatu_unroll_enabled ? "enabled" : "disabled"); - dw_pcie_prog_outbound_atu(pp, PCIE_ATU_REGION_INDEX0, - PCIE_ATU_TYPE_MEM, pp->mem_base, - pp->mem_bus_addr, pp->mem_size); + if (!IS_ENABLED(CONFIG_EP_MODE_IN_EP_RC_SYS) + && !IS_ENABLED(CONFIG_RC_MODE_IN_EP_RC_SYS)) + dw_pcie_prog_outbound_atu(pp, PCIE_ATU_REGION_INDEX0, + PCIE_ATU_TYPE_MEM, pp->mem_base, + pp->mem_bus_addr, pp->mem_size); if (pp->num_viewport > 2) dw_pcie_prog_outbound_atu(pp, PCIE_ATU_REGION_INDEX2, PCIE_ATU_TYPE_IO, pp->io_base, |