Commit 2a82a9c9 authored by Jun Nie's avatar Jun Nie Committed by Bryan O'Donoghue
Browse files

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: default avatarJun Nie <jun.nie@linaro.org>
Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
parent e67606cf
...@@ -259,11 +259,14 @@ static int dw_send_cmd(struct mmc_cmd *cmd) ...@@ -259,11 +259,14 @@ static int dw_send_cmd(struct mmc_cmd *cmd)
switch (cmd->resp_type) { switch (cmd->resp_type) {
case 0: case 0:
break; break;
case MMC_RESPONSE_R(2): case MMC_RESPONSE_R2:
op |= CMD_RESP_EXPECT | CMD_CHECK_RESP_CRC | op |= CMD_RESP_EXPECT | CMD_CHECK_RESP_CRC |
CMD_RESP_LEN; CMD_RESP_LEN;
break; break;
case MMC_RESPONSE_R(3): case MMC_RESPONSE_R1:
case MMC_RESPONSE_R1B:
case MMC_RESPONSE_R3:
case MMC_RESPONSE_R5:
op |= CMD_RESP_EXPECT; op |= CMD_RESP_EXPECT;
break; break;
default: default:
......
...@@ -36,6 +36,20 @@ ...@@ -36,6 +36,20 @@
#define OCR_VDD_MIN_2V0 GENMASK(14, 8) #define OCR_VDD_MIN_2V0 GENMASK(14, 8)
#define OCR_VDD_MIN_1V7 BIT(7) #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) #define MMC_RESPONSE_R(_x) U(_x)
/* Value randomly chosen for eMMC RCA, it should be > 1 */ /* Value randomly chosen for eMMC RCA, it should be > 1 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment