aboutsummaryrefslogtreecommitdiffstats
path: root/include/drivers
diff options
context:
space:
mode:
authorJun Nie <jun.nie@linaro.org>2018-06-28 16:38:00 +0800
committerBryan O'Donoghue <bryan.odonoghue@linaro.org>2018-09-04 12:35:21 +0100
commit2a82a9c95f6c06079f58d69315544a6b49cf64a4 (patch)
treef000d6b0f0843d83e99f67b3903adb76c296ea35 /include/drivers
parente67606cf8e023de469c011ecb2a18a06d48a66a4 (diff)
downloadplatform_external_arm-trusted-firmware-2a82a9c95f6c06079f58d69315544a6b49cf64a4.tar.gz
platform_external_arm-trusted-firmware-2a82a9c95f6c06079f58d69315544a6b49cf64a4.tar.bz2
platform_external_arm-trusted-firmware-2a82a9c95f6c06079f58d69315544a6b49cf64a4.zip
drivers: emmc: dw_mmc: Add response flag into response ID definition
Add response flag into ID definition so that driver does not need to handle it again. Signed-off-by: Jun Nie <jun.nie@linaro.org> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Diffstat (limited to 'include/drivers')
-rw-r--r--include/drivers/mmc.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/drivers/mmc.h b/include/drivers/mmc.h
index 0a513bd64..50e08001d 100644
--- a/include/drivers/mmc.h
+++ b/include/drivers/mmc.h
@@ -36,6 +36,20 @@
#define OCR_VDD_MIN_2V0 GENMASK(14, 8)
#define OCR_VDD_MIN_1V7 BIT(7)
+#define MMC_RSP_48 BIT(0)
+#define MMC_RSP_136 BIT(1) /* 136 bit response */
+#define MMC_RSP_CRC BIT(2) /* expect valid crc */
+#define MMC_RSP_CMD_IDX BIT(3) /* response contains cmd idx */
+#define MMC_RSP_BUSY BIT(4) /* device may be busy */
+
+/* JEDEC 4.51 chapter 6.12 */
+#define MMC_RESPONSE_R1 (MMC_RSP_48 | MMC_RSP_CMD_IDX | MMC_RSP_CRC)
+#define MMC_RESPONSE_R1B (MMC_RESPONSE_R1 | MMC_RSP_BUSY)
+#define MMC_RESPONSE_R2 (MMC_RSP_136 | MMC_RSP_CRC)
+#define MMC_RESPONSE_R3 (MMC_RSP_48)
+#define MMC_RESPONSE_R4 (MMC_RSP_48)
+#define MMC_RESPONSE_R5 (MMC_RSP_48 | MMC_RSP_CRC)
+
#define MMC_RESPONSE_R(_x) U(_x)
/* Value randomly chosen for eMMC RCA, it should be > 1 */