dmaengine: xilinx: xdma: Support cyclic transfers
authorMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 5 Oct 2023 16:02:37 +0000 (18:02 +0200)
committerVinod Koul <vkoul@kernel.org>
Mon, 9 Oct 2023 05:30:34 +0000 (11:00 +0530)
commitcd8c732ce1a561d62e22a9d8cf5e4737d66b7d5e
treee9c5b22b64c73ecd3ee6fed05e05759b2413dd9b
parent0db2b6717c5ed1471a639f3af2f650eb9010c732
dmaengine: xilinx: xdma: Support cyclic transfers

In order to use this dmaengine with sound devices, let's add cyclic
transfers support. Most of the code is reused from the existing
scatter-gather implementation, only the final linking between
descriptors, the control fields (to trigger interrupts more often) and
the interrupt handling are really different.

This controller supports up to 32 adjacent descriptors, we assume this
is way more than enough for the purpose of cyclic transfers and limit to
32 the number of cycled descriptors. This way, we simplify a lot the
overall handling of the descriptors.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20231005160237.2804238-4-miquel.raynal@bootlin.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/xilinx/xdma-regs.h
drivers/dma/xilinx/xdma.c