diff mbox series

[3/4] dmaengine: imx-sdma: Add multi fifo for DEV_TO_DEV

Message ID 20240303-sdma_upstream-v1-3-869cd0165b09@nxp.com (mailing list archive)
State Superseded
Headers show
Series dmaengine: fsl-sdma: Some improvement for fsl-sdma | expand

Commit Message

Frank Li March 4, 2024, 4:32 a.m. UTC
From: Joy Zou <joy.zou@nxp.com>

Support multi fifo for DEV_TO_DEV.

Signed-off-by: Joy Zou <joy.zou@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 drivers/dma/imx-sdma.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Joy Zou March 7, 2024, 9:06 a.m. UTC | #1
> -----Original Message-----
> From: Frank Li <frank.li@nxp.com>
> Sent: 2024年3月4日 12:33
> 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>;
> dl-linux-imx <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>; Joy Zou <joy.zou@nxp.com>
> Subject: [PATCH 3/4] dmaengine: imx-sdma: Add multi fifo for DEV_TO_DEV
> 
> From: Joy Zou <joy.zou@nxp.com>
> 
> Support multi fifo for DEV_TO_DEV.
> 
> Signed-off-by: Joy Zou <joy.zou@nxp.com>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Joy Zou <joy.zou@nxp.com>
BR
Joy Zou
> ---
>  drivers/dma/imx-sdma.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index
> ef45420485dac..9b133990afa39 100644
> --- a/drivers/dma/imx-sdma.c
> +++ b/drivers/dma/imx-sdma.c
> @@ -169,6 +169,8 @@
>  #define SDMA_WATERMARK_LEVEL_SPDIF	BIT(10)
>  #define SDMA_WATERMARK_LEVEL_SP		BIT(11)
>  #define SDMA_WATERMARK_LEVEL_DP		BIT(12)
> +#define SDMA_WATERMARK_LEVEL_SD		BIT(13)
> +#define SDMA_WATERMARK_LEVEL_DD		BIT(14)
>  #define SDMA_WATERMARK_LEVEL_HWML	(0xFF << 16)
>  #define SDMA_WATERMARK_LEVEL_LWE	BIT(28)
>  #define SDMA_WATERMARK_LEVEL_HWE	BIT(29)
> @@ -1259,6 +1261,11 @@ static void
> sdma_set_watermarklevel_for_p2p(struct sdma_channel *sdmac)
>  		sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_DP;
> 
>  	sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_CONT;
> +
> +	if (sdmac->n_fifos_src > 1)
> +		sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_SD;
> +	if (sdmac->n_fifos_dst > 1)
> +		sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_DD;
>  }
> 
>  static void sdma_set_watermarklevel_for_sais(struct sdma_channel *sdmac)
> 
> --
> 2.34.1
diff mbox series

Patch

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index ef45420485dac..9b133990afa39 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -169,6 +169,8 @@ 
 #define SDMA_WATERMARK_LEVEL_SPDIF	BIT(10)
 #define SDMA_WATERMARK_LEVEL_SP		BIT(11)
 #define SDMA_WATERMARK_LEVEL_DP		BIT(12)
+#define SDMA_WATERMARK_LEVEL_SD		BIT(13)
+#define SDMA_WATERMARK_LEVEL_DD		BIT(14)
 #define SDMA_WATERMARK_LEVEL_HWML	(0xFF << 16)
 #define SDMA_WATERMARK_LEVEL_LWE	BIT(28)
 #define SDMA_WATERMARK_LEVEL_HWE	BIT(29)
@@ -1259,6 +1261,11 @@  static void sdma_set_watermarklevel_for_p2p(struct sdma_channel *sdmac)
 		sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_DP;
 
 	sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_CONT;
+
+	if (sdmac->n_fifos_src > 1)
+		sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_SD;
+	if (sdmac->n_fifos_dst > 1)
+		sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_DD;
 }
 
 static void sdma_set_watermarklevel_for_sais(struct sdma_channel *sdmac)