aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-mxc/dma-mx1-mx2.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2009-11-18 09:21:44 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2009-11-24 02:40:14 -0500
commit4998f1a30cf8e21c5bc0766fde4fa58e1adabd72 (patch)
treec58feecc32d7fbe7d128094a72ff9e4471fcdd3d /arch/arm/plat-mxc/dma-mx1-mx2.c
parent74b2a70e34c69687f82b1319a358b21afeea497c (diff)
mxc: mx1/mx2 DMA: add a possibility to create an endless DMA transfer
This is useful for audio where we do not want to setup a new scatterlist after playing 4GB of audio data. This would cause skips in the playback. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/plat-mxc/dma-mx1-mx2.c')
-rw-r--r--arch/arm/plat-mxc/dma-mx1-mx2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/plat-mxc/dma-mx1-mx2.c b/arch/arm/plat-mxc/dma-mx1-mx2.c
index 77646436c00e..9c1b3f9c4f4d 100644
--- a/arch/arm/plat-mxc/dma-mx1-mx2.c
+++ b/arch/arm/plat-mxc/dma-mx1-mx2.c
@@ -156,7 +156,8 @@ static inline int imx_dma_sg_next(int channel, struct scatterlist *sg)
156 } 156 }
157 157
158 now = min(imxdma->resbytes, sg->length); 158 now = min(imxdma->resbytes, sg->length);
159 imxdma->resbytes -= now; 159 if (imxdma->resbytes != IMX_DMA_LENGTH_LOOP)
160 imxdma->resbytes -= now;
160 161
161 if ((imxdma->dma_mode & DMA_MODE_MASK) == DMA_MODE_READ) 162 if ((imxdma->dma_mode & DMA_MODE_MASK) == DMA_MODE_READ)
162 __raw_writel(sg->dma_address, DMA_BASE + DMA_DAR(channel)); 163 __raw_writel(sg->dma_address, DMA_BASE + DMA_DAR(channel));