Skip to contentSkip to conversation

dmaengine: fsl-edma: correct calculation of 'nbytes' in multi-fifo scenario

PATCH Applied Frank Li 2 participants 2 messages Jan 31, 2024 – Feb 7, 2024

Subsystems (3)
lore
Share & tools
lore

Frank Li

author maintainer
#0 lore raw

PATCH 1/1 dmaengine: fsl-edma: correct calculation of 'nbytes' in multi-fifo scenario

From: Joy Zou <[email protected]>

The 'nbytes' should be equivalent to burst * width in audio multi-fifo setups. Given that the FIFO width is fixed at 32 bits, adjusts the burst size for multi-fifo configurations to match the slave maxburst in the configuration.

Fixes 72f5801a4e2b ("dmaengine: fsl-edma: integrate v3 support")
---
 drivers/dma/fsl-edma-common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/fsl-edma-common.c +1 -1
index b53f46245c377..793f1a7ad5e34 100644
@@ -503,7 +503,7 @@ void fsl_edma_fill_tcd(struct fsl_edma_chan *fsl_chan,
 	if (fsl_chan->is_multi_fifo) {
 		/* set mloff to support multiple fifo */
 		burst = cfg->direction == DMA_DEV_TO_MEM ?
-				cfg->src_addr_width : cfg->dst_addr_width;
+				cfg->src_maxburst : cfg->dst_maxburst;
 		nbytes |= EDMA_V3_TCD_NBYTES_MLOFF(-(burst * 4));
 		/* enable DMLOE/SMLOE */
 		if (cfg->direction == DMA_MEM_TO_DEV) {
Signature · 1 line
2.34.1
maintainer Applied
#1 lore raw
Quoted 6 lines · Frank Li

The 'nbytes' should be equivalent to burst * width in audio multi-fifo setups. Given that the FIFO width is fixed at 32 bits, adjusts the burst size for multi-fifo configurations to match the slave maxburst in the configuration.

Applied, thanks!

[1/1] dmaengine: fsl-edma: correct calculation of 'nbytes' in multi-fifo scenario

      commit: 9ba17defd9edd87970b701085402bc8ecc3a11d4

Best regards,

Signature · 1 line
~Vinod