diff options
Diffstat (limited to 'arch/arm/plat-mxc')
-rw-r--r-- | arch/arm/plat-mxc/dma-mx1-mx2.c | 3 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h | 8 |
2 files changed, 10 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)); |
diff --git a/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h b/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h index b3876cc238ca..07be8ad7ec37 100644 --- a/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h +++ b/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h | |||
@@ -58,6 +58,14 @@ imx_dma_setup_single(int channel, dma_addr_t dma_address, | |||
58 | unsigned int dma_length, unsigned int dev_addr, | 58 | unsigned int dma_length, unsigned int dev_addr, |
59 | unsigned int dmamode); | 59 | unsigned int dmamode); |
60 | 60 | ||
61 | |||
62 | /* | ||
63 | * Use this flag as the dma_length argument to imx_dma_setup_sg() | ||
64 | * to create an endless running dma loop. The end of the scatterlist | ||
65 | * must be linked to the beginning for this to work. | ||
66 | */ | ||
67 | #define IMX_DMA_LENGTH_LOOP ((unsigned int)-1) | ||
68 | |||
61 | int | 69 | int |
62 | imx_dma_setup_sg(int channel, struct scatterlist *sg, | 70 | imx_dma_setup_sg(int channel, struct scatterlist *sg, |
63 | unsigned int sgcount, unsigned int dma_length, | 71 | unsigned int sgcount, unsigned int dma_length, |