[PATCH v2 2/4] dmaengine: imx-sdma: Support 24bit/3bytes for sg mode
Frank Li
Frank.Li at nxp.com
Thu Mar 7 09:32:42 PST 2024
From: Shengjiu Wang <shengjiu.wang at nxp.com>
Update 3bytes buswidth that is supported by sdma.
Signed-off-by: Shengjiu Wang <shengjiu.wang at nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar at mentor.com>
Signed-off-by: Srikanth Krishnakar <Srikanth_Krishnakar at mentor.com>
Acked-by: Robin Gong <yibin.gong at nxp.com>
Reviewed-by: Joy Zou <joy.zou at nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta at nxp.com>
Signed-off-by: Frank Li <Frank.Li at nxp.com>
---
drivers/dma/imx-sdma.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 4f1a9d1b152d6..6be4c1e441266 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -176,6 +176,7 @@
#define SDMA_DMA_BUSWIDTHS (BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) | \
BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) | \
+ BIT(DMA_SLAVE_BUSWIDTH_3_BYTES) | \
BIT(DMA_SLAVE_BUSWIDTH_4_BYTES))
#define SDMA_DMA_DIRECTIONS (BIT(DMA_DEV_TO_MEM) | \
@@ -1658,6 +1659,9 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg(
if (count & 3 || sg->dma_address & 3)
goto err_bd_out;
break;
+ case DMA_SLAVE_BUSWIDTH_3_BYTES:
+ bd->mode.command = 3;
+ break;
case DMA_SLAVE_BUSWIDTH_2_BYTES:
bd->mode.command = 2;
if (count & 1 || sg->dma_address & 1)
--
2.34.1
More information about the linux-arm-kernel
mailing list