From d617c426a6ef8d731da1936bca7649a1574d5420 Mon Sep 17 00:00:00 2001 From: Jan Kloetzke Date: Sun, 5 Feb 2012 22:29:12 +0000 Subject: mmc: make mmc_send_status() more reliable Align the card status polling with the Linux kernel and retry the command at least five times. Also some cards apparently mishandle the status bits, so make sure to check the card state too. Signed-off-by: Jan Kloetzke Cc: Andy Fleming --- include/mmc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/mmc.h') diff --git a/include/mmc.h b/include/mmc.h index 8744604..30c2375 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -112,6 +112,8 @@ #define MMC_STATUS_CURR_STATE (0xf << 9) #define MMC_STATUS_ERROR (1 << 19) +#define MMC_STATE_PRG (7 << 9) + #define MMC_VDD_165_195 0x00000080 /* VDD voltage 1.65 - 1.95 */ #define MMC_VDD_20_21 0x00000100 /* VDD voltage 2.0 ~ 2.1 */ #define MMC_VDD_21_22 0x00000200 /* VDD voltage 2.1 ~ 2.2 */ -- cgit v1.1