From: Peter Ujfalusi Date: Fri, 14 Sep 2012 12:05:44 +0000 (+0300) Subject: dmaengine: omap: Support for element mode in cyclic DMA X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ccffa3870a7ec2b59cf051b745220c56f423d182;p=linux-beck.git dmaengine: omap: Support for element mode in cyclic DMA When src_maxburst/dst_maxburst is set to 0 by the users of cyclic DMA (mostly audio) indicates that we should configure the omap DMA to element sync mode instead of packet mode. Signed-off-by: Peter Ujfalusi Acked-by: Vinod Koul Tested-by: Janusz Krzysztofik Signed-off-by: Mark Brown --- diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c index ae0561826137..b77a40db2856 100644 --- a/drivers/dma/omap-dma.c +++ b/drivers/dma/omap-dma.c @@ -413,7 +413,10 @@ static struct dma_async_tx_descriptor *omap_dma_prep_dma_cyclic( d->dev_addr = dev_addr; d->fi = burst; d->es = es; - d->sync_mode = OMAP_DMA_SYNC_PACKET; + if (burst) + d->sync_mode = OMAP_DMA_SYNC_PACKET; + else + d->sync_mode = OMAP_DMA_SYNC_ELEMENT; d->sync_type = sync_type; d->periph_port = OMAP_DMA_PORT_MPUI; d->sg[0].addr = buf_addr;