File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -482,8 +482,7 @@ config MTK_IOMMU
482
482
483
483
config MTK_IOMMU_V1
484
484
tristate "MediaTek IOMMU Version 1 (M4U gen1) Support"
485
- depends on ARM
486
- depends on ARCH_MEDIATEK || COMPILE_TEST
485
+ depends on (ARCH_MEDIATEK && ARM) || COMPILE_TEST
487
486
select ARM_DMA_USE_IOMMU
488
487
select IOMMU_API
489
488
select MEMORY
Original file line number Diff line number Diff line change 27
27
#include <linux/spinlock.h>
28
28
#include <linux/string_choices.h>
29
29
#include <asm/barrier.h>
30
- #include <asm/dma-iommu.h>
31
30
#include <dt-bindings/memory/mtk-memory-port.h>
32
31
#include <dt-bindings/memory/mt2701-larb-port.h>
33
32
#include <soc/mediatek/smi.h>
34
33
34
+ #if defined(CONFIG_ARM )
35
+ #include <asm/dma-iommu.h>
36
+ #else
37
+ #define arm_iommu_create_mapping (...) NULL
38
+ #define arm_iommu_attach_device (...) -ENODEV
39
+ struct dma_iommu_mapping {
40
+ struct iommu_domain * domain ;
41
+ };
42
+ #endif
43
+
35
44
#define REG_MMU_PT_BASE_ADDR 0x000
36
45
37
46
#define F_ALL_INVLD 0x2
You can’t perform that action at this time.
0 commit comments