aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller/pci-host-common.c
diff options
context:
space:
mode:
authorFrank Li <[email protected]>2025-01-14 20:37:09 +0000
committerBjorn Helgaas <[email protected]>2025-01-15 20:47:24 +0000
commitce4c4301728541db7e5f571a5688a3a236d9e488 (patch)
treef6981b2a5d183ea8f1a3ffbe85dc15aff33e0b49 /drivers/pci/controller/pci-host-common.c
parentPCI: Add enable_device() and disable_device() callbacks for bridges (diff)
downloadkernel-ce4c4301728541db7e5f571a5688a3a236d9e488.tar.gz
kernel-ce4c4301728541db7e5f571a5688a3a236d9e488.zip
PCI: imx6: Add IOMMU and ITS MSI support for i.MX95
For the i.MX95, the configuration of a LUT is necessary to convert PCIe Requester IDs (RIDs) to StreamIDs, which are used by both IOMMU and ITS. This involves checking msi-map and iommu-map device tree properties to ensure consistent mapping of Requester IDs to the same StreamIDs. Subsequently, LUT-related registers are configured. If a msi-map isn't detected, the platform relies on DWC built-in controller for MSIs that do not need StreamIDs. Implement PCI bus callback function to handle enable_device() and disable_device() operations, setting up the LUT whenever a new PCI device is enabled. Known limitations: - If iommu-map exists in the device tree but the IOMMU controller is disabled, StreamIDs are programmed into the LUT. However, if a RID is out of range of the iommu-map, enabling the PCI device would result in a failure, although the PCI device can work without the IOMMU. - If msi-map exists in the device tree but the MSI controller is disabled, MSIs will not work. The DWC driver skips initializing the built-in MSI controller, falling back to legacy PCI INTx only. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Frank Li <[email protected]> [kwilczynski: commit log] Signed-off-by: Krzysztof WilczyƄski <[email protected]> [bhelgaas: fix uninitialized "sid" in imx_pcie_enable_device()] Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Richard Zhu <[email protected]>
Diffstat (limited to 'drivers/pci/controller/pci-host-common.c')
0 files changed, 0 insertions, 0 deletions