From: Sireesh Kodali <sireeshkodali1@gmail.com>
To: vkoul@kernel.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org
Cc: dmaengine@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht,
Sireesh Kodali <sireeshkodali1@gmail.com>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>
Subject: [PATCH v2 3/3] dmaengine: bam_dma: Add support for immediate commands
Date: Thu, 27 Oct 2022 10:44:29 +0530 [thread overview]
Message-ID: <20221027051429.46593-4-sireeshkodali1@gmail.com> (raw)
In-Reply-To: <20221027051429.46593-1-sireeshkodali1@gmail.com>
Immediate commands are handled similar to regular commands that are sent
over BAM, only a different flag needs to be set. The immediate command
support is needed to implement support for IPA v2.x, which rely on BAM
immediate commands to send commands to the IPA microcontroller.
Signed-off-by: Sireesh Kodali <sireeshkodali1@gmail.com>
---
drivers/dma/qcom/bam_dma.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
index 2ff787df513e..3135a3e4a167 100644
--- a/drivers/dma/qcom/bam_dma.c
+++ b/drivers/dma/qcom/bam_dma.c
@@ -58,6 +58,7 @@ struct bam_desc_hw {
#define DESC_FLAG_EOB BIT(13)
#define DESC_FLAG_NWD BIT(12)
#define DESC_FLAG_CMD BIT(11)
+#define DESC_FLAG_IMM BIT(8)
struct bam_async_desc {
struct virt_dma_desc vd;
@@ -693,6 +694,8 @@ static struct dma_async_tx_descriptor *bam_prep_slave_sg(struct dma_chan *chan,
do {
if (flags & DMA_PREP_CMD)
desc->flags |= cpu_to_le16(DESC_FLAG_CMD);
+ else if (flags & DMA_PREP_IMM_CMD)
+ desc->flags |= cpu_to_le16(DESC_FLAG_IMM);
desc->addr = cpu_to_le32(sg_dma_address(sg) +
curr_offset);
--
2.38.1
next prev parent reply other threads:[~2022-10-27 5:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-27 5:14 [PATCH v2 0/3] dmaengine: Add support for immediate commands Sireesh Kodali
2022-10-27 5:14 ` [PATCH v2 1/3] doc: dmaengine: client-api: Add immediate commands in the DMA client API Sireesh Kodali
2022-10-27 5:14 ` [PATCH v2 2/3] dmaengine: Add support for immediate commands in the " Sireesh Kodali
2022-10-27 5:14 ` Sireesh Kodali [this message]
2022-11-04 12:40 ` [PATCH v2 0/3] dmaengine: Add support for immediate commands Vinod Koul
2022-11-11 5:12 ` Sireesh Kodali
2022-11-13 22:23 ` Vinod Koul
2022-11-24 3:14 ` Sireesh Kodali
2022-11-25 16:50 ` Sireesh Kodali
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=20221027051429.46593-4-sireeshkodali1@gmail.com \
--to=sireeshkodali1@gmail.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=konrad.dybcio@somainline.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vkoul@kernel.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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