diff options
author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-08-07 08:08:49 -0400 |
---|---|---|
committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-10-05 14:39:21 -0400 |
commit | 6b918657b7431e4c5c953b8222ae2f4fc1b2576a (patch) | |
tree | bb3bb53d91501064821ea860a490dc1b3633df52 /arch/avr32/include/asm/atmel-mci.h | |
parent | 945533b538c6c6185afc77ba4a81eeba8f6ef8dd (diff) |
atmel-mci: Platform code for supporting multiple mmc slots
Add the necessary platform infrastructure to support multiple mmc/sdcard
slots all at once through a single controller. Currently, the driver
will use the first valid slot it finds and stick with that, but later
patches will add support for switching between several slots on the fly.
Extend the platform data structure with per-slot information: MMC/SDcard
bus width and card detect/write protect pins. This will affect the pin
muxing as well as the capabilities announced to the mmc core.
Note that board code is now required to supply a mci_platform_data
struct to at32_add_device_mci().
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Diffstat (limited to 'arch/avr32/include/asm/atmel-mci.h')
-rw-r--r-- | arch/avr32/include/asm/atmel-mci.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/arch/avr32/include/asm/atmel-mci.h b/arch/avr32/include/asm/atmel-mci.h index c2ea6e1c9aa1..d38c64ca41e8 100644 --- a/arch/avr32/include/asm/atmel-mci.h +++ b/arch/avr32/include/asm/atmel-mci.h | |||
@@ -1,9 +1,29 @@ | |||
1 | #ifndef __ASM_AVR32_ATMEL_MCI_H | 1 | #ifndef __ASM_AVR32_ATMEL_MCI_H |
2 | #define __ASM_AVR32_ATMEL_MCI_H | 2 | #define __ASM_AVR32_ATMEL_MCI_H |
3 | 3 | ||
4 | struct mci_platform_data { | 4 | /** |
5 | * struct mci_slot_pdata - board-specific per-slot configuration | ||
6 | * @bus_width: Number of data lines wired up the slot | ||
7 | * @detect_pin: GPIO pin wired to the card detect switch | ||
8 | * @wp_pin: GPIO pin wired to the write protect sensor | ||
9 | * | ||
10 | * If a given slot is not present on the board, @bus_width should be | ||
11 | * set to 0. The other fields are ignored in this case. | ||
12 | * | ||
13 | * Any pins that aren't available should be set to a negative value. | ||
14 | */ | ||
15 | struct mci_slot_pdata { | ||
16 | unsigned int bus_width; | ||
5 | int detect_pin; | 17 | int detect_pin; |
6 | int wp_pin; | 18 | int wp_pin; |
7 | }; | 19 | }; |
8 | 20 | ||
21 | /** | ||
22 | * struct mci_platform_data - board-specific MMC/SDcard configuration | ||
23 | * @slot: Per-slot configuration data. | ||
24 | */ | ||
25 | struct mci_platform_data { | ||
26 | struct mci_slot_pdata slot[2]; | ||
27 | }; | ||
28 | |||
9 | #endif /* __ASM_AVR32_ATMEL_MCI_H */ | 29 | #endif /* __ASM_AVR32_ATMEL_MCI_H */ |