Re: [PATCH v10 0/2] dmaengine: fsl-edma: Scatter/gather improvements
From: Vinod Koul
Date: Tue Sep 15 2026 - 13:40:10 EST
On 11-09-26, 15:11, Benoît Monin wrote:
> This series adds support for scatter/gather DMA transfers via dma_vec
> and dynamic descriptor chaining to the Freescale eDMA controller driver.
>
> The first patch implements the .device_prep_peripheral_dma_vec() callback,
> enabling the DMA engine to accept an array of dma_vec structures. This
> callback supports both regular and cyclic transfer modes.
>
> The second patch introduces dynamic scatter/gather chaining, which allows
> multiple DMA descriptors to be linked together without stopping the channel.
> This optimization eliminates idle periods when back-to-back transfers are
> submitted, improving throughput and reducing latency. The implementation
> carefully preserves cyclic transfer semantics and respects hardware
> constraints on platforms with split register layouts.
>
> I tested it on the i.MX93. The dynamic scatter/gather chaining should
> work with other eDMA controller with split register layout.
This fails to build for me, needs bitfield header
drivers/dma/fsl-edma-common.c: In function ‘fsl_edma_tx_chan_handler’:
drivers/dma/fsl-edma-common.c:59:33: error: implicit declaration of function ‘FIELD_GET’ [-Wimplicit-function-declaration]
59 | u8 link_sg_id = FIELD_GET(EDMA_TCD_CSR_LINKCH, csr);
| ^~~~~~~~~
drivers/dma/fsl-edma-common.c: In function ‘fsl_edma_prep_peripheral_dma_vec’:
drivers/dma/fsl-edma-common.c:784:55: error: implicit declaration of function ‘FIELD_MAX’ [-Wimplicit-function-declaration]
784 | if (!nbytes || vecs[i].len / nbytes > FIELD_MAX(EDMA_TCD_ITER_MASK))
| ^~~~~~~~~
drivers/dma/fsl-edma-common.c: In function ‘fsl_edma_link_sg’:
drivers/dma/fsl-edma-common.c:1015:24: error: implicit declaration of function ‘FIELD_PREP’ [-Wimplicit-function-declaration]
1015 | csr |= FIELD_PREP(EDMA_TCD_CSR_LINKCH, fsl_chan->link_sg_id);
| ^~~~~~~~~~
--
~Vinod