aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbhishek Sahu <absahu@codeaurora.org>2017-08-01 10:11:42 -0400
committerVinod Koul <vinod.koul@intel.com>2017-08-28 07:10:18 -0400
commit3e00ab4ac51c2ed47c28fd5000c47399f1a11cf5 (patch)
tree67ced0d4b885d8a2c976545b249b014d8e4ad0eb
parenta63efead7f8eeefcf08e4e7d0b033ac552f7da23 (diff)
dmaengine: add DMA_PREP_CMD for non-Data descriptors.
Some of the DMA controllers are capable of issuing the commands to peripheral by the DMA. These commands can be list of register reads/writes and its different from normal data reads/writes. This patch adds new flag DMA_PREP_CMD in DMA API which tells the driver that the data passed to DMA API is command data and DMA controller driver will form descriptor in the required format. This flag can be used by any DMA controller driver which requires the descriptor in different format for non-Data descriptors. Signed-off-by: Abhishek Sahu <absahu@codeaurora.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--Documentation/dmaengine/provider.txt7
-rw-r--r--include/linux/dmaengine.h4
2 files changed, 11 insertions, 0 deletions
diff --git a/Documentation/dmaengine/provider.txt b/Documentation/dmaengine/provider.txt
index e33bc1c8ed2c..bfadbfdf13ed 100644
--- a/Documentation/dmaengine/provider.txt
+++ b/Documentation/dmaengine/provider.txt
@@ -395,6 +395,13 @@ where to put them)
395 when DMA_CTRL_REUSE is already set 395 when DMA_CTRL_REUSE is already set
396 - Terminating the channel 396 - Terminating the channel
397 397
398 * DMA_PREP_CMD
399 - If set, the client driver tells DMA controller that passed data in DMA
400 API is command data.
401 - Interpretation of command data is DMA controller specific. It can be
402 used for issuing commands to other peripherals/register reads/register
403 writes for which the descriptor should be in different format from
404 normal data descriptors.
398 405
399General Design Notes 406General Design Notes
400-------------------- 407--------------------
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 533680860865..dd4de1d40166 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -186,6 +186,9 @@ struct dma_interleaved_template {
186 * on the result of this operation 186 * on the result of this operation
187 * @DMA_CTRL_REUSE: client can reuse the descriptor and submit again till 187 * @DMA_CTRL_REUSE: client can reuse the descriptor and submit again till
188 * cleared or freed 188 * cleared or freed
189 * @DMA_PREP_CMD: tell the driver that the data passed to DMA API is command
190 * data and the descriptor should be in different format from normal
191 * data descriptors.
189 */ 192 */
190enum dma_ctrl_flags { 193enum dma_ctrl_flags {
191 DMA_PREP_INTERRUPT = (1 << 0), 194 DMA_PREP_INTERRUPT = (1 << 0),
@@ -195,6 +198,7 @@ enum dma_ctrl_flags {
195 DMA_PREP_CONTINUE = (1 << 4), 198 DMA_PREP_CONTINUE = (1 << 4),
196 DMA_PREP_FENCE = (1 << 5), 199 DMA_PREP_FENCE = (1 << 5),
197 DMA_CTRL_REUSE = (1 << 6), 200 DMA_CTRL_REUSE = (1 << 6),
201 DMA_PREP_CMD = (1 << 7),
198}; 202};
199 203
200/** 204/**