aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/dma/imx-dma.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
index 629be353c63a..628b0f61ab38 100644
--- a/drivers/dma/imx-dma.c
+++ b/drivers/dma/imx-dma.c
@@ -206,9 +206,10 @@ static int imxdma_hw_chain(struct imxdma_channel *imxdmac)
206/* 206/*
207 * imxdma_sg_next - prepare next chunk for scatter-gather DMA emulation 207 * imxdma_sg_next - prepare next chunk for scatter-gather DMA emulation
208 */ 208 */
209static inline int imxdma_sg_next(struct imxdma_desc *d, struct scatterlist *sg) 209static inline int imxdma_sg_next(struct imxdma_desc *d)
210{ 210{
211 struct imxdma_channel *imxdmac = to_imxdma_chan(d->desc.chan); 211 struct imxdma_channel *imxdmac = to_imxdma_chan(d->desc.chan);
212 struct scatterlist *sg = d->sg;
212 unsigned long now; 213 unsigned long now;
213 214
214 now = min(d->len, sg->length); 215 now = min(d->len, sg->length);
@@ -251,7 +252,7 @@ static void imxdma_enable_hw(struct imxdma_desc *d)
251 d->sg = sg_next(d->sg); 252 d->sg = sg_next(d->sg);
252 if (d->sg) { 253 if (d->sg) {
253 u32 tmp; 254 u32 tmp;
254 imxdma_sg_next(d, d->sg); 255 imxdma_sg_next(d);
255 tmp = imx_dmav1_readl(DMA_CCR(channel)); 256 tmp = imx_dmav1_readl(DMA_CCR(channel));
256 imx_dmav1_writel(tmp | CCR_RPT | CCR_ACRPT, 257 imx_dmav1_writel(tmp | CCR_RPT | CCR_ACRPT,
257 DMA_CCR(channel)); 258 DMA_CCR(channel));
@@ -365,7 +366,7 @@ static void dma_irq_handle_channel(struct imxdma_channel *imxdmac)
365 desc->sg = sg_next(desc->sg); 366 desc->sg = sg_next(desc->sg);
366 367
367 if (desc->sg) { 368 if (desc->sg) {
368 imxdma_sg_next(desc, desc->sg); 369 imxdma_sg_next(desc);
369 370
370 tmp = imx_dmav1_readl(DMA_CCR(chno)); 371 tmp = imx_dmav1_readl(DMA_CCR(chno));
371 372
@@ -475,7 +476,7 @@ static int imxdma_xfer_desc(struct imxdma_desc *d)
475 return -EINVAL; 476 return -EINVAL;
476 } 477 }
477 478
478 imxdma_sg_next(d, d->sg); 479 imxdma_sg_next(d);
479 480
480 break; 481 break;
481 default: 482 default: