Commit 7435bb79 authored by Jaehoon Chung's avatar Jaehoon Chung Committed by Chris Ball

mmc: core: use defined R1_STATE_PRG macro for card status

Signed-off-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 65be3fef
...@@ -224,7 +224,7 @@ static void mmc_test_prepare_mrq(struct mmc_test_card *test, ...@@ -224,7 +224,7 @@ static void mmc_test_prepare_mrq(struct mmc_test_card *test,
static int mmc_test_busy(struct mmc_command *cmd) static int mmc_test_busy(struct mmc_command *cmd)
{ {
return !(cmd->resp[0] & R1_READY_FOR_DATA) || return !(cmd->resp[0] & R1_READY_FOR_DATA) ||
(R1_CURRENT_STATE(cmd->resp[0]) == 7); (R1_CURRENT_STATE(cmd->resp[0]) == R1_STATE_PRG);
} }
/* /*
......
...@@ -1502,7 +1502,7 @@ static int mmc_do_erase(struct mmc_card *card, unsigned int from, ...@@ -1502,7 +1502,7 @@ static int mmc_do_erase(struct mmc_card *card, unsigned int from,
goto out; goto out;
} }
} while (!(cmd.resp[0] & R1_READY_FOR_DATA) || } while (!(cmd.resp[0] & R1_READY_FOR_DATA) ||
R1_CURRENT_STATE(cmd.resp[0]) == 7); R1_CURRENT_STATE(cmd.resp[0]) == R1_STATE_PRG);
out: out:
return err; return err;
} }
......
...@@ -407,7 +407,7 @@ int mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value, ...@@ -407,7 +407,7 @@ int mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,
break; break;
if (mmc_host_is_spi(card->host)) if (mmc_host_is_spi(card->host))
break; break;
} while (R1_CURRENT_STATE(status) == 7); } while (R1_CURRENT_STATE(status) == R1_STATE_PRG);
if (mmc_host_is_spi(card->host)) { if (mmc_host_is_spi(card->host)) {
if (status & R1_SPI_ILLEGAL_COMMAND) if (status & R1_SPI_ILLEGAL_COMMAND)
......
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