dmaengine: imx-sdma: Set DMA channel to be private
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Tue, 7 Feb 2023 04:57:45 +0000 (12:57 +0800)
committerVinod Koul <vkoul@kernel.org>
Thu, 16 Feb 2023 13:15:48 +0000 (18:45 +0530)
If async-tx is loaded before device drivers that requires imx-sdma, the
dmaengine_get() routine from async-tx grabs all non-private channels,
so devices that require DMA fail to work.

So mark imx-sdma with DMA_PRIVATE to avoid such situation.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20230207045745.1029959-1-kai.heng.feng@canonical.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/imx-sdma.c

index 97396af129f88f0c7aaf352c13ec75d56d5c1456..0005ab059a4f3328aa91263fdc18de77aa899f8b 100644 (file)
@@ -2252,6 +2252,7 @@ static int sdma_probe(struct platform_device *pdev)
        dma_cap_set(DMA_SLAVE, sdma->dma_device.cap_mask);
        dma_cap_set(DMA_CYCLIC, sdma->dma_device.cap_mask);
        dma_cap_set(DMA_MEMCPY, sdma->dma_device.cap_mask);
+       dma_cap_set(DMA_PRIVATE, sdma->dma_device.cap_mask);
 
        INIT_LIST_HEAD(&sdma->dma_device.channels);
        /* Initialize channel parameters */