You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
iommu/mediatek: add support for mtk iommu generation one HW
Mediatek SoC's M4U has two generations of HW architcture. Generation one uses flat, one layer pagetable, and was shipped with ARM architecture, it only supports 4K size page mapping. MT2701 SoC uses this generation one m4u HW. Generation two uses the ARM short-descriptor translation table format for address translation, and was shipped with ARM64 architecture, MT8173 uses this generation two m4u HW. All the two generation iommu HW only have one iommu domain, and all its iommu clients share the same iova address. These two generation m4u HW have slit different register groups and register offset, but most register names are the same. This patch add iommu support for mediatek SoC mt2701. Signed-off-by: Honghui Zhang <honghui.zhang@mediatek.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
committed by
Joerg Roedel
parent
3c8f4ad85c
commit
b17336c55d
@@ -343,4 +343,22 @@ config MTK_IOMMU
|
||||
|
||||
If unsure, say N here.
|
||||
|
||||
config MTK_IOMMU_V1
|
||||
bool "MTK IOMMU Version 1 (M4U gen1) Support"
|
||||
depends on ARM
|
||||
depends on ARCH_MEDIATEK || COMPILE_TEST
|
||||
select ARM_DMA_USE_IOMMU
|
||||
select IOMMU_API
|
||||
select MEMORY
|
||||
select MTK_SMI
|
||||
select COMMON_CLK_MT2701_MMSYS
|
||||
select COMMON_CLK_MT2701_IMGSYS
|
||||
select COMMON_CLK_MT2701_VDECSYS
|
||||
help
|
||||
Support for the M4U on certain Mediatek SoCs. M4U generation 1 HW is
|
||||
Multimedia Memory Managememt Unit. This option enables remapping of
|
||||
DMA memory accesses for the multimedia subsystem.
|
||||
|
||||
if unsure, say N here.
|
||||
|
||||
endif # IOMMU_SUPPORT
|
||||
|
||||
@@ -18,6 +18,7 @@ obj-$(CONFIG_INTEL_IOMMU_SVM) += intel-svm.o
|
||||
obj-$(CONFIG_IPMMU_VMSA) += ipmmu-vmsa.o
|
||||
obj-$(CONFIG_IRQ_REMAP) += intel_irq_remapping.o irq_remapping.o
|
||||
obj-$(CONFIG_MTK_IOMMU) += mtk_iommu.o
|
||||
obj-$(CONFIG_MTK_IOMMU_V1) += mtk_iommu_v1.o
|
||||
obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o
|
||||
obj-$(CONFIG_OMAP_IOMMU_DEBUG) += omap-iommu-debug.o
|
||||
obj-$(CONFIG_ROCKCHIP_IOMMU) += rockchip-iommu.o
|
||||
|
||||
727
drivers/iommu/mtk_iommu_v1.c
Normal file
727
drivers/iommu/mtk_iommu_v1.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user