Merge "mmc: card: read the firmware version from ext_csd" into msm-4.9
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 91b6001..8060dfd 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -664,6 +664,10 @@
*/
card->ext_csd.strobe_support = ext_csd[EXT_CSD_STROBE_SUPPORT];
card->ext_csd.cmdq_support = ext_csd[EXT_CSD_CMDQ_SUPPORT];
+ card->ext_csd.fw_version = ext_csd[EXT_CSD_FIRMWARE_VERSION];
+ pr_info("%s: eMMC FW version: 0x%02x\n",
+ mmc_hostname(card->host),
+ card->ext_csd.fw_version);
if (card->ext_csd.cmdq_support) {
/*
* Queue Depth = N + 1,
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index f4d76f0..d9518fb 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -138,6 +138,7 @@
u8 barrier_support; /* 486 */
u8 barrier_en;
+ u8 fw_version; /* 254 */
unsigned int feature_support;
#define MMC_DISCARD_FEATURE BIT(0) /* CMD38 feature */
};