diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-01-13 16:55:24 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-01-16 09:33:41 +0100 |
commit | 3874b16997d3c0219a9baab3578ba27ec084282b (patch) | |
tree | a455a6d0564d51df775837312b77556abbd6f7bd /arch/arm/mach-at91/at91sam9260_devices.c | |
parent | e54e3289aa12401927cb8e6184b0550ccd0c7319 (diff) | |
download | barebox-3874b16997d3c0219a9baab3578ba27ec084282b.tar.gz barebox-3874b16997d3c0219a9baab3578ba27ec084282b.tar.xz |
atmel/mci: fix slot_b support
in commit commit f60f6c58e
atmel_mci: check for device id we use to address the right slot
the driver use the dev_id to detect the slot which is wrong on 9263 as we have
2 devices with 2 slots
use slot_b paramter to specify the slot as done in linux
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: 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 | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index 25a68caedd..59dcd7c5cc 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c @@ -298,18 +298,7 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data) at91_set_A_periph(AT91_PIN_PA8, 0); - 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) { + if (data->slot_b) { /* CMD */ at91_set_B_periph(AT91_PIN_PA1, 1); @@ -320,6 +309,17 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data) at91_set_B_periph(AT91_PIN_PA4, 1); at91_set_B_periph(AT91_PIN_PA5, 1); } + } else { + /* 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); + } } dev = add_generic_device("atmel_mci", mmc_id, NULL, AT91SAM9260_BASE_MCI, SZ_16K, |