xref: /openbmc/linux/drivers/iommu/Kconfig (revision b17336c5)
1ab493a0fSOhad Ben-Cohen# IOMMU_API always gets selected by whoever wants it.
2ab493a0fSOhad Ben-Cohenconfig IOMMU_API
3ab493a0fSOhad Ben-Cohen	bool
4b10f127eSOhad Ben-Cohen
568255b62SJoerg Roedelmenuconfig IOMMU_SUPPORT
668255b62SJoerg Roedel	bool "IOMMU Hardware Support"
7e5144c93SArnd Bergmann	depends on MMU
868255b62SJoerg Roedel	default y
968255b62SJoerg Roedel	---help---
1068255b62SJoerg Roedel	  Say Y here if you want to compile device drivers for IO Memory
1168255b62SJoerg Roedel	  Management Units into the kernel. These devices usually allow to
1268255b62SJoerg Roedel	  remap DMA requests and/or remap interrupts from other devices on the
1368255b62SJoerg Roedel	  system.
1468255b62SJoerg Roedel
1568255b62SJoerg Roedelif IOMMU_SUPPORT
1668255b62SJoerg Roedel
17fdb1d7beSWill Deaconmenu "Generic IOMMU Pagetable Support"
18fdb1d7beSWill Deacon
19fdb1d7beSWill Deacon# Selected by the actual pagetable implementations
20fdb1d7beSWill Deaconconfig IOMMU_IO_PGTABLE
21fdb1d7beSWill Deacon	bool
22fdb1d7beSWill Deacon
23e1d3c0fdSWill Deaconconfig IOMMU_IO_PGTABLE_LPAE
24e1d3c0fdSWill Deacon	bool "ARMv7/v8 Long Descriptor Format"
25e1d3c0fdSWill Deacon	select IOMMU_IO_PGTABLE
26ffcb6d16SRobin Murphy	depends on HAS_DMA && (ARM || ARM64 || COMPILE_TEST)
27e1d3c0fdSWill Deacon	help
28e1d3c0fdSWill Deacon	  Enable support for the ARM long descriptor pagetable format.
29e1d3c0fdSWill Deacon	  This allocator supports 4K/2M/1G, 16K/32M and 64K/512M page
30e1d3c0fdSWill Deacon	  sizes at both stage-1 and stage-2, as well as address spaces
31e1d3c0fdSWill Deacon	  up to 48-bits in size.
32e1d3c0fdSWill Deacon
33fe4b991dSWill Deaconconfig IOMMU_IO_PGTABLE_LPAE_SELFTEST
34fe4b991dSWill Deacon	bool "LPAE selftests"
35fe4b991dSWill Deacon	depends on IOMMU_IO_PGTABLE_LPAE
36fe4b991dSWill Deacon	help
37fe4b991dSWill Deacon	  Enable self-tests for LPAE page table allocator. This performs
38fe4b991dSWill Deacon	  a series of page-table consistency checks during boot.
39fe4b991dSWill Deacon
40fe4b991dSWill Deacon	  If unsure, say N here.
41fe4b991dSWill Deacon
42e5fc9753SRobin Murphyconfig IOMMU_IO_PGTABLE_ARMV7S
43e5fc9753SRobin Murphy	bool "ARMv7/v8 Short Descriptor Format"
44e5fc9753SRobin Murphy	select IOMMU_IO_PGTABLE
45e5fc9753SRobin Murphy	depends on HAS_DMA && (ARM || ARM64 || COMPILE_TEST)
46e5fc9753SRobin Murphy	help
47e5fc9753SRobin Murphy	  Enable support for the ARM Short-descriptor pagetable format.
48e5fc9753SRobin Murphy	  This supports 32-bit virtual and physical addresses mapped using
49e5fc9753SRobin Murphy	  2-level tables with 4KB pages/1MB sections, and contiguous entries
50e5fc9753SRobin Murphy	  for 64KB pages/16MB supersections if indicated by the IOMMU driver.
51e5fc9753SRobin Murphy
52e5fc9753SRobin Murphyconfig IOMMU_IO_PGTABLE_ARMV7S_SELFTEST
53e5fc9753SRobin Murphy	bool "ARMv7s selftests"
54e5fc9753SRobin Murphy	depends on IOMMU_IO_PGTABLE_ARMV7S
55e5fc9753SRobin Murphy	help
56e5fc9753SRobin Murphy	  Enable self-tests for ARMv7s page table allocator. This performs
57e5fc9753SRobin Murphy	  a series of page-table consistency checks during boot.
58e5fc9753SRobin Murphy
59e5fc9753SRobin Murphy	  If unsure, say N here.
60e5fc9753SRobin Murphy
61fdb1d7beSWill Deaconendmenu
62fdb1d7beSWill Deacon
63114150d8SRobin Murphyconfig IOMMU_IOVA
6415bbdec3SSakari Ailus	tristate
65114150d8SRobin Murphy
664e0ee78fSHiroshi Doyuconfig OF_IOMMU
674e0ee78fSHiroshi Doyu       def_bool y
687eba1d51SWill Deacon       depends on OF && IOMMU_API
694e0ee78fSHiroshi Doyu
700db2e5d1SRobin Murphy# IOMMU-agnostic DMA-mapping layer
710db2e5d1SRobin Murphyconfig IOMMU_DMA
720db2e5d1SRobin Murphy	bool
730db2e5d1SRobin Murphy	select IOMMU_API
740db2e5d1SRobin Murphy	select IOMMU_IOVA
7559a68eb8SRobin Murphy	select NEED_SG_DMA_LENGTH
760db2e5d1SRobin Murphy
77695093e3SVarun Sethiconfig FSL_PAMU
78695093e3SVarun Sethi	bool "Freescale IOMMU support"
79a0d284d2SAndy Fleming	depends on PPC_E500MC || (COMPILE_TEST && PPC)
80695093e3SVarun Sethi	select IOMMU_API
81695093e3SVarun Sethi	select GENERIC_ALLOCATOR
82695093e3SVarun Sethi	help
83695093e3SVarun Sethi	  Freescale PAMU support. PAMU is the IOMMU present on Freescale QorIQ platforms.
84695093e3SVarun Sethi	  PAMU can authorize memory access, remap the memory address, and remap I/O
85695093e3SVarun Sethi	  transaction types.
86695093e3SVarun Sethi
87b10f127eSOhad Ben-Cohen# MSM IOMMU support
88b10f127eSOhad Ben-Cohenconfig MSM_IOMMU
89b10f127eSOhad Ben-Cohen	bool "MSM IOMMU Support"
90477ab7a1SJoerg Roedel	depends on ARM
91477ab7a1SJoerg Roedel	depends on ARCH_MSM8X60 || ARCH_MSM8960 || COMPILE_TEST
92a3f447a4SThierry Reding	depends on BROKEN
93b10f127eSOhad Ben-Cohen	select IOMMU_API
94b10f127eSOhad Ben-Cohen	help
95b10f127eSOhad Ben-Cohen	  Support for the IOMMUs found on certain Qualcomm SOCs.
96b10f127eSOhad Ben-Cohen	  These IOMMUs allow virtualization of the address space used by most
97b10f127eSOhad Ben-Cohen	  cores within the multimedia subsystem.
98b10f127eSOhad Ben-Cohen
99b10f127eSOhad Ben-Cohen	  If unsure, say N here.
100b10f127eSOhad Ben-Cohen
101b10f127eSOhad Ben-Cohenconfig IOMMU_PGTABLES_L2
102b10f127eSOhad Ben-Cohen	def_bool y
103b10f127eSOhad Ben-Cohen	depends on MSM_IOMMU && MMU && SMP && CPU_DCACHE_DISABLE=n
10429b68415SOhad Ben-Cohen
10529b68415SOhad Ben-Cohen# AMD IOMMU support
10629b68415SOhad Ben-Cohenconfig AMD_IOMMU
10729b68415SOhad Ben-Cohen	bool "AMD IOMMU support"
10829b68415SOhad Ben-Cohen	select SWIOTLB
10929b68415SOhad Ben-Cohen	select PCI_MSI
11052815b75SJoerg Roedel	select PCI_ATS
11152815b75SJoerg Roedel	select PCI_PRI
11252815b75SJoerg Roedel	select PCI_PASID
11329b68415SOhad Ben-Cohen	select IOMMU_API
1140dbc6078SThomas Petazzoni	depends on X86_64 && PCI && ACPI
11529b68415SOhad Ben-Cohen	---help---
11629b68415SOhad Ben-Cohen	  With this option you can enable support for AMD IOMMU hardware in
11729b68415SOhad Ben-Cohen	  your system. An IOMMU is a hardware component which provides
11829b68415SOhad Ben-Cohen	  remapping of DMA memory accesses from devices. With an AMD IOMMU you
11959bf8964SMasanari Iida	  can isolate the DMA memory of different devices and protect the
12029b68415SOhad Ben-Cohen	  system from misbehaving device drivers or hardware.
12129b68415SOhad Ben-Cohen
12229b68415SOhad Ben-Cohen	  You can find out if your system has an AMD IOMMU if you look into
12329b68415SOhad Ben-Cohen	  your BIOS for an option to enable it or if you have an IVRS ACPI
12429b68415SOhad Ben-Cohen	  table.
12529b68415SOhad Ben-Cohen
126e3c495c7SJoerg Roedelconfig AMD_IOMMU_V2
127a446e219SKees Cook	tristate "AMD IOMMU Version 2 driver"
128e5cac32cSBorislav Petkov	depends on AMD_IOMMU
1298736b2c3SJoerg Roedel	select MMU_NOTIFIER
130e3c495c7SJoerg Roedel	---help---
131e3c495c7SJoerg Roedel	  This option enables support for the AMD IOMMUv2 features of the IOMMU
132e3c495c7SJoerg Roedel	  hardware. Select this option if you want to use devices that support
13359bf8964SMasanari Iida	  the PCI PRI and PASID interface.
134e3c495c7SJoerg Roedel
135166e9278SOhad Ben-Cohen# Intel IOMMU support
136d3f13810SSuresh Siddhaconfig DMAR_TABLE
137d3f13810SSuresh Siddha	bool
138d3f13810SSuresh Siddha
139d3f13810SSuresh Siddhaconfig INTEL_IOMMU
140d3f13810SSuresh Siddha	bool "Support for Intel IOMMU using DMA Remapping Devices"
141166e9278SOhad Ben-Cohen	depends on PCI_MSI && ACPI && (X86 || IA64_GENERIC)
142166e9278SOhad Ben-Cohen	select IOMMU_API
143114150d8SRobin Murphy	select IOMMU_IOVA
144d3f13810SSuresh Siddha	select DMAR_TABLE
145166e9278SOhad Ben-Cohen	help
146166e9278SOhad Ben-Cohen	  DMA remapping (DMAR) devices support enables independent address
147166e9278SOhad Ben-Cohen	  translations for Direct Memory Access (DMA) from devices.
148166e9278SOhad Ben-Cohen	  These DMA remapping devices are reported via ACPI tables
149166e9278SOhad Ben-Cohen	  and include PCI device scope covered by these DMA
150166e9278SOhad Ben-Cohen	  remapping devices.
151166e9278SOhad Ben-Cohen
1528a94ade4SDavid Woodhouseconfig INTEL_IOMMU_SVM
1538a94ade4SDavid Woodhouse	bool "Support for Shared Virtual Memory with Intel IOMMU"
1548a94ade4SDavid Woodhouse	depends on INTEL_IOMMU && X86
155b16d0cb9SDavid Woodhouse	select PCI_PASID
1562f26e0a9SDavid Woodhouse	select MMU_NOTIFIER
1578a94ade4SDavid Woodhouse	help
1588a94ade4SDavid Woodhouse	  Shared Virtual Memory (SVM) provides a facility for devices
1598a94ade4SDavid Woodhouse	  to access DMA resources through process address space by
1608a94ade4SDavid Woodhouse	  means of a Process Address Space ID (PASID).
1618a94ade4SDavid Woodhouse
162d3f13810SSuresh Siddhaconfig INTEL_IOMMU_DEFAULT_ON
163166e9278SOhad Ben-Cohen	def_bool y
164d3f13810SSuresh Siddha	prompt "Enable Intel DMA Remapping Devices by default"
165d3f13810SSuresh Siddha	depends on INTEL_IOMMU
166166e9278SOhad Ben-Cohen	help
167166e9278SOhad Ben-Cohen	  Selecting this option will enable a DMAR device at boot time if
168166e9278SOhad Ben-Cohen	  one is found. If this option is not selected, DMAR support can
169166e9278SOhad Ben-Cohen	  be enabled by passing intel_iommu=on to the kernel.
170166e9278SOhad Ben-Cohen
171d3f13810SSuresh Siddhaconfig INTEL_IOMMU_BROKEN_GFX_WA
172166e9278SOhad Ben-Cohen	bool "Workaround broken graphics drivers (going away soon)"
173d3f13810SSuresh Siddha	depends on INTEL_IOMMU && BROKEN && X86
174166e9278SOhad Ben-Cohen	---help---
175166e9278SOhad Ben-Cohen	  Current Graphics drivers tend to use physical address
176166e9278SOhad Ben-Cohen	  for DMA and avoid using DMA APIs. Setting this config
177166e9278SOhad Ben-Cohen	  option permits the IOMMU driver to set a unity map for
178166e9278SOhad Ben-Cohen	  all the OS-visible memory. Hence the driver can continue
179166e9278SOhad Ben-Cohen	  to use physical addresses for DMA, at least until this
180166e9278SOhad Ben-Cohen	  option is removed in the 2.6.32 kernel.
181166e9278SOhad Ben-Cohen
182d3f13810SSuresh Siddhaconfig INTEL_IOMMU_FLOPPY_WA
183166e9278SOhad Ben-Cohen	def_bool y
184d3f13810SSuresh Siddha	depends on INTEL_IOMMU && X86
185166e9278SOhad Ben-Cohen	---help---
186166e9278SOhad Ben-Cohen	  Floppy disk drivers are known to bypass DMA API calls
187166e9278SOhad Ben-Cohen	  thereby failing to work when IOMMU is enabled. This
188166e9278SOhad Ben-Cohen	  workaround will setup a 1:1 mapping for the first
189166e9278SOhad Ben-Cohen	  16MiB to make floppy (an ISA device) work.
190166e9278SOhad Ben-Cohen
191d3f13810SSuresh Siddhaconfig IRQ_REMAP
192a446e219SKees Cook	bool "Support for Interrupt Remapping"
193a446e219SKees Cook	depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI
194d3f13810SSuresh Siddha	select DMAR_TABLE
195166e9278SOhad Ben-Cohen	---help---
196166e9278SOhad Ben-Cohen	  Supports Interrupt remapping for IO-APIC and MSI devices.
197166e9278SOhad Ben-Cohen	  To use x2apic mode in the CPU's which support x2APIC enhancements or
198166e9278SOhad Ben-Cohen	  to support platforms with CPU's having > 8 bit APIC ID, say Y.
19968255b62SJoerg Roedel
200fcf3a6efSOhad Ben-Cohen# OMAP IOMMU support
201fcf3a6efSOhad Ben-Cohenconfig OMAP_IOMMU
202fcf3a6efSOhad Ben-Cohen	bool "OMAP IOMMU Support"
203477ab7a1SJoerg Roedel	depends on ARM && MMU
204477ab7a1SJoerg Roedel	depends on ARCH_OMAP2PLUS || COMPILE_TEST
205fcf3a6efSOhad Ben-Cohen	select IOMMU_API
20606b718c0SGerd Hoffmann	---help---
20706b718c0SGerd Hoffmann	  The OMAP3 media platform drivers depend on iommu support,
20806b718c0SGerd Hoffmann	  if you need them say Y here.
209fcf3a6efSOhad Ben-Cohen
210fcf3a6efSOhad Ben-Cohenconfig OMAP_IOMMU_DEBUG
21161c75352SSuman Anna	bool "Export OMAP IOMMU internals in DebugFS"
212baaa7b5dSLaurent Pinchart	depends on OMAP_IOMMU && DEBUG_FS
21361c75352SSuman Anna	---help---
214fcf3a6efSOhad Ben-Cohen	  Select this to see extensive information about
215baaa7b5dSLaurent Pinchart	  the internal state of OMAP IOMMU in debugfs.
216fcf3a6efSOhad Ben-Cohen
217fcf3a6efSOhad Ben-Cohen	  Say N unless you know you need this.
218fcf3a6efSOhad Ben-Cohen
219c68a2921SDaniel Kurtzconfig ROCKCHIP_IOMMU
220c68a2921SDaniel Kurtz	bool "Rockchip IOMMU Support"
22111175886SJoerg Roedel	depends on ARM
22211175886SJoerg Roedel	depends on ARCH_ROCKCHIP || COMPILE_TEST
223c68a2921SDaniel Kurtz	select IOMMU_API
224c68a2921SDaniel Kurtz	select ARM_DMA_USE_IOMMU
225c68a2921SDaniel Kurtz	help
226c68a2921SDaniel Kurtz	  Support for IOMMUs found on Rockchip rk32xx SOCs.
227c68a2921SDaniel Kurtz	  These IOMMUs allow virtualization of the address space used by most
228c68a2921SDaniel Kurtz	  cores within the multimedia subsystem.
229c68a2921SDaniel Kurtz	  Say Y here if you are using a Rockchip SoC that includes an IOMMU
230c68a2921SDaniel Kurtz	  device.
231c68a2921SDaniel Kurtz
232d53e54b4SHiroshi DOYUconfig TEGRA_IOMMU_GART
233d53e54b4SHiroshi DOYU	bool "Tegra GART IOMMU Support"
234d53e54b4SHiroshi DOYU	depends on ARCH_TEGRA_2x_SOC
235d53e54b4SHiroshi DOYU	select IOMMU_API
236d53e54b4SHiroshi DOYU	help
237d53e54b4SHiroshi DOYU	  Enables support for remapping discontiguous physical memory
238d53e54b4SHiroshi DOYU	  shared with the operating system into contiguous I/O virtual
239d53e54b4SHiroshi DOYU	  space through the GART (Graphics Address Relocation Table)
240d53e54b4SHiroshi DOYU	  hardware included on Tegra SoCs.
241d53e54b4SHiroshi DOYU
2427a31f6f4SHiroshi DOYUconfig TEGRA_IOMMU_SMMU
24389184651SThierry Reding	bool "NVIDIA Tegra SMMU Support"
24489184651SThierry Reding	depends on ARCH_TEGRA
24589184651SThierry Reding	depends on TEGRA_AHB
24689184651SThierry Reding	depends on TEGRA_MC
2477a31f6f4SHiroshi DOYU	select IOMMU_API
2487a31f6f4SHiroshi DOYU	help
24989184651SThierry Reding	  This driver supports the IOMMU hardware (SMMU) found on NVIDIA Tegra
250588c43a7SThierry Reding	  SoCs (Tegra30 up to Tegra210).
2517a31f6f4SHiroshi DOYU
2522a96536eSKyongHo Choconfig EXYNOS_IOMMU
2532a96536eSKyongHo Cho	bool "Exynos IOMMU Support"
254740a01eeSMarek Szyprowski	depends on ARCH_EXYNOS && MMU
2552a96536eSKyongHo Cho	select IOMMU_API
2564802c1d0STushar Behera	select ARM_DMA_USE_IOMMU
2572a96536eSKyongHo Cho	help
2582a96536eSKyongHo Cho	  Support for the IOMMU (System MMU) of Samsung Exynos application
2595455d700SSachin Kamat	  processor family. This enables H/W multimedia accelerators to see
2605455d700SSachin Kamat	  non-linear physical memory chunks as linear memory in their
2615455d700SSachin Kamat	  address space.
2622a96536eSKyongHo Cho
2632a96536eSKyongHo Cho	  If unsure, say N here.
2642a96536eSKyongHo Cho
2652a96536eSKyongHo Choconfig EXYNOS_IOMMU_DEBUG
2662a96536eSKyongHo Cho	bool "Debugging log for Exynos IOMMU"
2672a96536eSKyongHo Cho	depends on EXYNOS_IOMMU
2682a96536eSKyongHo Cho	help
2692a96536eSKyongHo Cho	  Select this to see the detailed log message that shows what
2705455d700SSachin Kamat	  happens in the IOMMU driver.
2712a96536eSKyongHo Cho
2725455d700SSachin Kamat	  Say N unless you need kernel log message for IOMMU debugging.
2732a96536eSKyongHo Cho
274d25a2a16SLaurent Pinchartconfig IPMMU_VMSA
275d25a2a16SLaurent Pinchart	bool "Renesas VMSA-compatible IPMMU"
276d25a2a16SLaurent Pinchart	depends on ARM_LPAE
2779015ba45SSimon Horman	depends on ARCH_RENESAS || COMPILE_TEST
278d25a2a16SLaurent Pinchart	select IOMMU_API
279f20ed39fSLaurent Pinchart	select IOMMU_IO_PGTABLE_LPAE
280d25a2a16SLaurent Pinchart	select ARM_DMA_USE_IOMMU
281d25a2a16SLaurent Pinchart	help
282d25a2a16SLaurent Pinchart	  Support for the Renesas VMSA-compatible IPMMU Renesas found in the
283d25a2a16SLaurent Pinchart	  R-Mobile APE6 and R-Car H2/M2 SoCs.
284d25a2a16SLaurent Pinchart
285d25a2a16SLaurent Pinchart	  If unsure, say N.
286d25a2a16SLaurent Pinchart
2874e13c1acSAlexey Kardashevskiyconfig SPAPR_TCE_IOMMU
2884e13c1acSAlexey Kardashevskiy	bool "sPAPR TCE IOMMU Support"
2895b25199eSAlexey Kardashevskiy	depends on PPC_POWERNV || PPC_PSERIES
2904e13c1acSAlexey Kardashevskiy	select IOMMU_API
2914e13c1acSAlexey Kardashevskiy	help
2924e13c1acSAlexey Kardashevskiy	  Enables bits of IOMMU API required by VFIO. The iommu_ops
2934e13c1acSAlexey Kardashevskiy	  is not implemented as it is not necessary for VFIO.
2944e13c1acSAlexey Kardashevskiy
29548ec83bcSWill Deacon# ARM IOMMU support
29645ae7cffSWill Deaconconfig ARM_SMMU
29745ae7cffSWill Deacon	bool "ARM Ltd. System MMU (SMMU) Support"
298a20cc76bSJoerg Roedel	depends on (ARM64 || ARM) && MMU
29945ae7cffSWill Deacon	select IOMMU_API
300518f7136SWill Deacon	select IOMMU_IO_PGTABLE_LPAE
30145ae7cffSWill Deacon	select ARM_DMA_USE_IOMMU if ARM
30245ae7cffSWill Deacon	help
30345ae7cffSWill Deacon	  Support for implementations of the ARM System MMU architecture
304518f7136SWill Deacon	  versions 1 and 2.
30545ae7cffSWill Deacon
30645ae7cffSWill Deacon	  Say Y here if your SoC includes an IOMMU device implementing
30745ae7cffSWill Deacon	  the ARM SMMU architecture.
30845ae7cffSWill Deacon
30948ec83bcSWill Deaconconfig ARM_SMMU_V3
31048ec83bcSWill Deacon	bool "ARM Ltd. System MMU Version 3 (SMMUv3) Support"
31148ec83bcSWill Deacon	depends on ARM64 && PCI
31248ec83bcSWill Deacon	select IOMMU_API
31348ec83bcSWill Deacon	select IOMMU_IO_PGTABLE_LPAE
314166bdbd2SMarc Zyngier	select GENERIC_MSI_IRQ_DOMAIN
31548ec83bcSWill Deacon	help
31648ec83bcSWill Deacon	  Support for implementations of the ARM System MMU architecture
31748ec83bcSWill Deacon	  version 3 providing translation support to a PCIe root complex.
31848ec83bcSWill Deacon
31948ec83bcSWill Deacon	  Say Y here if your system includes an IOMMU device implementing
32048ec83bcSWill Deacon	  the ARM SMMUv3 architecture.
32148ec83bcSWill Deacon
3228128f23cSGerald Schaeferconfig S390_IOMMU
3238128f23cSGerald Schaefer	def_bool y if S390 && PCI
3248128f23cSGerald Schaefer	depends on S390 && PCI
3258128f23cSGerald Schaefer	select IOMMU_API
3268128f23cSGerald Schaefer	help
3278128f23cSGerald Schaefer	  Support for the IOMMU API for s390 PCI devices.
3288128f23cSGerald Schaefer
3290df4fabeSYong Wuconfig MTK_IOMMU
3300df4fabeSYong Wu	bool "MTK IOMMU Support"
3310df4fabeSYong Wu	depends on ARM || ARM64
3320df4fabeSYong Wu	depends on ARCH_MEDIATEK || COMPILE_TEST
3331928832fSArnd Bergmann	select ARM_DMA_USE_IOMMU
3340df4fabeSYong Wu	select IOMMU_API
3350df4fabeSYong Wu	select IOMMU_DMA
3360df4fabeSYong Wu	select IOMMU_IO_PGTABLE_ARMV7S
3370df4fabeSYong Wu	select MEMORY
3380df4fabeSYong Wu	select MTK_SMI
3390df4fabeSYong Wu	help
3400df4fabeSYong Wu	  Support for the M4U on certain Mediatek SOCs. M4U is MultiMedia
3410df4fabeSYong Wu	  Memory Management Unit. This option enables remapping of DMA memory
3420df4fabeSYong Wu	  accesses for the multimedia subsystem.
3430df4fabeSYong Wu
3440df4fabeSYong Wu	  If unsure, say N here.
3450df4fabeSYong Wu
346b17336c5SHonghui Zhangconfig MTK_IOMMU_V1
347b17336c5SHonghui Zhang	bool "MTK IOMMU Version 1 (M4U gen1) Support"
348b17336c5SHonghui Zhang	depends on ARM
349b17336c5SHonghui Zhang	depends on ARCH_MEDIATEK || COMPILE_TEST
350b17336c5SHonghui Zhang	select ARM_DMA_USE_IOMMU
351b17336c5SHonghui Zhang	select IOMMU_API
352b17336c5SHonghui Zhang	select MEMORY
353b17336c5SHonghui Zhang	select MTK_SMI
354b17336c5SHonghui Zhang	select COMMON_CLK_MT2701_MMSYS
355b17336c5SHonghui Zhang	select COMMON_CLK_MT2701_IMGSYS
356b17336c5SHonghui Zhang	select COMMON_CLK_MT2701_VDECSYS
357b17336c5SHonghui Zhang	help
358b17336c5SHonghui Zhang	  Support for the M4U on certain Mediatek SoCs. M4U generation 1 HW is
359b17336c5SHonghui Zhang	  Multimedia Memory Managememt Unit. This option enables remapping of
360b17336c5SHonghui Zhang	  DMA memory accesses for the multimedia subsystem.
361b17336c5SHonghui Zhang
362b17336c5SHonghui Zhang	  if unsure, say N here.
363b17336c5SHonghui Zhang
36468255b62SJoerg Roedelendif # IOMMU_SUPPORT
365