Merge branch 'devel'
[sfrench/cifs-2.6.git] / arch / blackfin / include / asm / dma.h
index 264feb4eb175aec957cc106334a9ef1b3224725a..e4f7b8043f025335d4acf2f2dc95c37e58d16ca4 100644 (file)
@@ -109,13 +109,10 @@ struct dma_channel {
        struct mutex dmalock;
        const char *device_id;
        enum dma_chan_status chan_status;
-       struct dma_register *regs;
+       volatile struct dma_register *regs;
        struct dmasg *sg;               /* large mode descriptor */
-       unsigned int ctrl_num;  /* controller number */
        unsigned int irq;
        void *data;
-       unsigned int dma_enable_flag;
-       unsigned int loopback_flag;
 #ifdef CONFIG_PM
        unsigned short saved_peripheral_map;
 #endif
@@ -198,6 +195,10 @@ static inline void *get_dma_curr_desc_ptr(unsigned int channel)
 {
        return dma_ch[channel].regs->curr_desc_ptr;
 }
+static inline unsigned short get_dma_config(unsigned int channel)
+{
+       return dma_ch[channel].regs->cfg;
+}
 static inline unsigned long get_dma_curr_addr(unsigned int channel)
 {
        return dma_ch[channel].regs->curr_addr_ptr;
@@ -205,7 +206,9 @@ static inline unsigned long get_dma_curr_addr(unsigned int channel)
 
 static inline void set_dma_sg(unsigned int channel, struct dmasg *sg, int ndsize)
 {
-       dma_ch[channel].regs->cfg |= ((ndsize & 0x0F) << 8);
+       dma_ch[channel].regs->cfg =
+               (dma_ch[channel].regs->cfg & ~(0xf << 8)) |
+               ((ndsize & 0xf) << 8);
        dma_ch[channel].regs->next_desc_ptr = sg;
 }