2008-11-20 15:59:12 +01:00
|
|
|
#ifndef __LINUX_ATMEL_MCI_H
|
|
|
|
|
#define __LINUX_ATMEL_MCI_H
|
2008-06-30 18:35:03 +02:00
|
|
|
|
2014-08-07 15:14:06 +02:00
|
|
|
#include <linux/types.h>
|
|
|
|
|
|
2011-08-11 15:25:41 +00:00
|
|
|
#define ATMCI_MAX_NR_SLOTS 2
|
2008-09-17 20:53:55 +02:00
|
|
|
|
2008-08-07 14:08:49 +02:00
|
|
|
/**
|
|
|
|
|
* struct mci_slot_pdata - board-specific per-slot configuration
|
|
|
|
|
* @bus_width: Number of data lines wired up the slot
|
|
|
|
|
* @detect_pin: GPIO pin wired to the card detect switch
|
|
|
|
|
* @wp_pin: GPIO pin wired to the write protect sensor
|
2009-03-31 11:16:48 +02:00
|
|
|
* @detect_is_active_high: The state of the detect pin when it is active
|
2014-11-03 13:12:59 +02:00
|
|
|
* @non_removable: The slot is not removable, only detect once
|
2008-08-07 14:08:49 +02:00
|
|
|
*
|
|
|
|
|
* If a given slot is not present on the board, @bus_width should be
|
|
|
|
|
* set to 0. The other fields are ignored in this case.
|
|
|
|
|
*
|
|
|
|
|
* Any pins that aren't available should be set to a negative value.
|
2008-09-17 20:53:55 +02:00
|
|
|
*
|
|
|
|
|
* Note that support for multiple slots is experimental -- some cards
|
|
|
|
|
* might get upset if we don't get the clock management exactly right.
|
|
|
|
|
* But in most cases, it should work just fine.
|
2008-08-07 14:08:49 +02:00
|
|
|
*/
|
|
|
|
|
struct mci_slot_pdata {
|
|
|
|
|
unsigned int bus_width;
|
2008-06-30 18:35:03 +02:00
|
|
|
int detect_pin;
|
|
|
|
|
int wp_pin;
|
2009-03-31 11:16:48 +02:00
|
|
|
bool detect_is_active_high;
|
2014-11-03 13:12:59 +02:00
|
|
|
bool non_removable;
|
2008-06-30 18:35:03 +02:00
|
|
|
};
|
|
|
|
|
|
2008-08-07 14:08:49 +02:00
|
|
|
/**
|
|
|
|
|
* struct mci_platform_data - board-specific MMC/SDcard configuration
|
2009-01-06 11:38:16 -07:00
|
|
|
* @dma_slave: DMA slave interface to use in data transfers.
|
2008-08-07 14:08:49 +02:00
|
|
|
* @slot: Per-slot configuration data.
|
|
|
|
|
*/
|
|
|
|
|
struct mci_platform_data {
|
2009-12-14 18:01:30 -08:00
|
|
|
struct mci_dma_data *dma_slave;
|
2011-08-11 15:25:41 +00:00
|
|
|
struct mci_slot_pdata slot[ATMCI_MAX_NR_SLOTS];
|
2008-08-07 14:08:49 +02:00
|
|
|
};
|
|
|
|
|
|
2008-11-20 15:59:12 +01:00
|
|
|
#endif /* __LINUX_ATMEL_MCI_H */
|