From: Abhishek Sahu <absahu@codeaurora.org>
To: vinod.koul@intel.com, corbet@lwn.net, dan.j.williams@intel.com
Cc: andy.gross@linaro.org, david.brown@linaro.org,
linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, Abhishek Sahu <absahu@codeaurora.org>
Subject: [PATCH v3 1/3] dmaengine: add DMA_PREP_CMD for non-Data descriptors.
Date: Tue, 1 Aug 2017 19:41:42 +0530 [thread overview]
Message-ID: <1501596704-21137-2-git-send-email-absahu@codeaurora.org> (raw)
In-Reply-To: <1501596704-21137-1-git-send-email-absahu@codeaurora.org>
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>
---
Documentation/dmaengine/provider.txt | 7 +++++++
include/linux/dmaengine.h | 4 ++++
2 files changed, 11 insertions(+)
diff --git a/Documentation/dmaengine/provider.txt b/Documentation/dmaengine/provider.txt
index e33bc1c..bfadbfd 100644
--- a/Documentation/dmaengine/provider.txt
+++ b/Documentation/dmaengine/provider.txt
@@ -395,6 +395,13 @@ where to put them)
when DMA_CTRL_REUSE is already set
- Terminating the channel
+ * DMA_PREP_CMD
+ - If set, the client driver tells DMA controller that passed data in DMA
+ API is command data.
+ - Interpretation of command data is DMA controller specific. It can be
+ used for issuing commands to other peripherals/register reads/register
+ writes for which the descriptor should be in different format from
+ normal data descriptors.
General Design Notes
--------------------
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 5336808..45fc833 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -186,6 +186,9 @@ struct dma_interleaved_template {
* on the result of this operation
* @DMA_CTRL_REUSE: client can reuse the descriptor and submit again till
* cleared or freed
+ * @DMA_PREP_CMD: tell the driver that the data passed to DMA API is command
+ * data and the descriptor should be in different format from normal
+ * data descriptors.
*/
enum dma_ctrl_flags {
DMA_PREP_INTERRUPT = (1 << 0),
@@ -195,6 +198,7 @@ enum dma_ctrl_flags {
DMA_PREP_CONTINUE = (1 << 4),
DMA_PREP_FENCE = (1 << 5),
DMA_CTRL_REUSE = (1 << 6),
+ DMA_PREP_CMD = (1 << 7),
};
/**
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
next prev parent reply other threads:[~2017-08-01 14:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-01 14:11 [PATCH v3 0/3] Support for QCOM BAM DMA command descriptor Abhishek Sahu
2017-08-01 14:11 ` Abhishek Sahu [this message]
2017-08-01 14:11 ` [PATCH v3 2/3] dmaengine: qcom: bam_dma: wrapper functions for " Abhishek Sahu
2017-08-01 14:11 ` [PATCH v3 3/3] dmaengine: qcom: bam_dma: add command descriptor flag Abhishek Sahu
2017-08-28 11:10 ` [PATCH v3 0/3] Support for QCOM BAM DMA command descriptor Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1501596704-21137-2-git-send-email-absahu@codeaurora.org \
--to=absahu@codeaurora.org \
--cc=andy.gross@linaro.org \
--cc=corbet@lwn.net \
--cc=dan.j.williams@intel.com \
--cc=david.brown@linaro.org \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-soc@vger.kernel.org \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox