[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221027051429.46593-4-sireeshkodali1@gmail.com>
Date: Thu, 27 Oct 2022 10:44:29 +0530
From: Sireesh Kodali <sireeshkodali1@...il.com>
To: vkoul@...nel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, linux-arm-msm@...r.kernel.org
Cc: dmaengine@...r.kernel.org, ~postmarketos/upstreaming@...ts.sr.ht,
Sireesh Kodali <sireeshkodali1@...il.com>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...ainline.org>
Subject: [PATCH v2 3/3] dmaengine: bam_dma: Add support for immediate commands
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@...il.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
Powered by blists - more mailing lists