diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2015-05-07 13:10:17 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-06-01 09:06:55 +0200 |
commit | 66073d8671c41fb0bc8c6e36531b4eafb70c990e (patch) | |
tree | 2dc0e4c4375a67a052471c9bd2a04e720f9043f1 /drivers/mmc/core/core.c | |
parent | 8f11d1064e01e1c8bf33ffef86072c2cb0c05b8c (diff) |
mmc: core: Hold re-tuning while bkops ongoing
Hold re-tuning during bkops to prevent
it from conflicting with the busy state.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core/core.c')
-rw-r--r-- | drivers/mmc/core/core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index ff1e38400dc5..adb64087a28a 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -318,12 +318,15 @@ void mmc_start_bkops(struct mmc_card *card, bool from_exception) use_busy_signal = false; } + mmc_retune_hold(card->host); + err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BKOPS_START, 1, timeout, use_busy_signal, true, false); if (err) { pr_warn("%s: Error %d starting bkops\n", mmc_hostname(card->host), err); + mmc_retune_release(card->host); goto out; } @@ -334,6 +337,8 @@ void mmc_start_bkops(struct mmc_card *card, bool from_exception) */ if (!use_busy_signal) mmc_card_set_doing_bkops(card); + else + mmc_retune_release(card->host); out: mmc_release_host(card->host); } @@ -749,6 +754,7 @@ int mmc_stop_bkops(struct mmc_card *card) */ if (!err || (err == -EINVAL)) { mmc_card_clr_doing_bkops(card); + mmc_retune_release(card->host); err = 0; } |