]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: qcom: Add support for configuring BDF to SID mapping for SM8250
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Tue, 8 Dec 2020 12:14:02 +0000 (17:44 +0530)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Wed, 9 Dec 2020 15:07:11 +0000 (15:07 +0000)
commit511d4586e72c8193164ab281ebed36ee23e29a29
tree39bbeef404ee4db7d1e3a00270657f62168e25fa
parent35146cbf4b3925a83ba22093d806cc7d6ab8d814
PCI: qcom: Add support for configuring BDF to SID mapping for SM8250

For SM8250, we need to write the BDF to SID mapping in PCIe controller
register space for proper working. This is accomplished by extracting
the BDF and SID values from "iommu-map" property in DT and writing those
in the register address calculated from the hash value of BDF. In case
of collisions, the index of the next entry will also be written.

For the sake of it, let's introduce a "config_sid" callback and do it
conditionally for SM8250.

Link: https://lore.kernel.org/r/20201208121402.178011-4-mani@kernel.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/pci/controller/dwc/Kconfig
drivers/pci/controller/dwc/pcie-qcom.c