blob: 3e09b345f4d675ffddcab95e6d6b72039d141237 [file] [log] [blame]
Nicolas Ferrec42aa772008-11-20 15:59:12 +01001#ifndef __LINUX_ATMEL_MCI_H
2#define __LINUX_ATMEL_MCI_H
Haavard Skinnemoen7d2be072008-06-30 18:35:03 +02003
Haavard Skinnemoen965ebf32008-09-17 20:53:55 +02004#define ATMEL_MCI_MAX_NR_SLOTS 2
5
Haavard Skinnemoen6b918652008-08-07 14:08:49 +02006/**
7 * struct mci_slot_pdata - board-specific per-slot configuration
8 * @bus_width: Number of data lines wired up the slot
9 * @detect_pin: GPIO pin wired to the card detect switch
10 * @wp_pin: GPIO pin wired to the write protect sensor
Jonas Larsson1c1452b2009-03-31 11:16:48 +020011 * @detect_is_active_high: The state of the detect pin when it is active
Haavard Skinnemoen6b918652008-08-07 14:08:49 +020012 *
13 * If a given slot is not present on the board, @bus_width should be
14 * set to 0. The other fields are ignored in this case.
15 *
16 * Any pins that aren't available should be set to a negative value.
Haavard Skinnemoen965ebf32008-09-17 20:53:55 +020017 *
18 * Note that support for multiple slots is experimental -- some cards
19 * might get upset if we don't get the clock management exactly right.
20 * But in most cases, it should work just fine.
Haavard Skinnemoen6b918652008-08-07 14:08:49 +020021 */
22struct mci_slot_pdata {
23 unsigned int bus_width;
Haavard Skinnemoen7d2be072008-06-30 18:35:03 +020024 int detect_pin;
25 int wp_pin;
Jonas Larsson1c1452b2009-03-31 11:16:48 +020026 bool detect_is_active_high;
Haavard Skinnemoen7d2be072008-06-30 18:35:03 +020027};
28
Haavard Skinnemoen6b918652008-08-07 14:08:49 +020029/**
30 * struct mci_platform_data - board-specific MMC/SDcard configuration
Dan Williams74465b42009-01-06 11:38:16 -070031 * @dma_slave: DMA slave interface to use in data transfers.
Haavard Skinnemoen6b918652008-08-07 14:08:49 +020032 * @slot: Per-slot configuration data.
33 */
34struct mci_platform_data {
Nicolas Ferre2635d1b2009-12-14 18:01:30 -080035 struct mci_dma_data *dma_slave;
Haavard Skinnemoen965ebf32008-09-17 20:53:55 +020036 struct mci_slot_pdata slot[ATMEL_MCI_MAX_NR_SLOTS];
Haavard Skinnemoen6b918652008-08-07 14:08:49 +020037};
38
Nicolas Ferrec42aa772008-11-20 15:59:12 +010039#endif /* __LINUX_ATMEL_MCI_H */