Skip to content

Commit 200b8f8

Browse files
Mani-SadhasivamLorenzo Pieralisi
authored andcommitted
PCI: qcom: Disable write access to read only registers for IP v2.9.0
In the post init sequence of v2.9.0, write access to read only registers are not disabled after updating the registers. Fix it by disabling the access after register update. While at it, let's also add a newline after existing dw_pcie_dbi_ro_wr_en() guard function to align with rest of the driver. Link: https://lore.kernel.org/r/[email protected] Fixes: 0cf7c2e ("PCI: qcom: Add IPQ60xx support") Signed-off-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]>
1 parent 60f0072 commit 200b8f8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/pci/controller/dwc/pcie-qcom.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,6 +1136,7 @@ static int qcom_pcie_post_init_2_9_0(struct qcom_pcie *pcie)
11361136
writel(0, pcie->parf + PARF_Q2A_FLUSH);
11371137

11381138
dw_pcie_dbi_ro_wr_en(pci);
1139+
11391140
writel(PCIE_CAP_SLOT_VAL, pci->dbi_base + offset + PCI_EXP_SLTCAP);
11401141

11411142
val = readl(pci->dbi_base + offset + PCI_EXP_LNKCAP);
@@ -1145,6 +1146,8 @@ static int qcom_pcie_post_init_2_9_0(struct qcom_pcie *pcie)
11451146
writel(PCI_EXP_DEVCTL2_COMP_TMOUT_DIS, pci->dbi_base + offset +
11461147
PCI_EXP_DEVCTL2);
11471148

1149+
dw_pcie_dbi_ro_wr_dis(pci);
1150+
11481151
for (i = 0; i < 256; i++)
11491152
writel(0, pcie->parf + PARF_BDF_TO_SID_TABLE_N + (4 * i));
11501153

0 commit comments

Comments
 (0)