iommu: dart: Add DART iommu driver
PATCH 3/3 iommu: dart: Add DART iommu driver
Apple's new SoCs use iommus for almost all peripherals. These Device Address Resolution Tables must be setup before these peripherals can act as DMA masters.
Signed-off-by Sven Peter <[email protected]>
--- MAINTAINERS | 1 + drivers/iommu/Kconfig | 13 + drivers/iommu/Makefile | 1 + drivers/iommu/apple-dart-iommu.c | 653 +++++++++++++++++++++++++++++++ 4 files changed, 668 insertions(+) create mode 100644 drivers/iommu/apple-dart-iommu.c
MAINTAINERS +1 -0
@@ -1241,6 +1241,7 @@ M: Sven Peter <[email protected]> L: [email protected] S: Maintained F: Documentation/devicetree/bindings/iommu/apple,t8103-dart.yaml +F: drivers/iommu/apple-dart-iommu.c APPLE SMC DRIVER M: Henrik Rydberg <[email protected]>
drivers/iommu/Kconfig +13 -0
@@ -262,6 +262,19 @@ config SPAPR_TCE_IOMMU Enables bits of IOMMU API required by VFIO. The iommu_ops is not implemented as it is not necessary for VFIO. +config IOMMU_APPLE_DART + tristate "Apple DART IOMMU Support" + depends on ARM64 || (COMPILE_TEST && !GENERIC_ATOMIC64) + select IOMMU_API + select IOMMU_IO_PGTABLE_APPLE_DART + help + Support for Apple DART (Device Address Resolution Table) IOMMUs + found in Apple ARM SoCs like the M1. + This IOMMU is required for most peripherals using DMA to access + the main memory. + + Say Y here if you are using an Apple SoC with a DART IOMMU. + # ARM IOMMU support config ARM_SMMU tristate "ARM Ltd. System MMU (SMMU) Support"
drivers/iommu/Makefile +1 -0
@@ -28,3 +28,4 @@ obj-$(CONFIG_S390_IOMMU) += s390-iommu.o obj-$(CONFIG_HYPERV_IOMMU) += hyperv-iommu.o obj-$(CONFIG_VIRTIO_IOMMU) += virtio-iommu.o obj-$(CONFIG_IOMMU_SVA_LIB) += iommu-sva-lib.o +obj-$(CONFIG_IOMMU_APPLE_DART) += apple-dart-iommu.o
drivers/iommu/apple-dart-iommu.c new file +653 -0
653 lines not on this page · raw message
--
2.25.1