iommu: Implement mapping IOMMUs for PCI devices
authorMark Kettenis <kettenis@openbsd.org>
Sat, 21 Jan 2023 19:27:56 +0000 (20:27 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 27 Jan 2023 19:47:58 +0000 (14:47 -0500)
commit1fc2329121e403a4d7dbffa4c4fda5a756043e4a
treeee4df73bbc089002e5ed6abcb3a6626984d0eeb2
parentba1efb3d2494e8ceb0ff405642f44a955f8d8e1b
iommu: Implement mapping IOMMUs for PCI devices

Systems such as Apple's M1 and M2 SoCs may have separate IOMMUs
for each PCIe root port.  In this case the right IOMMU for a
PCI device behind a particular root port is described by an
"iommu-map" property in the device tree.  Parse this property
and use it to find the right IOMMU device for PCI devices.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
drivers/iommu/iommu-uclass.c