drm/drm_crtc: return -EFAULT on copy_to_user errors
[safe/jmp/linux-2.6] / drivers / dma / shdma.h
index 60b81e5..4021275 100644 (file)
 #ifndef __DMA_SHDMA_H
 #define __DMA_SHDMA_H
 
-#include <linux/device.h>
-#include <linux/dmapool.h>
 #include <linux/dmaengine.h>
+#include <linux/interrupt.h>
+#include <linux/list.h>
 
+#define SH_DMAC_MAX_CHANNELS 6
+#define SH_DMA_SLAVE_NUMBER 256
 #define SH_DMA_TCR_MAX 0x00FFFFFF      /* 16MB */
 
-struct sh_dmae_regs {
-       u32 sar; /* SAR / source address */
-       u32 dar; /* DAR / destination address */
-       u32 tcr; /* TCR / transfer count */
-};
-
-struct sh_desc {
-       struct list_head tx_list;
-       struct sh_dmae_regs hw;
-       struct list_head node;
-       struct dma_async_tx_descriptor async_tx;
-       int mark;
-};
+struct device;
 
 struct sh_dmae_chan {
        dma_cookie_t completed_cookie;  /* The maximum cookie completed */
@@ -42,19 +32,19 @@ struct sh_dmae_chan {
        struct device *dev;             /* Channel device */
        struct tasklet_struct tasklet;  /* Tasklet */
        int descs_allocated;            /* desc count */
+       int xmit_shift;                 /* log_2(bytes_per_xfer) */
+       int irq;
        int id;                         /* Raw id of this channel */
+       u32 __iomem *base;
        char dev_id[16];                /* unique name per DMAC of channel */
-
-       /* Set chcr */
-       int (*set_chcr)(struct sh_dmae_chan *sh_chan, u32 regs);
-       /* Set DMA resource */
-       int (*set_dmars)(struct sh_dmae_chan *sh_chan, u16 res);
 };
 
 struct sh_dmae_device {
        struct dma_device common;
-       struct sh_dmae_chan *chan[MAX_DMA_CHANNELS];
-       struct sh_dmae_pdata pdata;
+       struct sh_dmae_chan *chan[SH_DMAC_MAX_CHANNELS];
+       struct sh_dmae_pdata *pdata;
+       u32 __iomem *chan_reg;
+       u16 __iomem *dmars;
 };
 
 #define to_sh_chan(chan) container_of(chan, struct sh_dmae_chan, common)