Commit a20f10d6 authored by Shengjiu Wang's avatar Shengjiu Wang Committed by Vinod Koul

dmaengine: imx-sdma: support dual fifo for DEV_TO_DEV

SSI and SPDIF are dual fifo interface, when support ASRC P2P
with SSI and SPDIF, the src fifo or dst fifo number can be
two.

The p2p watermark level bit 13 and 14 are designed for
these use case. This patch is to complete this function
in driver.
Signed-off-by: default avatarShengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: default avatarJoy Zou <joy.zou@nxp.com>
Acked-by: default avatarIuliana Prodan <iuliana.prodan@nxp.com>
Signed-off-by: default avatarFrank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20240329-sdma_upstream-v4-3-daeb3067dea7@nxp.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 28810938
...@@ -138,7 +138,11 @@ ...@@ -138,7 +138,11 @@
* 0: Source on AIPS * 0: Source on AIPS
* 12 Destination Bit(DP) 1: Destination on SPBA * 12 Destination Bit(DP) 1: Destination on SPBA
* 0: Destination on AIPS * 0: Destination on AIPS
* 13-15 --------- MUST BE 0 * 13 Source FIFO 1: Source is dual FIFO
* 0: Source is single FIFO
* 14 Destination FIFO 1: Destination is dual FIFO
* 0: Destination is single FIFO
* 15 --------- MUST BE 0
* 16-23 Higher WML HWML * 16-23 Higher WML HWML
* 24-27 N Total number of samples after * 24-27 N Total number of samples after
* which Pad adding/Swallowing * which Pad adding/Swallowing
...@@ -169,6 +173,8 @@ ...@@ -169,6 +173,8 @@
#define SDMA_WATERMARK_LEVEL_SPDIF BIT(10) #define SDMA_WATERMARK_LEVEL_SPDIF BIT(10)
#define SDMA_WATERMARK_LEVEL_SP BIT(11) #define SDMA_WATERMARK_LEVEL_SP BIT(11)
#define SDMA_WATERMARK_LEVEL_DP BIT(12) #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_HWML (0xFF << 16)
#define SDMA_WATERMARK_LEVEL_LWE BIT(28) #define SDMA_WATERMARK_LEVEL_LWE BIT(28)
#define SDMA_WATERMARK_LEVEL_HWE BIT(29) #define SDMA_WATERMARK_LEVEL_HWE BIT(29)
...@@ -1258,6 +1264,16 @@ static void sdma_set_watermarklevel_for_p2p(struct sdma_channel *sdmac) ...@@ -1258,6 +1264,16 @@ static void sdma_set_watermarklevel_for_p2p(struct sdma_channel *sdmac)
sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_DP; sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_DP;
sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_CONT; sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_CONT;
/*
* Limitation: The p2p script support dual fifos in maximum,
* So when fifo number is larger than 1, force enable dual
* fifos.
*/
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) static void sdma_set_watermarklevel_for_sais(struct sdma_channel *sdmac)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment