summaryrefslogtreecommitdiff
path: root/drivers/pci/controller/dwc/pci-imx6.c
diff options
context:
space:
mode:
authorSherry Sun <sherry.sun@nxp.com>2020-08-14 15:14:36 +0800
committerSherry Sun <sherry.sun@nxp.com>2020-10-30 09:38:48 +0800
commit21b685bedccb3c72e053ac4c9ade05a3ddd58ecb (patch)
tree6f3d7a1d2f87a75b883d95c2553cd3ffe4cd4155 /drivers/pci/controller/dwc/pci-imx6.c
parentb92d8ef3c2dfae884f76a6b7c79dc009a7fb756d (diff)
MLK-24937-4 pci: modify AMBA_ORDERING_CTRL_OFF register for rc/ep to avoid vop iperf3 test hang
We met system hang when doing vop iperf3 test, the root cause is there is a deadlock when non-posted reads can’t be completed before posted write completion for the PCIe ordering rules. Here is just a workaround to set the AMBA_ORDERING_CTRL_OFF register to disable ordering rules on AXI bridge. Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Diffstat (limited to 'drivers/pci/controller/dwc/pci-imx6.c')
-rw-r--r--drivers/pci/controller/dwc/pci-imx6.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index b1c2e78d14ae..3bcea6297488 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -2354,7 +2354,7 @@ static int imx6_pcie_probe(struct platform_device *pdev)
void __iomem *iomem;
struct regmap_config regconfig = imx6_pcie_regconfig;
int ret;
- u32 reg;
+ u32 reg, val;
imx6_pcie = devm_kzalloc(dev, sizeof(*imx6_pcie), GFP_KERNEL);
if (!imx6_pcie)
@@ -2675,6 +2675,10 @@ static int imx6_pcie_probe(struct platform_device *pdev)
imx6_pcie_deassert_core_reset(imx6_pcie);
imx6_setup_phy_mpll(imx6_pcie);
+ val = dw_pcie_readl_dbi(pci, PCIE_AMBA_ORDERING_CTRL_OFF);
+ val |= 0xD;
+ dw_pcie_writel_dbi(pci, PCIE_AMBA_ORDERING_CTRL_OFF, val);
+
switch (imx6_pcie->drvdata->mode) {
case DW_PCIE_RC_TYPE:
/* add attributes for bus freq */