lkml.org 
[lkml]   [2022]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v6 04/24] dmaengine: dw-edma: Fix missing src/dst address of the interleaved xfers
    Date
    The interleaved DMA transfers support was added in the commit 85e7518f42c8
    ("dmaengine: dw-edma: Add device_prep_interleave_dma() support"). It
    seems like the support was broken from the very beginning. Depending on
    the selected channel either source or destination address are left
    uninitialized which was obviously wrong. I don't really know how come the
    original modification was working for the commit author. Anyway let's fix
    it by initializing the destination address of the eDMA burst descriptors
    for the DEV_TO_MEM interleaved operations and by initializing the source
    address of the eDMA burst descriptors for the MEM_TO_DEV interleaved
    operations.

    Fixes: 85e7518f42c8 ("dmaengine: dw-edma: Add device_prep_interleave_dma() support")
    Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
    Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
    Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
    Acked-by: Vinod Koul <vkoul@kernel.org>
    ---
    drivers/dma/dw-edma/dw-edma-core.c | 4 ++++
    1 file changed, 4 insertions(+)

    diff --git a/drivers/dma/dw-edma/dw-edma-core.c b/drivers/dma/dw-edma/dw-edma-core.c
    index a8c1bd9c7ae9..778d91d9fc1b 100644
    --- a/drivers/dma/dw-edma/dw-edma-core.c
    +++ b/drivers/dma/dw-edma/dw-edma-core.c
    @@ -455,6 +455,8 @@ dw_edma_device_transfer(struct dw_edma_transfer *xfer)
    * and destination addresses are increased
    * by the same portion (data length)
    */
    + } else if (xfer->type == EDMA_XFER_INTERLEAVED) {
    + burst->dar = dst_addr;
    }
    } else {
    burst->dar = dst_addr;
    @@ -470,6 +472,8 @@ dw_edma_device_transfer(struct dw_edma_transfer *xfer)
    * and destination addresses are increased
    * by the same portion (data length)
    */
    + } else if (xfer->type == EDMA_XFER_INTERLEAVED) {
    + burst->sar = src_addr;
    }
    }

    --
    2.38.0

    \
     
     \ /
      Last update: 2022-11-07 22:06    [W:4.042 / U:0.344 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site