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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jul 2023 14:21:39 +0000 (16:21 +0200)
commit1cf0ecb0c74c24840b1cb2d7eabb03216bf857ea
treea447e4ca0351038ca7782ca3045ee56111b3e3a6
parent8640e941fd399e8b0559258920fe87ce6a69c485
PCI: qcom: Use DWC helpers for modifying the read-only DBI registers

[ Upstream commit 60f0072d7fb7996b9a524ef0d152e21205473192 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/dwc/pcie-qcom.c