diff options
-rw-r--r-- | Documentation/mmc/mmc-dev-attrs.txt | 1 | ||||
-rw-r--r-- | drivers/mmc/core/mmc.c | 3 | ||||
-rw-r--r-- | include/linux/mmc/card.h | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/mmc/mmc-dev-attrs.txt b/Documentation/mmc/mmc-dev-attrs.txt index 0d98fac8893b..189bab09255a 100644 --- a/Documentation/mmc/mmc-dev-attrs.txt +++ b/Documentation/mmc/mmc-dev-attrs.txt | |||
@@ -22,6 +22,7 @@ All attributes are read-only. | |||
22 | manfid Manufacturer ID (from CID Register) | 22 | manfid Manufacturer ID (from CID Register) |
23 | name Product Name (from CID Register) | 23 | name Product Name (from CID Register) |
24 | oemid OEM/Application ID (from CID Register) | 24 | oemid OEM/Application ID (from CID Register) |
25 | prv Product Revision (from CID Register) (SD and MMCv4 only) | ||
25 | serial Product Serial Number (from CID Register) | 26 | serial Product Serial Number (from CID Register) |
26 | erase_size Erase group size | 27 | erase_size Erase group size |
27 | preferred_erase_size Preferred erase size | 28 | preferred_erase_size Preferred erase size |
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); | |||
627 | MMC_DEV_ATTR(manfid, "0x%06x\n", card->cid.manfid); | 628 | MMC_DEV_ATTR(manfid, "0x%06x\n", card->cid.manfid); |
628 | MMC_DEV_ATTR(name, "%s\n", card->cid.prod_name); | 629 | MMC_DEV_ATTR(name, "%s\n", card->cid.prod_name); |
629 | MMC_DEV_ATTR(oemid, "0x%04x\n", card->cid.oemid); | 630 | MMC_DEV_ATTR(oemid, "0x%04x\n", card->cid.oemid); |
631 | MMC_DEV_ATTR(prv, "0x%x\n", card->cid.prv); | ||
630 | MMC_DEV_ATTR(serial, "0x%08x\n", card->cid.serial); | 632 | MMC_DEV_ATTR(serial, "0x%08x\n", card->cid.serial); |
631 | MMC_DEV_ATTR(enhanced_area_offset, "%llu\n", | 633 | MMC_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, |
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 61b2c30c903b..f31725ba49f3 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -17,6 +17,7 @@ | |||
17 | struct mmc_cid { | 17 | struct mmc_cid { |
18 | unsigned int manfid; | 18 | unsigned int manfid; |
19 | char prod_name[8]; | 19 | char prod_name[8]; |
20 | unsigned char prv; | ||
20 | unsigned int serial; | 21 | unsigned int serial; |
21 | unsigned short oemid; | 22 | unsigned short oemid; |
22 | unsigned short year; | 23 | unsigned short year; |