# SPDX-License-Identifier: GPL-2.0-only
#
# DMA engine configuration
#

menuconfig DMADEVICES
	bool "DMA Engine support"
	depends on HAS_DMA
	help
	  DMA engines can do asynchronous data transfers without
	  involving the host CPU.  Currently, this framework can be
	  used to offload memory copies in the network stack and
	  RAID operations in the MD driver.  This menu only presents
	  DMA Device drivers supported by the configured arch, it may
	  be empty in some cases.

config DMADEVICES_DEBUG
	bool "DMA Engine debugging"
	depends on DMADEVICES != n
	help
	  This is an option for use by developers; most people should
	  say N here.  This enables DMA engine core and driver debugging.

config DMADEVICES_VDEBUG
	bool "DMA Engine verbose debugging"
	depends on DMADEVICES_DEBUG != n
	help
	  This is an option for use by developers; most people should
	  say N here.  This enables deeper (more verbose) debugging of
	  the DMA engine core and drivers.


if DMADEVICES

comment "DMA Devices"

#core
config ASYNC_TX_ENABLE_CHANNEL_SWITCH
	bool

config ARCH_HAS_ASYNC_TX_FIND_CHANNEL
	bool

config DMA_ENGINE
	bool

config DMA_VIRTUAL_CHANNELS
	tristate

config DMA_ACPI
	def_bool y
	depends on ACPI

config DMA_OF
	def_bool y
	depends on OF
	select DMA_ENGINE

#devices
config ALTERA_MSGDMA
	tristate "Altera / Intel mSGDMA Engine"
	depends on HAS_IOMEM
	select DMA_ENGINE
	help
	  Enable support for Altera / Intel mSGDMA controller.

config AMBA_PL08X
	bool "ARM PrimeCell PL080 or PL081 support"
	depends on ARM_AMBA
	select DMA_ENGINE
	select DMA_VIRTUAL_CHANNELS
	help
	  Say yes if your platform has a PL08x DMAC device which can
	  provide DMA engine support. This includes the original ARM
	  PL080 and PL081, Samsungs PL080 derivative and Faraday
	  Technology's FTDMAC020 PL080 derivative.

config AMCC_PPC440SPE_ADMA
	tristate "AMCC PPC440SPe ADMA support"
	depends on 440SPe || 440SP
	select DMA_ENGINE
	select DMA_ENGINE_RAID
	select ARCH_HAS_ASYNC_TX_FIND_CHANNEL
	select ASYNC_TX_ENABLE_CHANNEL_SWITCH
	help
	  Enable support for the AMCC PPC440SPe RAID engines.

config APPLE_ADMAC
	tristate "Apple ADMAC support"
	depends on ARCH_APPLE || COMPILE_TEST
	select DMA_ENGINE
	help
	  Enable support for Audio DMA Controller found on Apple Silicon SoCs.

config ARM_DMA350
	tristate "Arm DMA-350 support"
	depends on ARM || ARM64 || COMPILE_TEST
	select DMA_ENGINE
	select DMA_VIRTUAL_CHANNELS
	help
	  Enable support for the Arm DMA-350 controller.

config AT_HDMAC
	tristate "Atmel AHB DMA support"
	depends on ARCH_AT91 || COMPILE_TEST
	select DMA_ENGINE
	select DMA_VIRTUAL_CHANNELS
	help
	  Support the Atmel AHB DMA controller.

config AT_XDMAC
	tristate "Atmel XDMA support"
	depends on ARCH_MICROCHIP
	select DMA_ENGINE
	help
	  Support the Atmel XDMA controller.

config AXI_DMAC
	tristate "Analog Devices AXI-DMAC DMA support"
	depends on MICROBLAZE || NIOS2 || ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_INTEL_SOCFPGA || COMPILE_TEST
	select DMA_ENGINE
	select DMA_VIRTUAL_CHANNELS
	select REGMAP_MMIO
	help
	  Enable support for the Analog Devices AXI-DMAC peripheral. This DMA
	  controller is often used in Analog Devices' reference designs for FPGA
	  platforms.

config BCM_SBA_RAID
	tristate "Broadcom SBA RAID engine support"
	depends on ARM64 || COMPILE_TEST
	depends on MAILBOX && RAID6_PQ
	select DMA_ENGINE
	select DMA_ENGINE_RAID
	select ASYNC_TX_DISABLE_XOR_VAL_DMA
	select ASYNC_TX_DISABLE_PQ_VAL_DMA
	default m if ARCH_BCM_IPROC
	help
	  Enable support for Broadcom SBA RAID Engine. The SBA RAID
	  engine is available on most of the Broadcom iProc SoCs. It
	  has the capability to offload memcpy, xor and pq computation
	  for raid5/6.

config DMA_BCM2835
	tristate "BCM2835 DMA engine support"
	depends on ARCH_BCM2835 || COMPILE_TEST
	select DMA_ENGINE
	select DMA_VIRTUAL_CHANNELS

config DMA_JZ4780
	tristate "JZ4780 DMA support"
	depends on MIPS || COMPILE_TEST
	select DMA_ENGINE
	select DMA_VIRTUAL_CHANNELS
	help
	  This selects support for the DMA controller in Ingenic JZ4780 SoCs.
	  If you have a board based on such a SoC and wish to use DMA for
	  devices which can use the DMA controller, say Y or M here.

config DMA_SA11X0
	tristate "SA-11x0 DMA support"
	depends on ARCH_SA1100 || COMPILE_TEST
	select DMA_ENGINE
	select DMA_VIRTUAL_CHANNELS
	help
	  Support the DMA engine found on Intel StrongARM SA-1100 and
	  SA-1110 SoCs.  This DMA engine can only be used with on-chip
	  devices.

config DMA_SUN4I
	tristate "Allwinner A10 DMA SoCs support"
	depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUNIV
	default (MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUNIV)
	select DMA_ENGINE
	select DMA_VIRTUAL_CHANNELS
	help
	  Enable support for the DMA controller present in the sun4i,
	  sun5i and sun7i Allwinner ARM SoCs.

config DMA_SUN6I
	tristate "Allwinner A31 SoCs DMA support"
	depends on ARCH_SUNXI || COMPILE_TEST
	depends on RESET_CONTROLLER
	select DMA_ENGINE
	select DMA_VIRTUAL_CHANNELS
	help
	  Support for the DMA engine first found in Allwinner A31 SoCs.

config DW_AXI_DMAC
	tristate "Synopsys DesignWare AXI DMA support"
	depends on OF
	d