diff options
author | Naveen Kumar Arepalli <naveenk@nvidia.com> | 2012-12-18 14:40:58 +0530 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2012-12-19 13:41:56 -0800 |
commit | 7ccbc35579301d98dee48b91adceed26445e6f39 (patch) | |
tree | 03d67765c52c2a3d0c54f6a604c44e1681bc6b6c | |
parent | 4de2cc7c70ab9cd4f2790901b0535ffbd67f80da (diff) |
mmc: core: enable ext_csd raw fields for eMMC4.5
ext_csd raw filds(erase, trim, sec feature) are used for
only comparison. eMMC 4.5 will run in 1 bit mode if this
check is not removed.
Bug 1199265
Change-Id: I0d3d3e457dd48f7e2ba7aa3e95c68a4afe0dd2b1
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/172225
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
-rw-r--r-- | drivers/mmc/core/mmc.c | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index ddd384815f2c..0d6487d6fe6b 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -379,29 +379,12 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd) card->ext_csd.raw_hc_erase_gap_size = ext_csd[EXT_CSD_HC_WP_GRP_SIZE]; - - /* - * Secure erase feature is deprecated in eMMC v4.5 specification. - * So, use this feature only for eMMC v4.41 or lower version cards - * In eMMC v4.5 secure feature support register, the Bit:0 is reserved, - * and Bit:6 is secure sanitize support, clearing these two bits in - * eMMC v4.5 cards as they set by default. - */ - if (card->ext_csd.rev < 6) { - card->ext_csd.raw_sec_trim_mult = - ext_csd[EXT_CSD_SEC_TRIM_MULT]; - card->ext_csd.raw_sec_erase_mult = - ext_csd[EXT_CSD_SEC_ERASE_MULT]; - card->ext_csd.raw_sec_feature_support = - ext_csd[EXT_CSD_SEC_FEATURE_SUPPORT]; - } - - else if (card->ext_csd.rev == 6) { - card->ext_csd.raw_sec_feature_support = - ext_csd[EXT_CSD_SEC_FEATURE_SUPPORT] & - ~(EXT_CSD_SEC_ER_EN | EXT_CSD_SEC_SANITIZE); - } - + card->ext_csd.raw_sec_trim_mult = + ext_csd[EXT_CSD_SEC_TRIM_MULT]; + card->ext_csd.raw_sec_erase_mult = + ext_csd[EXT_CSD_SEC_ERASE_MULT]; + card->ext_csd.raw_sec_feature_support = + ext_csd[EXT_CSD_SEC_FEATURE_SUPPORT]; card->ext_csd.raw_trim_mult = ext_csd[EXT_CSD_TRIM_MULT]; |