Commit d63ef057 authored by Ben Dooks's avatar Ben Dooks Committed by Russell King

[ARM PATCH] 2256/1: S3C2410 - dma load fixes

Patch from Ben Dooks

Fix pair of bugs in dma loading code

1) no need to error if loading onto stopped channel
2) irq code prints error if buffer done callback
   fully reloads the channel.

Signed-off-by: Ben Dooks
Signed-off-by: Russell King
parent b8afc28b
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* Changelog: * Changelog:
* 18-Nov-2004 BJD Removed error for loading onto stopped channel
* 10-Nov-2004 BJD Ensure all external symbols exported for modules * 10-Nov-2004 BJD Ensure all external symbols exported for modules
* 10-Nov-2004 BJD Use sys_device and sysdev_class for power management * 10-Nov-2004 BJD Use sys_device and sysdev_class for power management
* 08-Aug-2004 BJD Apply rmk's suggestions * 08-Aug-2004 BJD Apply rmk's suggestions
...@@ -493,10 +494,6 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id, ...@@ -493,10 +494,6 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id,
} else if (chan->state == S3C2410_DMA_IDLE) { } else if (chan->state == S3C2410_DMA_IDLE) {
if (chan->flags & S3C2410_DMAF_AUTOSTART) { if (chan->flags & S3C2410_DMAF_AUTOSTART) {
s3c2410_dma_ctrl(chan->number, S3C2410_DMAOP_START); s3c2410_dma_ctrl(chan->number, S3C2410_DMAOP_START);
} else {
printk(KERN_DEBUG "dma%d: cannot load onto stopped channel'n", chan->number);
local_irq_restore(flags);
return -EINVAL;
} }
} }
...@@ -653,6 +650,9 @@ s3c2410_dma_irq(int irq, void *devpw, struct pt_regs *regs) ...@@ -653,6 +650,9 @@ s3c2410_dma_irq(int irq, void *devpw, struct pt_regs *regs)
break; break;
case S3C2410_DMALOAD_1LOADED_1RUNNING:
goto no_load;
default: default:
printk(KERN_ERR "dma%d: unknown load_state in irq, %d\n", printk(KERN_ERR "dma%d: unknown load_state in irq, %d\n",
chan->number, chan->load_state); chan->number, chan->load_state);
...@@ -673,6 +673,7 @@ s3c2410_dma_irq(int irq, void *devpw, struct pt_regs *regs) ...@@ -673,6 +673,7 @@ s3c2410_dma_irq(int irq, void *devpw, struct pt_regs *regs)
} }
} }
no_load:
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment