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 /drivers/mci/atmel_mci.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 'drivers/mci/atmel_mci.c')
-rw-r--r-- | drivers/mci/atmel_mci.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mci/atmel_mci.c b/drivers/mci/atmel_mci.c index 15668fc78b..3c37747ff9 100644 --- a/drivers/mci/atmel_mci.c +++ b/drivers/mci/atmel_mci.c @@ -36,6 +36,7 @@ struct atmel_mci_host { u32 datasize; struct mci_cmd *cmd; struct mci_data *data; + unsigned slot_b; }; #define to_mci_host(mci) container_of(mci, struct atmel_mci_host, mci) @@ -370,7 +371,7 @@ static void mci_set_ios(struct mci_host *mci, struct device_d *mci_dev, break; } atmel_mci_writel(host, AT91_MCI_SDCR, atmel_mci_readl(host, AT91_MCI_SDCR) - | host->hw_dev->id); + | host->slot_b); if (clock) { atmel_set_clk_rate(host, clock); @@ -459,6 +460,7 @@ static int mci_probe(struct device_d *hw_dev) host->mci.host_caps |= MMC_MODE_4BIT; if (pd->bus_width == 8) host->mci.host_caps |= MMC_MODE_8BIT; + host->slot_b = pd->slot_b; host->base = dev_request_mem_region(hw_dev, 0); host->hw_dev = hw_dev; |