#
# DMA engine configuration
#

menu "DMA Engine support"

config DMA_ENGINE
	bool "Support for DMA engines"
	---help---
          DMA engines offload bulk memory operations from the CPU to dedicated
          hardware, allowing the operations to happen asynchronously.

comment "DMA Clients"

config NET_DMA
	bool "Network: TCP receive copy offload"
	depends on DMA_ENGINE && NET
	default y
	---help---
	  This enables the use of DMA engines in the network stack to
	  offload receive copy-to-user operations, freeing CPU cycles.
	  Since this is the main user of the DMA engine, it should be enabled;
	  say Y here.

config ASYNC_TX_DMA
	tristate "Asynchronous Bulk Memory Transfers/Transforms API"
	default y
	---help---
	  This enables the async_tx management layer for dma engines.
	  Subsystems coded to this API will use offload engines for bulk
	  memory operations where present.  Software implementations are
	  called when a dma engine is not present or fails to allocate
	  memory to carry out the transaction.
	  Current subsystems ported to async_tx: MD_RAID4,5

config DMA_COPY_CLEAR_PAGE
	bool "Perform copy_page and clear_page with a DMA engine (polled)"
	depends on ASYNC_TX_DMA=y && DMA_ENGINE
	default y
	---help---
	  Move the PAGE_SIZE copy_page and clear_page operations to a DMA engine.
	  This operation is polled so it will not necessarily benefit CPU utilization.
	  say Y here.

config POLLED_DMA_MEMCPY
	bool "Perform kernel memory copies with a DMA engine (polled)"
	depends on ASYNC_TX_DMA=y && DMA_ENGINE
	default y
	---help---
	  If a memory copy request is larger than the POLLED_DMA_MEMCPY_THRESHOLD
	  then async_tx will trap it and attempt to use a dma engine for the copy.
	  This operation is polled so it will not benefit CPU utilization.
	  say Y here.

config POLLED_DMA_COPY_USER
	bool "Perform copy_to_user with a DMA engine (polled)"
	depends on ASYNC_TX_DMA=y && DMA_ENGINE && !SMP && !PREEMPT
	default y
	---help---
	  If a memory copy request is larger than the POLLED_DMA_MEMCPY_THRESHOLD 
	  then async_tx will trap it and attempt to use a dma engine for the copy.
	  This operation is polled so it will not benefit CPU utilization.
	  say Y here.

config POLLED_DMA_COPY_FROM_USER
	bool "Perform copy_from_user with a DMA engine (polled)"
	depends on ASYNC_TX_DMA=y && DMA_ENGINE && BROKEN && !SMP && !PREEMPT
	default y
	---help---
	  If a memory copy request is larger than the POLLED_DMA_MEMCPY_THRESHOLD 
	  then async_tx will trap it and attempt to use a dma engine for the copy.
	  This operation is polled so it will not benefit CPU utilization.
	  say Y here.

config POLLED_DMA_MEMCPY_THRESHOLD
	int "Polled DMA memcpy threshold (bytes)"
	depends on POLLED_DMA_MEMCPY || POLLED_DMA_COPY_USER || POLLED_DMA_COPY_FROM_USER
	default "768" if ARM
	default "4096" if !ARM 
	---help---
	  Minimum number of bytes that must be requested in a memcpy call before it
	  is handed to a DMA engine for processing.  This does not affect code that
	  directly calls DMA memcpy routines.

comment "DMA Devices"

config INTEL_IOATDMA
	tristate "Intel I/OAT DMA support"
	depends on DMA_ENGINE && PCI
	default m
	---help---
	  Enable support for the Intel(R) I/OAT DMA engine.

config INTEL_IOP_ADMA
        tristate "Intel IOP ADMA support"
        depends on DMA_ENGINE && (ARCH_IOP32X || ARCH_IOP33X || ARCH_IOP13XX)
        default m
        ---help---
          Enable support for the Intel(R) IOP Series RAID engines.

endmenu
