mirror of
https://github.com/torvalds/linux.git
synced 2024-11-19 10:31:48 +00:00
2635d1ba71
Allow the use of another DMA controller driver in atmel-mci sd/mmc driver. This adds a generic dma_slave pointer to the mci platform structure where we can store DMA controller information. In atmel-mci we use information provided by this structure to initialize the driver (with new helper functions that are architecture dependant). This also adds at32/avr32 chip modifications to cope with this new access method. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
25 lines
474 B
C
25 lines
474 B
C
#ifndef __MACH_ATMEL_MCI_H
|
|
#define __MACH_ATMEL_MCI_H
|
|
|
|
#include <mach/at_hdmac.h>
|
|
|
|
/**
|
|
* struct mci_dma_data - DMA data for MCI interface
|
|
*/
|
|
struct mci_dma_data {
|
|
struct at_dma_slave sdata;
|
|
};
|
|
|
|
/* accessor macros */
|
|
#define slave_data_ptr(s) (&(s)->sdata)
|
|
#define find_slave_dev(s) ((s)->sdata.dma_dev)
|
|
|
|
#define setup_dma_addr(s, t, r) do { \
|
|
if (s) { \
|
|
(s)->sdata.tx_reg = (t); \
|
|
(s)->sdata.rx_reg = (r); \
|
|
} \
|
|
} while (0)
|
|
|
|
#endif /* __MACH_ATMEL_MCI_H */
|