mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
mmc: Resolve BKOPS compatability issue
This patch is coming to fix compatibility issue of BKOPS_EN field of EXT_CSD. In eMMC-5.1, BKOPS_EN was changed, and now it has two operational bits: Bit 0 - MANUAL_EN Bit 1 - AUTO_EN In previous eMMC revisions, only Bit 0 was supported. Signed-off-by: Alexey Skidanov <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
This commit is contained in:
parent
14460dbaf7
commit
0501be6429
4 changed files with 12 additions and 5 deletions
|
|
@ -275,7 +275,7 @@ void mmc_start_bkops(struct mmc_card *card, bool from_exception)
|
|||
|
||||
BUG_ON(!card);
|
||||
|
||||
if (!card->ext_csd.bkops_en || mmc_card_doing_bkops(card))
|
||||
if (!card->ext_csd.man_bkops_en || mmc_card_doing_bkops(card))
|
||||
return;
|
||||
|
||||
err = mmc_read_bkops_status(card);
|
||||
|
|
|
|||
|
|
@ -483,11 +483,13 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd)
|
|||
/* check whether the eMMC card supports BKOPS */
|
||||
if (ext_csd[EXT_CSD_BKOPS_SUPPORT] & 0x1) {
|
||||
card->ext_csd.bkops = 1;
|
||||
card->ext_csd.bkops_en = ext_csd[EXT_CSD_BKOPS_EN];
|
||||
card->ext_csd.man_bkops_en =
|
||||
(ext_csd[EXT_CSD_BKOPS_EN] &
|
||||
EXT_CSD_MANUAL_BKOPS_MASK);
|
||||
card->ext_csd.raw_bkops_status =
|
||||
ext_csd[EXT_CSD_BKOPS_STATUS];
|
||||
if (!card->ext_csd.bkops_en)
|
||||
pr_info("%s: BKOPS_EN bit is not set\n",
|
||||
if (!card->ext_csd.man_bkops_en)
|
||||
pr_info("%s: MAN_BKOPS_EN bit is not set\n",
|
||||
mmc_hostname(card->host));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue