]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
MLK-10422 pci: designware: do not switch the mem view
authorRichard Zhu <Richard.Zhu@freescale.com>
Mon, 16 Mar 2015 02:21:39 +0000 (10:21 +0800)
committerRichard Zhu <Richard.Zhu@freescale.com>
Thu, 19 Mar 2015 01:06:04 +0000 (09:06 +0800)
Do not switch the mem view when the imx pcie ep/rc
validation system is enabled.
Otherwise, the RC wouldn't access the mem of the ep
device in the imx pcie ep/rc validation system.

Signed-off-by: Richard Zhu <Richard.Zhu@freescale.com>
(cherry picked from commit aeab51838317e0843a021b2e8426f942b97b01a8)

drivers/pci/host/pcie-designware.c

index 3edd94daa3a7e27edaff394e9309e05dfeafd470..f06e8f035261bb736cf73963cc92bb7c0aa46543 100644 (file)
@@ -678,7 +678,9 @@ static int dw_pcie_rd_other_conf(struct pcie_port *pp, struct pci_bus *bus,
                dw_pcie_prog_viewport_cfg0(pp, busdev);
                ret = dw_pcie_cfg_read(pp->va_cfg0_base + address, where, size,
                                val);
-               dw_pcie_prog_viewport_mem_outbound(pp);
+               if (!IS_ENABLED(CONFIG_EP_MODE_IN_EP_RC_SYS)
+                       && !IS_ENABLED(CONFIG_RC_MODE_IN_EP_RC_SYS))
+                       dw_pcie_prog_viewport_mem_outbound(pp);
        } else {
                dw_pcie_prog_viewport_cfg1(pp, busdev);
                ret = dw_pcie_cfg_read(pp->va_cfg1_base + address, where, size,
@@ -703,7 +705,9 @@ static int dw_pcie_wr_other_conf(struct pcie_port *pp, struct pci_bus *bus,
                dw_pcie_prog_viewport_cfg0(pp, busdev);
                ret = dw_pcie_cfg_write(pp->va_cfg0_base + address, where, size,
                                val);
-               dw_pcie_prog_viewport_mem_outbound(pp);
+               if (!IS_ENABLED(CONFIG_EP_MODE_IN_EP_RC_SYS)
+                       && !IS_ENABLED(CONFIG_RC_MODE_IN_EP_RC_SYS))
+                       dw_pcie_prog_viewport_mem_outbound(pp);
        } else {
                dw_pcie_prog_viewport_cfg1(pp, busdev);
                ret = dw_pcie_cfg_write(pp->va_cfg1_base + address, where, size,