[U-Boot] [PATCH] mmc: set bus width to 1 and clock to minimum early during initialization

Ilya Yanok yanok at emcraft.com
Mon Jun 29 15:53:16 CEST 2009


We need to switch back to 1-bit before initialization or SD 2.0 cards
will fail to send SCR if we've switched to 4-bit already.

Signed-off-by: Ilya Yanok <yanok at emcraft.com>
---
 drivers/mmc/mmc.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 8c736ce..b69ce15 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -859,6 +859,9 @@ int mmc_init(struct mmc *mmc)
 	if (err)
 		return err;
 
+	mmc_set_bus_width(mmc, 1);
+	mmc_set_clock(mmc, 1);
+
 	/* Reset the Card */
 	err = mmc_go_idle(mmc);
 
-- 
1.6.0.6



More information about the U-Boot mailing list