atmel-mci: change use of dma slave interface
[linux-2.6.git] / arch / avr32 / mach-at32ap / include / mach / atmel-mci.h
1 #ifndef __MACH_ATMEL_MCI_H
2 #define __MACH_ATMEL_MCI_H
3
4 #include <linux/dw_dmac.h>
5
6 /**
7  * struct mci_dma_data - DMA data for MCI interface
8  */
9 struct mci_dma_data {
10         struct dw_dma_slave     sdata;
11 };
12
13 /* accessor macros */
14 #define slave_data_ptr(s)       (&(s)->sdata)
15 #define find_slave_dev(s)       ((s)->sdata.dma_dev)
16
17 #define setup_dma_addr(s, t, r) do {            \
18         if (s) {                                \
19                 (s)->sdata.tx_reg = (t);        \
20                 (s)->sdata.rx_reg = (r);        \
21         }                                       \
22 } while (0)
23
24 #endif /* __MACH_ATMEL_MCI_H */