• Jan Kuliga's avatar
    dmaengine: xilinx: xdma: Implement interleaved DMA transfers · 2f8f90cd
    Jan Kuliga authored
    Interleaved DMA functionality allows dmaengine clients' to express
    DMA transfers in an arbitrary way. This is extremely useful in FPGA
    environments, where a greater transfer flexibility is needed. For
    instance, in one FPGA design there may be need to do DMA to/from a FIFO
    at a fixed address, and also to do DMA to/from a (non)contiguous RAM
    memory.
    
    Introduce separate tx preparation callback and add tx-flags handling
    logic. Their behavior is based on the description of interleaved DMA
    transfers in both source code and the DMAEngine's documentation.
    
    Since XDMA is a fully-fledged scatter-gather dma engine, the logic of
    xdma_prep_interleaved_dma() is fairly simple and similar to the other
    tx preparation callbacks. The whole tx-flags handling logic resides in
    xdma_channel_isr(). Transfer of a single frame from a interleaved DMA
    transfer template is pretty similar to the single sg transaction.
    Therefore, the transaction of the whole interleaved DMA transfer
    template is basically a cyclic dma transaction with finite cycles/periods
    (equal to the frame of count) of a single sg transfers.
    Signed-off-by: default avatarJan Kuliga <jankul@alatek.krakow.pl>
    Link: https://lore.kernel.org/r/20231218113943.9099-9-jankul@alatek.krakow.plSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
    2f8f90cd
xdma.c 33.7 KB