Commit 8f11d106 authored by Adrian Hunter's avatar Adrian Hunter Committed by Ulf Hansson

mmc: core: Hold re-tuning during erase commands

Hold re-tuning during erase commands to prevent
it from conflicting with the sequence of commands.
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent c6dbab9c
...@@ -1995,6 +1995,8 @@ static int mmc_do_erase(struct mmc_card *card, unsigned int from, ...@@ -1995,6 +1995,8 @@ static int mmc_do_erase(struct mmc_card *card, unsigned int from,
unsigned long timeout; unsigned long timeout;
int err; int err;
mmc_retune_hold(card->host);
/* /*
* qty is used to calculate the erase timeout which depends on how many * qty is used to calculate the erase timeout which depends on how many
* erase groups (or allocation units in SD terminology) are affected. * erase groups (or allocation units in SD terminology) are affected.
...@@ -2098,6 +2100,7 @@ static int mmc_do_erase(struct mmc_card *card, unsigned int from, ...@@ -2098,6 +2100,7 @@ static int mmc_do_erase(struct mmc_card *card, unsigned int from,
} while (!(cmd.resp[0] & R1_READY_FOR_DATA) || } while (!(cmd.resp[0] & R1_READY_FOR_DATA) ||
(R1_CURRENT_STATE(cmd.resp[0]) == R1_STATE_PRG)); (R1_CURRENT_STATE(cmd.resp[0]) == R1_STATE_PRG));
out: out:
mmc_retune_release(card->host);
return err; return err;
} }
......
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