aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/dma
diff options
context:
space:
mode:
authorEric Long <eric.long@spreadtrum.com>2018-05-23 17:31:11 +0800
committerVinod Koul <vkoul@kernel.org>2018-05-29 10:15:33 +0530
commitca1b7d3daff43a269fb7a0479055ac5b741638d8 (patch)
tree48bf81c31fea321429c692e321d26e41449e978c /include/linux/dma
parentdmaengine: sprd: Optimize the sprd_dma_prep_dma_memcpy() (diff)
downloadwireguard-linux-ca1b7d3daff43a269fb7a0479055ac5b741638d8.tar.xz
wireguard-linux-ca1b7d3daff43a269fb7a0479055ac5b741638d8.zip
dmaengine: sprd: Add Spreadtrum DMA configuration
This patch adds the 'device_config' and 'device_prep_slave_sg' interfaces for users to configure DMA, as well as adding one 'struct sprd_dma_config' structure to save Spreadtrum DMA configuration for each DMA channel. Signed-off-by: Eric Long <eric.long@spreadtrum.com> Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'include/linux/dma')
-rw-r--r--include/linux/dma/sprd-dma.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/dma/sprd-dma.h b/include/linux/dma/sprd-dma.h
index c545162e725b..b0115e340fbc 100644
--- a/include/linux/dma/sprd-dma.h
+++ b/include/linux/dma/sprd-dma.h
@@ -3,6 +3,10 @@
#ifndef _SPRD_DMA_H_
#define _SPRD_DMA_H_
+#define SPRD_DMA_REQ_SHIFT 16
+#define SPRD_DMA_FLAGS(req_mode, int_type) \
+ ((req_mode) << SPRD_DMA_REQ_SHIFT | (int_type))
+
/*
* enum sprd_dma_req_mode: define the DMA request mode
* @SPRD_DMA_FRAG_REQ: fragment request mode