From 4e326e29faf173d0e05e59e37d53d3dd03f9ce68 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Fri, 28 Nov 2008 10:16:40 +0000 Subject: [PATCH] qi-fix-always-slow-glamo-mmc-init.patch Little bugfix that we never exit the mmc init wait loop before the timeout expires. Signed-off-by: Andy Green --- qiboot/src/drivers/glamo-mmc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qiboot/src/drivers/glamo-mmc.c b/qiboot/src/drivers/glamo-mmc.c index a031d0b..4df2ec6 100644 --- a/qiboot/src/drivers/glamo-mmc.c +++ b/qiboot/src/drivers/glamo-mmc.c @@ -673,16 +673,18 @@ int mmc_init(int verbose) if (resp) continue; - if (response[3] & (1 << 6)) /* asserts block addressing */ + if (response[3] & (1 << 6)) { /* asserts block addressing */ + retries = -2; card_type = CARDTYPE_SDHC; - + } if (response[3] & (1 << 7)) { /* not busy */ if (card_type == CARDTYPE_NONE) card_type = CARDTYPE_SD; + retries = -2; break; } } - if (retries < 0) { + if (retries == -1) { puts("no response\n"); return 1; }