diff options
author | Michael Grzeschik <m.grzeschik@pengutronix.de> | 2011-12-06 17:10:13 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-12-07 09:39:12 +0100 |
commit | 0cbda4e76aaa19157b35e50ec15bf3ded54c79ef (patch) | |
tree | 506398c1507fb801b53cc6dcb4e5a69234e3ec46 /arch/arm/mach-at91/at91sam9260_devices.c | |
parent | f60f6c58e24fe0facb77e516b5b4f1acf7c36582 (diff) | |
download | barebox-0cbda4e76aaa19157b35e50ec15bf3ded54c79ef.tar.gz barebox-0cbda4e76aaa19157b35e50ec15bf3ded54c79ef.tar.xz |
at91sam9260_devices: properly set slot id
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-at91/at91sam9260_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9260_devices.c | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index 9d1acda7fe..177f770816 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c @@ -261,18 +261,32 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data) /* CLK */ at91_set_A_periph(AT91_PIN_PA8, 0); - /* CMD */ - at91_set_A_periph(AT91_PIN_PA7, 1); - - /* DAT0, maybe DAT1..DAT3 */ - at91_set_A_periph(AT91_PIN_PA6, 1); - if (data->bus_width == 4) { - at91_set_A_periph(AT91_PIN_PA9, 1); - at91_set_A_periph(AT91_PIN_PA10, 1); - at91_set_A_periph(AT91_PIN_PA11, 1); + + if (mmc_id == 0) { + /* CMD */ + at91_set_A_periph(AT91_PIN_PA7, 1); + + /* DAT0, maybe DAT1..DAT3 */ + at91_set_A_periph(AT91_PIN_PA6, 1); + if (data->bus_width == 4) { + at91_set_A_periph(AT91_PIN_PA9, 1); + at91_set_A_periph(AT91_PIN_PA10, 1); + at91_set_A_periph(AT91_PIN_PA11, 1); + } + } else if (mmc_id == 1) { + /* CMD */ + at91_set_B_periph(AT91_PIN_PA1, 1); + + /* DAT0, maybe DAT1..DAT3 */ + at91_set_B_periph(AT91_PIN_PA0, 1); + if (data->bus_width == 4) { + at91_set_B_periph(AT91_PIN_PA3, 1); + at91_set_B_periph(AT91_PIN_PA4, 1); + at91_set_B_periph(AT91_PIN_PA5, 1); + } } - dev = add_generic_device("atmel_mci", 0, NULL, AT91SAM9260_BASE_MCI, SZ_16K, + dev = add_generic_device("atmel_mci", mmc_id, NULL, AT91SAM9260_BASE_MCI, SZ_16K, IORESOURCE_MEM, data); } #else |