aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core
diff options
context:
space:
mode:
authorBernie Thompson <bhthompson@chromium.org>2013-02-27 15:19:17 -0500
committerChris Ball <cjb@laptop.org>2013-03-22 12:10:42 -0400
commit51e7e8b632d8e564ba494dfa61358ac1a97e4ceb (patch)
tree39af1c9f7d5811d74f2c4cdecaace84137654704 /drivers/mmc/core
parente3e020f8acbd39a6feb1b6903725aaf658b0fec4 (diff)
mmc: core: Add in support to expose PRV for v4 MMCs
The JEDEC MMC v4 spec defines a new PRV value in place of the original fwrev and hwrev specified in v1. We can expose this in the kernel to enable user space to more easily determine the product revision of a given MMC. Signed-off-by: Bernie Thompson <bhthompson@chromium.org> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/core')
-rw-r--r--drivers/mmc/core/mmc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index c8f3d6e0684e..d584f7ca168c 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -96,6 +96,7 @@ static int mmc_decode_cid(struct mmc_card *card)
96 card->cid.prod_name[3] = UNSTUFF_BITS(resp, 72, 8); 96 card->cid.prod_name[3] = UNSTUFF_BITS(resp, 72, 8);
97 card->cid.prod_name[4] = UNSTUFF_BITS(resp, 64, 8); 97 card->cid.prod_name[4] = UNSTUFF_BITS(resp, 64, 8);
98 card->cid.prod_name[5] = UNSTUFF_BITS(resp, 56, 8); 98 card->cid.prod_name[5] = UNSTUFF_BITS(resp, 56, 8);
99 card->cid.prv = UNSTUFF_BITS(resp, 48, 8);
99 card->cid.serial = UNSTUFF_BITS(resp, 16, 32); 100 card->cid.serial = UNSTUFF_BITS(resp, 16, 32);
100 card->cid.month = UNSTUFF_BITS(resp, 12, 4); 101 card->cid.month = UNSTUFF_BITS(resp, 12, 4);
101 card->cid.year = UNSTUFF_BITS(resp, 8, 4) + 1997; 102 card->cid.year = UNSTUFF_BITS(resp, 8, 4) + 1997;
@@ -627,6 +628,7 @@ MMC_DEV_ATTR(hwrev, "0x%x\n", card->cid.hwrev);
627MMC_DEV_ATTR(manfid, "0x%06x\n", card->cid.manfid); 628MMC_DEV_ATTR(manfid, "0x%06x\n", card->cid.manfid);
628MMC_DEV_ATTR(name, "%s\n", card->cid.prod_name); 629MMC_DEV_ATTR(name, "%s\n", card->cid.prod_name);
629MMC_DEV_ATTR(oemid, "0x%04x\n", card->cid.oemid); 630MMC_DEV_ATTR(oemid, "0x%04x\n", card->cid.oemid);
631MMC_DEV_ATTR(prv, "0x%x\n", card->cid.prv);
630MMC_DEV_ATTR(serial, "0x%08x\n", card->cid.serial); 632MMC_DEV_ATTR(serial, "0x%08x\n", card->cid.serial);
631MMC_DEV_ATTR(enhanced_area_offset, "%llu\n", 633MMC_DEV_ATTR(enhanced_area_offset, "%llu\n",
632 card->ext_csd.enhanced_area_offset); 634 card->ext_csd.enhanced_area_offset);
@@ -645,6 +647,7 @@ static struct attribute *mmc_std_attrs[] = {
645 &dev_attr_manfid.attr, 647 &dev_attr_manfid.attr,
646 &dev_attr_name.attr, 648 &dev_attr_name.attr,
647 &dev_attr_oemid.attr, 649 &dev_attr_oemid.attr,
650 &dev_attr_prv.attr,
648 &dev_attr_serial.attr, 651 &dev_attr_serial.attr,
649 &dev_attr_enhanced_area_offset.attr, 652 &dev_attr_enhanced_area_offset.attr,
650 &dev_attr_enhanced_area_size.attr, 653 &dev_attr_enhanced_area_size.attr,