mirror of https://gitee.com/openkylin/linux.git
mmc: core: use defined R1_STATE_PRG macro for card status
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
This commit is contained in:
parent
65be3fef93
commit
7435bb7950
|
@ -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,
|
||||||
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,
|
||||||
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)
|
||||||
|
|
Loading…
Reference in New Issue