aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s3c24xx/dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-s3c24xx/dma.c')
-rw-r--r--arch/arm/plat-s3c24xx/dma.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c
index 196b19123653..f0ea7943ac5a 100644
--- a/arch/arm/plat-s3c24xx/dma.c
+++ b/arch/arm/plat-s3c24xx/dma.c
@@ -1,6 +1,6 @@
1/* linux/arch/arm/plat-s3c24xx/dma.c 1/* linux/arch/arm/plat-s3c24xx/dma.c
2 * 2 *
3 * Copyright (c) 2003-2005,2006 Simtec Electronics 3 * Copyright 2003-2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
5 * 5 *
6 * S3C2410 DMA core 6 * S3C2410 DMA core
@@ -208,14 +208,14 @@ s3c2410_dma_loadbuffer(struct s3c2410_dma_chan *chan,
208{ 208{
209 unsigned long reload; 209 unsigned long reload;
210 210
211 pr_debug("s3c2410_chan_loadbuffer: loading buff %p (0x%08lx,0x%06x)\n",
212 buf, (unsigned long)buf->data, buf->size);
213
214 if (buf == NULL) { 211 if (buf == NULL) {
215 dmawarn("buffer is NULL\n"); 212 dmawarn("buffer is NULL\n");
216 return -EINVAL; 213 return -EINVAL;
217 } 214 }
218 215
216 pr_debug("s3c2410_chan_loadbuffer: loading buff %p (0x%08lx,0x%06x)\n",
217 buf, (unsigned long)buf->data, buf->size);
218
219 /* check the state of the channel before we do anything */ 219 /* check the state of the channel before we do anything */
220 220
221 if (chan->load_state == S3C2410_DMALOAD_1LOADED) { 221 if (chan->load_state == S3C2410_DMALOAD_1LOADED) {
@@ -1310,7 +1310,7 @@ int __init s3c24xx_dma_init(unsigned int channels, unsigned int irq,
1310 int channel; 1310 int channel;
1311 int ret; 1311 int ret;
1312 1312
1313 printk("S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics\n"); 1313 printk("S3C24XX DMA Driver, Copyright 2003-2006 Simtec Electronics\n");
1314 1314
1315 dma_channels = channels; 1315 dma_channels = channels;
1316 1316
@@ -1403,11 +1403,13 @@ static struct s3c2410_dma_chan *s3c2410_dma_map_channel(int channel)
1403 ord = &dma_order->channels[channel]; 1403 ord = &dma_order->channels[channel];
1404 1404
1405 for (ch = 0; ch < dma_channels; ch++) { 1405 for (ch = 0; ch < dma_channels; ch++) {
1406 int tmp;
1406 if (!is_channel_valid(ord->list[ch])) 1407 if (!is_channel_valid(ord->list[ch]))
1407 continue; 1408 continue;
1408 1409
1409 if (s3c2410_chans[ord->list[ch]].in_use == 0) { 1410 tmp = ord->list[ch] & ~DMA_CH_VALID;
1410 ch = ord->list[ch] & ~DMA_CH_VALID; 1411 if (s3c2410_chans[tmp].in_use == 0) {
1412 ch = tmp;
1411 goto found; 1413 goto found;
1412 } 1414 }
1413 } 1415 }