aboutsummaryrefslogtreecommitdiff
path: root/include/mmc.h
diff options
context:
space:
mode:
authorRaffaele Recalcati <raffaele.recalcati@bticino.it>2011-03-11 02:01:12 +0000
committerAndy Fleming <afleming@freescale.com>2011-04-13 07:08:57 -0500
commit5d4fc8d907ed12844b9c9190601fef2919f3ec25 (patch)
tree20c8c639facdd3ecfbe87d54880b400b68e8981a /include/mmc.h
parent8baf939c2c5e0eb1f3d0cba1067e069e199cbf7f (diff)
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 <raffaele.recalcati@bticino.it> Signed-off-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'include/mmc.h')
-rw-r--r--include/mmc.h4
1 files changed, 4 insertions, 0 deletions
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 */