dma: shdma: add checking the DMAOR_AE in sh_dmae_err
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Wed, 9 Feb 2011 07:46:47 +0000 (07:46 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 29 Mar 2011 06:53:31 +0000 (15:53 +0900)
The irq numbers of tranfer end and address error are assigned same number
on some CPU. So the sh_dmae_err() should check the AE flag in DMAOR.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/dma/shdma.c

index 6451b581a70b86e489eba697da2d956a4f4c67a7..d50da41ac328c6fdf82484371232db31a701febf 100644 (file)
@@ -865,7 +865,12 @@ static unsigned int sh_dmae_reset(struct sh_dmae_device *shdev)
 
 static irqreturn_t sh_dmae_err(int irq, void *data)
 {
-       return IRQ_RETVAL(sh_dmae_reset(data));
+       struct sh_dmae_device *shdev = data;
+
+       if (dmaor_read(shdev) & DMAOR_AE)
+               return IRQ_RETVAL(sh_dmae_reset(data));
+       else
+               return IRQ_NONE;
 }
 
 static void dmae_do_tasklet(unsigned long data)