[PATCH v2 2/7] atmel_mci: check for device id we use to address the right slot

Michael Grzeschik m.grzeschik at pengutronix.de
Fri Dec 9 06:28:12 EST 2011


We have to check which sd card slot we use. The registered mmc_id is the
the correct parameter for this.

Signed-off-by: Michael Grzeschik <m.grzeschik at pengutronix.de>
---
- removed if condition and always write the hw_dev->id instead

 drivers/mci/atmel_mci.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/mci/atmel_mci.c b/drivers/mci/atmel_mci.c
index 4a29cad..15668fc 100644
--- a/drivers/mci/atmel_mci.c
+++ b/drivers/mci/atmel_mci.c
@@ -369,6 +369,8 @@ static void mci_set_ios(struct mci_host *mci, struct device_d *mci_dev,
 		atmel_mci_writel(host, AT91_MCI_SDCR, AT91_MCI_SDCBUS_1BIT);
 		break;
 	}
+	atmel_mci_writel(host, AT91_MCI_SDCR, atmel_mci_readl(host, AT91_MCI_SDCR)
+		| host->hw_dev->id);
 
 	if (clock) {
 		atmel_set_clk_rate(host, clock);
-- 
1.7.7.3





More information about the barebox mailing list