Hi, Andy Green <[email protected]> writes: > | anyway, IMO raising the retries value is better than raising the delay. > | This lowers the average time this thing loops. > | What about udelay(10000) and retries * 600? > > Sounds fine, I'm hoping Paul will send a second patch along these lines > otherwise I'll take care of it.
It should be retries * 60, actually. Patch attached. Andy, could you please clarify how exactly the AUX button must be pressed to append logverbose=8 (in my other letter i mentioned that i was able to do it twice or so, but it's really hard to guess the right timing).
>From 795de7df85e72f84fecc4ae12222897a3c3a9dfc Mon Sep 17 00:00:00 2001 From: Paul Fertser <[email protected]> Date: Sat, 13 Dec 2008 23:16:51 +0300 Subject: [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). --- src/drivers/glamo-mmc.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/drivers/glamo-mmc.c b/src/drivers/glamo-mmc.c index be6b6e2..8f649d1 100644 --- a/src/drivers/glamo-mmc.c +++ b/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, -- 1.5.2.2
-- Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software! mailto:[email protected]
