summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Gabbasov <andrew_gabbasov@mentor.com>2014-04-03 04:34:32 -0500
committerPantelis Antoniou <panto@antoniou-consulting.com>2014-05-23 11:34:33 +0300
commit6b2221b008e0ea66de5befab38515e1a38c74d4f (patch)
treed318147bba7167738a8b1293c91a9d5c665e09a9 /include
parentd803fea576c0b9caf2ece1ea1fac0550d3508a4d (diff)
downloadu-boot-imx-6b2221b008e0ea66de5befab38515e1a38c74d4f.zip
u-boot-imx-6b2221b008e0ea66de5befab38515e1a38c74d4f.tar.gz
u-boot-imx-6b2221b008e0ea66de5befab38515e1a38c74d4f.tar.bz2
mmc: Handle switch error status bit in MMC card status
MMC switch command for unsupported feature (e.g. bus width) sets a switch error bit in card status. This bit should be checked, and, if it's set, no access with new controller settings should be performed. Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Diffstat (limited to 'include')
-rw-r--r--include/mmc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/mmc.h b/include/mmc.h
index bc11f45..9143efe 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -54,6 +54,7 @@
#define COMM_ERR -18 /* Communications Error */
#define TIMEOUT -19
#define IN_PROGRESS -20 /* operation is in progress */
+#define SWITCH_ERR -21 /* Card reports failure to switch mode */
#define MMC_CMD_GO_IDLE_STATE 0
#define MMC_CMD_SEND_OP_COND 1
@@ -109,6 +110,7 @@
#define SECURE_ERASE 0x80000000
#define MMC_STATUS_MASK (~0x0206BF7F)
+#define MMC_STATUS_SWITCH_ERROR (1 << 7)
#define MMC_STATUS_RDY_FOR_DATA (1 << 8)
#define MMC_STATUS_CURR_STATE (0xf << 9)
#define MMC_STATUS_ERROR (1 << 19)