]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: dwc: Add support for ELBI resource mapping
authorKrishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
Tue, 23 Sep 2025 11:26:51 +0000 (16:56 +0530)
committerManivannan Sadhasivam <mani@kernel.org>
Thu, 25 Sep 2025 13:03:37 +0000 (18:33 +0530)
commitc96992a24beca0768c1c42ad25d6a466e17ec70f
tree42afdf6cf594917b1c57cd055ab4b29183650424
parentaf8df709bf365f5583d31091280354e1ef0b201f
PCI: dwc: Add support for ELBI resource mapping

External Local Bus Interface (ELBI) is an optional register space for all
DWC IPs containing the vendor specific registers. There is no need for the
vendor glue drivers to fetch and map the ELBI region separately.

Hence, optionally fetch and map the resource from DT in the DWC core. This
also warrants dropping the corresponding code from glue drivers. Hence,
drop the ELBI resource fetch and map logic from glue drivers and convert
them to use 'dw_pci::elbi_base'.

Note that the pcie-qcom-ep driver used devm_pci_remap_cfg_resource() to map
the ELBI resource previously. But it was a mistake since
devm_pci_remap_cfg_resource() should only be used for mapping the PCIe
config space region as it maps the region as Non-Posted. As ELBI is used to
hold vendor specific registers, there is no need to map the region as
Non-Posted. With this conversion, the region will get mapped as normal MMIO
memory.

Suggested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
[mani: removed elbi override, converted glue drivers and reworded description]
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://patch.msgid.link/20250923-controller-dwc-ecam-v10-1-e84390ba75fa@kernel.org
drivers/pci/controller/dwc/pci-exynos.c
drivers/pci/controller/dwc/pcie-designware.c
drivers/pci/controller/dwc/pcie-designware.h
drivers/pci/controller/dwc/pcie-qcom-ep.c
drivers/pci/controller/dwc/pcie-qcom.c