Merge branch 'dma' into devel
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Sat, 21 Feb 2009 21:42:50 +0000 (21:42 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 21 Feb 2009 21:42:50 +0000 (21:42 +0000)
Conflicts:

arch/arm/plat-mxc/dma-mx1-mx2.c

1  2 
arch/arm/mach-footbridge/dma.c
arch/arm/plat-mxc/dma-mx1-mx2.c

index 4f3506346969d6214dd12004e48c057f31bd6b07,fdd94b182d7825db63dd31eff4eda5be9d3c4532..e2e0df8bcee27deb9ec5c8028b5cadca91c91d94
@@@ -12,7 -12,6 +12,7 @@@
   */
  #include <linux/init.h>
  #include <linux/io.h>
 +#include <linux/spinlock.h>
  
  #include <asm/dma.h>
  #include <asm/scatterlist.h>
  #include <asm/hardware/dec21285.h>
  
  #if 0
- static int fb_dma_request(dmach_t channel, dma_t *dma)
+ static int fb_dma_request(unsigned int chan, dma_t *dma)
  {
        return -EINVAL;
  }
  
- static void fb_dma_enable(dmach_t channel, dma_t *dma)
+ static void fb_dma_enable(unsigned int chan, dma_t *dma)
  {
  }
  
- static void fb_dma_disable(dmach_t channel, dma_t *dma)
+ static void fb_dma_disable(unsigned int chan, dma_t *dma)
  {
  }
  
@@@ -42,7 -41,7 +42,7 @@@ static struct dma_ops fb_dma_ops = 
  };
  #endif
  
void __init arch_dma_init(dma_t *dma)
static int __init fb_dma_init(void)
  {
  #if 0
        dma[_DC21285_DMA(0)].d_ops = &fb_dma_ops;
@@@ -50,6 -49,8 +50,8 @@@
  #endif
  #ifdef CONFIG_ISA_DMA
        if (footbridge_cfn_mode())
-               isa_init_dma(dma + _ISA_DMA(0));
+               isa_init_dma();
  #endif
+       return 0;
  }
+ core_initcall(fb_dma_init);
index 2905ec7587589da8bcb599432e1b7b7f19fae5a6,92bc4f6bd0199d64ef1ccd61d0a27ceafd4261a2..a9bab15f0fd0b2972fb4451a7817ad2c864af53f
@@@ -34,6 -34,7 +34,6 @@@
  #include <asm/system.h>
  #include <asm/irq.h>
  #include <mach/hardware.h>
 -#include <mach/dma.h>
  #include <mach/dma-mx1-mx2.h>
  
  #define DMA_DCR     0x00              /* Control Register */
@@@ -113,7 -114,7 +113,7 @@@ struct imx_dma_channel 
        void (*err_handler) (int, void *, int errcode);
        void (*prog_handler) (int, void *, struct scatterlist *);
        void *data;
-       unsigned int  dma_mode;
+       unsigned int dma_mode;
        struct scatterlist *sg;
        unsigned int resbytes;
        int dma_num;
@@@ -511,7 -512,6 +511,7 @@@ void imx_dma_disable(int channel
  }
  EXPORT_SYMBOL(imx_dma_disable);
  
 +#ifdef CONFIG_ARCH_MX2
  static void imx_dma_watchdog(unsigned long chno)
  {
        struct imx_dma_channel *imxdma = &imx_dma_channels[chno];
        if (imxdma->err_handler)
                imxdma->err_handler(chno, imxdma->data, IMX_DMA_ERR_TIMEOUT);
  }
 +#endif
  
  static irqreturn_t dma_err_handler(int irq, void *dev_id)
  {
@@@ -676,7 -675,7 +676,7 @@@ int imx_dma_request(int channel, const 
  {
        struct imx_dma_channel *imxdma = &imx_dma_channels[channel];
        unsigned long flags;
 -      int ret;
 +      int ret = 0;
  
        /* basic sanity checks */
        if (!name)
        ret = request_irq(MXC_INT_DMACH0 + channel, dma_irq_handler, 0, "DMA",
                        NULL);
        if (ret) {
 +              local_irq_restore(flags);
                printk(KERN_CRIT "Can't register IRQ %d for DMA channel %d\n",
                                MXC_INT_DMACH0 + channel, channel);
                return ret;
        imxdma->sg = NULL;
  
        local_irq_restore(flags);
 -      return 0;
 +      return ret;
  }
  EXPORT_SYMBOL(imx_dma_request);