aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/mmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/core/mmc.c')
-rw-r--r--drivers/mmc/core/mmc.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 53f0e21..81a77a8 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -118,6 +118,10 @@ static int mmc_decode_cid(struct mmc_card *card)
return -EINVAL;
}
+ pr_info("%s: %s: %08x%08x%08x%08x\n", mmc_hostname(card->host),
+ card->cid.prod_name,
+ card->raw_cid[0], card->raw_cid[1],
+ card->raw_cid[2], card->raw_cid[3]);
return 0;
}
@@ -350,7 +354,11 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
}
card->ext_csd.rev = ext_csd[EXT_CSD_REV];
- if (card->ext_csd.rev > 6) {
+ /* eMMC 4.5 : ext_csd rev. is 6
+ * eMMC 5.0 : ext_csd rev. is 7
+ * It's temporary change.
+ */
+ if (card->ext_csd.rev > 7) {
printk(KERN_ERR "%s: unrecognised EXT_CSD revision %d\n",
mmc_hostname(card->host), card->ext_csd.rev);
err = -EINVAL;
@@ -571,8 +579,10 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
}
if (card->ext_csd.rev >= 5) {
- /* enable discard feature if emmc is 4.41 */
- card->ext_csd.feature_support |= MMC_DISCARD_FEATURE;
+ /* enable discard feature if emmc is 4.41+ */
+ if ((ext_csd[EXT_CSD_VENDOR_SPECIFIC_FIELD + 0] & 0x1) &&
+ (card->cid.manfid == 0x15))
+ card->ext_csd.feature_support |= MMC_DISCARD_FEATURE;
/* check whether the eMMC card supports HPI */
if (ext_csd[EXT_CSD_HPI_FEATURES] & 0x1) {