Commit ad89fcb2 authored by Johan Rudholm's avatar Johan Rudholm Committed by Ulf Hansson

mmc: core: use mmc_send_status to check hw_reset

Signed-off-by: default avatarJohan Rudholm <johanru@axis.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent cd0cfdd2
...@@ -2270,15 +2270,9 @@ static int mmc_do_hw_reset(struct mmc_host *host, int check) ...@@ -2270,15 +2270,9 @@ static int mmc_do_hw_reset(struct mmc_host *host, int check)
/* If the reset has happened, then a status command will fail */ /* If the reset has happened, then a status command will fail */
if (check) { if (check) {
struct mmc_command cmd = {0}; u32 status;
int err;
cmd.opcode = MMC_SEND_STATUS; if (!mmc_send_status(card, &status)) {
if (!mmc_host_is_spi(card->host))
cmd.arg = card->rca << 16;
cmd.flags = MMC_RSP_SPI_R2 | MMC_RSP_R1 | MMC_CMD_AC;
err = mmc_wait_for_cmd(card->host, &cmd, 0);
if (!err) {
mmc_host_clk_release(host); mmc_host_clk_release(host);
return -ENOSYS; return -ENOSYS;
} }
......
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