diff options
author | Alexey Skidanov <alexey.skidanov@sandisk.com> | 2015-01-29 03:49:43 -0500 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-01-29 05:15:12 -0500 |
commit | 0501be6429e4eb02f417ad83eacd84b8c57b0283 (patch) | |
tree | c56a75eb3b4c00bdab0925cb6e72e15e592684d4 /drivers/mmc | |
parent | 14460dbaf7a5a0488963fdb8232ad5c8a8cca7b7 (diff) |
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 <alexey.skidanov@sandisk.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/core.c | 2 | ||||
-rw-r--r-- | drivers/mmc/core/mmc.c | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 1be7055548cb..0dc64e6e00d4 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c | |||
@@ -275,7 +275,7 @@ void mmc_start_bkops(struct mmc_card *card, bool from_exception) | |||
275 | 275 | ||
276 | BUG_ON(!card); | 276 | BUG_ON(!card); |
277 | 277 | ||
278 | if (!card->ext_csd.bkops_en || mmc_card_doing_bkops(card)) | 278 | if (!card->ext_csd.man_bkops_en || mmc_card_doing_bkops(card)) |
279 | return; | 279 | return; |
280 | 280 | ||
281 | err = mmc_read_bkops_status(card); | 281 | err = mmc_read_bkops_status(card); |
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 1fc48a280659..1d41e8541f38 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c | |||
@@ -483,11 +483,13 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd) | |||
483 | /* check whether the eMMC card supports BKOPS */ | 483 | /* check whether the eMMC card supports BKOPS */ |
484 | if (ext_csd[EXT_CSD_BKOPS_SUPPORT] & 0x1) { | 484 | if (ext_csd[EXT_CSD_BKOPS_SUPPORT] & 0x1) { |
485 | card->ext_csd.bkops = 1; | 485 | card->ext_csd.bkops = 1; |
486 | card->ext_csd.bkops_en = ext_csd[EXT_CSD_BKOPS_EN]; | 486 | card->ext_csd.man_bkops_en = |
487 | (ext_csd[EXT_CSD_BKOPS_EN] & | ||
488 | EXT_CSD_MANUAL_BKOPS_MASK); | ||
487 | card->ext_csd.raw_bkops_status = | 489 | card->ext_csd.raw_bkops_status = |
488 | ext_csd[EXT_CSD_BKOPS_STATUS]; | 490 | ext_csd[EXT_CSD_BKOPS_STATUS]; |
489 | if (!card->ext_csd.bkops_en) | 491 | if (!card->ext_csd.man_bkops_en) |
490 | pr_info("%s: BKOPS_EN bit is not set\n", | 492 | pr_info("%s: MAN_BKOPS_EN bit is not set\n", |
491 | mmc_hostname(card->host)); | 493 | mmc_hostname(card->host)); |
492 | } | 494 | } |
493 | 495 | ||