diff mbox series

dmaengine: imx-sdma: Set DMA channel to be private

Message ID 20230207045745.1029959-1-kai.heng.feng@canonical.com (mailing list archive)
State Accepted
Commit 00d6a25f5a30d3af9f1351ff274ce866f72dae2d
Headers show
Series dmaengine: imx-sdma: Set DMA channel to be private | expand

Commit Message

Kai-Heng Feng Feb. 7, 2023, 4:57 a.m. UTC
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>
---
 drivers/dma/imx-sdma.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Vinod Koul Feb. 10, 2023, 8:55 a.m. UTC | #1
On 07-02-23, 12:57, Kai-Heng Feng wrote:
> 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.

Applied, thanks
diff mbox series

Patch

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index b926abe4fa43a..b86cdab5c2683 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -2234,6 +2234,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 */