All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Li <Frank.Li@nxp.com>
To: Vinod Koul <vkoul@kernel.org>, Shawn Guo <shawnguo@kernel.org>,
	 Sascha Hauer <s.hauer@pengutronix.de>,
	 Pengutronix Kernel Team <kernel@pengutronix.de>,
	 Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>
Cc: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	 Frank Li <Frank.Li@nxp.com>,
	Shengjiu Wang <shengjiu.wang@nxp.com>,
	 Vipul Kumar <vipul_kumar@mentor.com>,
	 Srikanth Krishnakar <Srikanth_Krishnakar@mentor.com>,
	 Robin Gong <yibin.gong@nxp.com>, Joy Zou <joy.zou@nxp.com>,
	 Daniel Baluta <daniel.baluta@nxp.com>
Subject: [PATCH v2 2/4] dmaengine: imx-sdma: Support 24bit/3bytes for sg mode
Date: Thu, 07 Mar 2024 12:32:42 -0500	[thread overview]
Message-ID: <20240307-sdma_upstream-v2-2-e97305a43cf5@nxp.com> (raw)
In-Reply-To: <20240307-sdma_upstream-v2-0-e97305a43cf5@nxp.com>

From: Shengjiu Wang <shengjiu.wang@nxp.com>

Update 3bytes buswidth that is supported by sdma.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
Signed-off-by: Srikanth Krishnakar <Srikanth_Krishnakar@mentor.com>
Acked-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Joy Zou <joy.zou@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Frank Li <Frank.Li@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


WARNING: multiple messages have this Message-ID (diff)
From: Frank Li <Frank.Li@nxp.com>
To: Vinod Koul <vkoul@kernel.org>, Shawn Guo <shawnguo@kernel.org>,
	 Sascha Hauer <s.hauer@pengutronix.de>,
	 Pengutronix Kernel Team <kernel@pengutronix.de>,
	 Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>
Cc: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	 Frank Li <Frank.Li@nxp.com>,
	Shengjiu Wang <shengjiu.wang@nxp.com>,
	 Vipul Kumar <vipul_kumar@mentor.com>,
	 Srikanth Krishnakar <Srikanth_Krishnakar@mentor.com>,
	 Robin Gong <yibin.gong@nxp.com>, Joy Zou <joy.zou@nxp.com>,
	 Daniel Baluta <daniel.baluta@nxp.com>
Subject: [PATCH v2 2/4] dmaengine: imx-sdma: Support 24bit/3bytes for sg mode
Date: Thu, 07 Mar 2024 12:32:42 -0500	[thread overview]
Message-ID: <20240307-sdma_upstream-v2-2-e97305a43cf5@nxp.com> (raw)
In-Reply-To: <20240307-sdma_upstream-v2-0-e97305a43cf5@nxp.com>

From: Shengjiu Wang <shengjiu.wang@nxp.com>

Update 3bytes buswidth that is supported by sdma.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
Signed-off-by: Srikanth Krishnakar <Srikanth_Krishnakar@mentor.com>
Acked-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Joy Zou <joy.zou@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Frank Li <Frank.Li@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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2024-03-07 17:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-07 17:32 [PATCH v2 0/4] dmaengine: fsl-sdma: Some improvement for fsl-sdma Frank Li
2024-03-07 17:32 ` Frank Li
2024-03-07 17:32 ` [PATCH v2 1/4] dmaengine: imx-sdma: Support allocate memory from internal SRAM (iram) Frank Li
2024-03-07 17:32   ` Frank Li
2024-03-07 17:32 ` Frank Li [this message]
2024-03-07 17:32   ` [PATCH v2 2/4] dmaengine: imx-sdma: Support 24bit/3bytes for sg mode Frank Li
2024-03-07 17:32 ` [PATCH v2 3/4] dmaengine: imx-sdma: Add multi fifo for DEV_TO_DEV Frank Li
2024-03-07 17:32   ` Frank Li
2024-03-07 17:32 ` [PATCH v2 4/4] dmaengine: imx-sdma: Add i2c dma support Frank Li
2024-03-07 17:32   ` Frank Li
2024-03-12  8:55   ` Joy Zou
2024-03-12  8:55     ` Joy Zou
2024-03-13 10:15   ` Fabio Estevam
2024-03-13 10:15     ` Fabio Estevam
2024-03-14  2:39     ` Frank Li
2024-03-14  2:39       ` Frank Li

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=20240307-sdma_upstream-v2-2-e97305a43cf5@nxp.com \
    --to=frank.li@nxp.com \
    --cc=Srikanth_Krishnakar@mentor.com \
    --cc=daniel.baluta@nxp.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=joy.zou@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=shengjiu.wang@nxp.com \
    --cc=vipul_kumar@mentor.com \
    --cc=vkoul@kernel.org \
    --cc=yibin.gong@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.