dmaengine: zx: set DMA_CYCLIC cap_mask bit
authorShawn Guo <shawn.guo@linaro.org>
Thu, 15 Dec 2016 14:03:36 +0000 (22:03 +0800)
committerVinod Koul <vinod.koul@intel.com>
Mon, 2 Jan 2017 05:23:48 +0000 (10:53 +0530)
The zx_dma driver supports cyclic transfer mode.  Let's set DMA_CYCLIC
cap_mask bit to make that clear, and avoid unnecessary failure when
clients request channel via dma_request_chan_by_mask() with DMA_CYCLIC
bit set in mask.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/zx_dma.c

index 380276d078b2c2cb852bfe8115bb00cb98c4c7ea..33155c6816cc865d9bd8d9c2d07109626a8f7c75 100644 (file)
@@ -812,6 +812,7 @@ static int zx_dma_probe(struct platform_device *op)
        INIT_LIST_HEAD(&d->slave.channels);
        dma_cap_set(DMA_SLAVE, d->slave.cap_mask);
        dma_cap_set(DMA_MEMCPY, d->slave.cap_mask);
+       dma_cap_set(DMA_CYCLIC, d->slave.cap_mask);
        dma_cap_set(DMA_PRIVATE, d->slave.cap_mask);
        d->slave.dev = &op->dev;
        d->slave.device_free_chan_resources = zx_dma_free_chan_resources;