[PATCH 7/8] qi-fix-always-slow-glamo-mmc-init.patch
Andy Green
andy at openmoko.com
Tue Oct 21 12:42:36 CEST 2008
Little bugfix that we never exit the mmc init wait loop before the timeout
expires.
Signed-off-by: Andy Green <andy at openmoko.com>
---
src/drivers/glamo-mmc.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/drivers/glamo-mmc.c b/src/drivers/glamo-mmc.c
index a031d0b..4df2ec6 100644
--- a/src/drivers/glamo-mmc.c
+++ b/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;
}
More information about the openmoko-kernel
mailing list