From 5d4fc8d907ed12844b9c9190601fef2919f3ec25 Mon Sep 17 00:00:00 2001 From: Raffaele Recalcati Date: Fri, 11 Mar 2011 02:01:12 +0000 Subject: mmc: checking status after commands with R1b response It is recommended to check card status after these kind of commands. This is done using CMD13 (SEND_STATUS) JEDEC command until the card is ready. In case of error the card status field is displayed. Signed-off-by: Raffaele Recalcati Signed-off-by: Andy Fleming --- include/mmc.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/mmc.h') diff --git a/include/mmc.h b/include/mmc.h index 2cf489f4b..ed084c814 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -97,6 +97,10 @@ #define OCR_BUSY 0x80000000 #define OCR_HCS 0x40000000 +#define MMC_STATUS_MASK (~0x0206BF7F) +#define MMC_STATUS_RDY_FOR_DATA (1<<8) +#define MMC_STATUS_CURR_STATE (0xf<<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.2.3