PCI: qcom: Use DWC helpers for modifying the read-only DBI registers
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Mon, 19 Jun 2023 15:04:01 +0000 (20:34 +0530)
committerLorenzo Pieralisi <lpieralisi@kernel.org>
Tue, 20 Jun 2023 10:12:44 +0000 (12:12 +0200)
commit60f0072d7fb7996b9a524ef0d152e21205473192
tree027e567e2782566160e3054cae31536cfc3e0d6b
parenta33d700e8eea76c62120cb3dbf5e01328f18319a
PCI: qcom: Use DWC helpers for modifying the read-only DBI registers

DWC core already exposes dw_pcie_dbi_ro_wr_{en/dis} helper APIs for
enabling and disabling the write access to read only DBI registers. So
let's use them instead of doing it manually.

Also, the existing code doesn't disable the write access when it's done.
This is also fixed now.

Link: https://lore.kernel.org/r/20230619150408.8468-3-manivannan.sadhasivam@linaro.org
Fixes: 5d76117f070d ("PCI: qcom: Add support for IPQ8074 PCIe controller")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/pci/controller/dwc/pcie-qcom.c