Skip to content

Commit 0ae349a

Browse files
robclarkjoergroedel
authored andcommitted
iommu/qcom: Add qcom_iommu
An iommu driver for Qualcomm "B" family devices which do implement the ARM SMMU spec, but not in a way that is compatible with how the arm-smmu driver is designed. It seems SMMU_SCR1.GASRAE=1 so the global register space is not accessible. This means it needs to get configuration from devicetree instead of setting it up dynamically. In the end, other than register definitions, there is not much code to share with arm-smmu (other than what has already been refactored out into the pgtable helpers). Signed-off-by: Rob Clark <[email protected]> Tested-by: Riku Voipio <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent 2b03774 commit 0ae349a

File tree

3 files changed

+879
-0
lines changed

3 files changed

+879
-0
lines changed

drivers/iommu/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,4 +367,14 @@ config MTK_IOMMU_V1
367367

368368
if unsure, say N here.
369369

370+
config QCOM_IOMMU
371+
# Note: iommu drivers cannot (yet?) be built as modules
372+
bool "Qualcomm IOMMU Support"
373+
depends on ARCH_QCOM || COMPILE_TEST
374+
select IOMMU_API
375+
select IOMMU_IO_PGTABLE_LPAE
376+
select ARM_DMA_USE_IOMMU
377+
help
378+
Support for IOMMU on certain Qualcomm SoCs.
379+
370380
endif # IOMMU_SUPPORT

drivers/iommu/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ obj-$(CONFIG_TEGRA_IOMMU_SMMU) += tegra-smmu.o
2727
obj-$(CONFIG_EXYNOS_IOMMU) += exynos-iommu.o
2828
obj-$(CONFIG_FSL_PAMU) += fsl_pamu.o fsl_pamu_domain.o
2929
obj-$(CONFIG_S390_IOMMU) += s390-iommu.o
30+
obj-$(CONFIG_QCOM_IOMMU) += qcom_iommu.o

0 commit comments

Comments
 (0)