mmc: core: Avoid frequent enable/disable of Auto BKOPS

During suspend/resume, the driver writes to AUTOBKOPS_EN bit in
EXT_CSD register of eMMC which is R/W/E. Even after power off
R/W/E bit will retain it's value, as it will be stored in NAND
flash. Multiple writes can wear out the specific NAND block which
store the system data(AUTO BKOPS bit in this case). So to avoid
this, enabling/disabling of autobkops has been removed from
suspend and resume. The background operations, if any, will stop
when sleep command is sent during suspend process.

Change-Id: I8aa7eda86beafacb3337be81c5a7f1f1e86f4998
Signed-off-by: Vijay Viswanath <vviswana@codeaurora.org>
This commit is contained in:
Vijay Viswanath 2016-10-14 09:37:37 +05:30 committed by Gerrit - the friendly Code Review server
parent 6137652043
commit f649debf15

View file

@ -2514,12 +2514,6 @@ static int _mmc_suspend(struct mmc_host *host, bool is_suspend)
goto out;
}
if (mmc_card_doing_auto_bkops(host->card)) {
err = mmc_set_auto_bkops(host->card, false);
if (err)
goto out;
}
err = mmc_flush_cache(host->card);
if (err)
goto out;
@ -2599,9 +2593,6 @@ static int mmc_partial_init(struct mmc_host *host)
pr_debug("%s: %s: reading and comparing ext_csd successful\n",
mmc_hostname(host), __func__);
if (mmc_card_support_auto_bkops(host->card))
(void)mmc_set_auto_bkops(host->card, true);
if (card->ext_csd.cmdq_support && (card->host->caps2 &
MMC_CAP2_CMD_QUEUE)) {
err = mmc_select_cmdq(card);