diff options
author | James Morris <jmorris@namei.org> | 2009-03-23 19:52:46 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-03-23 19:52:46 -0400 |
commit | 703a3cd72817e99201cef84a8a7aecc60b2b3581 (patch) | |
tree | 3e943755178ff410694722bb031f523136fbc432 /drivers/dma/fsldma.c | |
parent | df7f54c012b92ec93d56b68547351dcdf8a163d3 (diff) | |
parent | 8e0ee43bc2c3e19db56a4adaa9a9b04ce885cd84 (diff) |
Merge branch 'master' into next
Diffstat (limited to 'drivers/dma/fsldma.c')
-rw-r--r-- | drivers/dma/fsldma.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 70126a60623..86d6da47f55 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c | |||
@@ -158,7 +158,8 @@ static void dma_start(struct fsl_dma_chan *fsl_chan) | |||
158 | 158 | ||
159 | static void dma_halt(struct fsl_dma_chan *fsl_chan) | 159 | static void dma_halt(struct fsl_dma_chan *fsl_chan) |
160 | { | 160 | { |
161 | int i = 0; | 161 | int i; |
162 | |||
162 | DMA_OUT(fsl_chan, &fsl_chan->reg_base->mr, | 163 | DMA_OUT(fsl_chan, &fsl_chan->reg_base->mr, |
163 | DMA_IN(fsl_chan, &fsl_chan->reg_base->mr, 32) | FSL_DMA_MR_CA, | 164 | DMA_IN(fsl_chan, &fsl_chan->reg_base->mr, 32) | FSL_DMA_MR_CA, |
164 | 32); | 165 | 32); |
@@ -166,8 +167,11 @@ static void dma_halt(struct fsl_dma_chan *fsl_chan) | |||
166 | DMA_IN(fsl_chan, &fsl_chan->reg_base->mr, 32) & ~(FSL_DMA_MR_CS | 167 | DMA_IN(fsl_chan, &fsl_chan->reg_base->mr, 32) & ~(FSL_DMA_MR_CS |
167 | | FSL_DMA_MR_EMS_EN | FSL_DMA_MR_CA), 32); | 168 | | FSL_DMA_MR_EMS_EN | FSL_DMA_MR_CA), 32); |
168 | 169 | ||
169 | while (!dma_is_idle(fsl_chan) && (i++ < 100)) | 170 | for (i = 0; i < 100; i++) { |
171 | if (dma_is_idle(fsl_chan)) | ||
172 | break; | ||
170 | udelay(10); | 173 | udelay(10); |
174 | } | ||
171 | if (i >= 100 && !dma_is_idle(fsl_chan)) | 175 | if (i >= 100 && !dma_is_idle(fsl_chan)) |
172 | dev_err(fsl_chan->dev, "DMA halt timeout!\n"); | 176 | dev_err(fsl_chan->dev, "DMA halt timeout!\n"); |
173 | } | 177 | } |