dmaengine: axi-dmac: Add support for scatter-gather transfers
authorPaul Cercueil <paul@crapouillou.net>
Fri, 15 Dec 2023 13:13:11 +0000 (14:13 +0100)
committerVinod Koul <vkoul@kernel.org>
Thu, 21 Dec 2023 16:09:56 +0000 (21:39 +0530)
commite97dc7435972d28ac7d96d199d4aedb868d04fd8
tree94e8fb7af32c094b0e5e478f7f4dc25619249ba0
parent3f8fd25936ee5f52596f10d420f650c5b5e3285f
dmaengine: axi-dmac: Add support for scatter-gather transfers

Implement support for scatter-gather transfers. Build a chain of
hardware descriptors, each one corresponding to a segment of the
transfer, and linked to the next one. The hardware will transfer the
chain and only fire interrupts when the whole chain has been
transferred.

Support for scatter-gather is automatically enabled when the driver
detects that the hardware supports it, by writing then reading the
AXI_DMAC_REG_SG_ADDRESS register. If not available, the driver will fall
back to standard DMA transfers.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/20231215131313.23840-4-paul@crapouillou.net
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/dma-axi-dmac.c