From 177921a4e6148e85f4a8fdebacafaea66802cef9 Mon Sep 17 00:00:00 2001 From: Paul Fertser Date: Sat, 13 Dec 2008 20:34:46 +0000 Subject: [PATCH] [PATCH] Some SD cards require more retries in mmc_init This patch effectively doubles maximum time allowed for retries performed by mmc_init. Also, the delay was shortened to lower the average time needed to init a card. Without it, i was unable to boot from Transcend TS8GUSDHC4 (appending rootdelay=1 was necessary as well). --- qiboot/src/drivers/glamo-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qiboot/src/drivers/glamo-mmc.c b/qiboot/src/drivers/glamo-mmc.c index be6b6e2..8f649d1 100644 --- a/qiboot/src/drivers/glamo-mmc.c +++ b/qiboot/src/drivers/glamo-mmc.c @@ -609,7 +609,7 @@ static void print_sd_cid(const struct sd_cid *cid) int mmc_init(int verbose) { - int retries = 50, rc = -1; + int retries = 3000, rc = -1; int resp; u8 response[16]; // mmc_cid_t *mmc_cid = (mmc_cid_t *)response; @@ -675,9 +675,7 @@ int mmc_init(int verbose) while (retries--) { - udelay(100000); - udelay(100000); - udelay(100000); + udelay(10000); resp = mmc_cmd(MMC_APP_CMD, 0x00000000, MMC_CMD_AC | MMC_RSP_R1, 0, 0, 0,