mmc: implemented eMMC4.4 enhanced area feature
PATCH v4 1/1 mmc: implemented eMMC4.4 enhanced area feature
Enhanced area feature is a new feature defined in eMMC4.4 standard. This kind of area can help to improve the performance.
MMC driver will read out the enhanced area offset and size and add them to be device attributes. The feature enabling should be done in manufactory. To use this feature, bit ERASE_GRP_DEF should also be set.
Documentation/ABI/testing/sysfs-devices-mmc described the two new attributes
--- Documentation/ABI/testing/sysfs-devices-mmc | 21 +++++++ drivers/mmc/core/mmc.c | 80 +++++++++++++++++++++++++++ include/linux/mmc/card.h | 3 + include/linux/mmc/mmc.h | 3 + 4 files changed, 107 insertions(+), 0 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-devices-mmc
Documentation/ABI/testing/sysfs-devices-mmc new file +21 -0
@@ -0,0 +1,21 @@ +What: /sys/devices/.../mmc_host/mmcX/mmcX:XXXX/enhanced_area_offset +Date: January 2011 +Contact: Chuanxiao Dong <[email protected]> +Description: + Enhanced area is a new feature defined in eMMC4.4 standard. + eMMC4.4 or later card can support such feature. This kind of + area can help to improve the card performance. If the feature is + enabled, this attribute will indicate the start address of + enhanced data area. If not, this attribute will be -EINVAL. Unit + Byte. Format decimal. + +What: /sys/devices/.../mmc_host/mmcX/mmcX:XXXX/enhanced_area_size +Date: January 2011 +Contact: Chuanxiao Dong <[email protected]> +Description: + Enhanced area is a new feature defined in eMMC4.4 standard. + eMMC4.4 or later card can support such feature. This kind of + area can help to improve the card performance. If the feature is + enabled, this attribute will indicate the size of enhanced data + area. If not, this attribute will be -EINVAL. Unit KByte. Format + decimal.
drivers/mmc/core/mmc.c +80 -0
104 lines not on this page · raw message
include/linux/mmc/card.h +3 -0
@@ -54,6 +54,9 @@ struct mmc_ext_csd {unsigned int sec_trim_mult;/* Secure trim multiplier */ unsigned int sec_erase_mult;/* Secure erase multiplier */ unsigned int trim_timeout;/* In milliseconds */ +bool enhanced_area_en;/* enable bit */ +unsigned long long enhanced_area_offset;/* Units: Byte */ +unsigned int enhanced_area_size;/* Units: KB */ };struct sd_scr {
include/linux/mmc/mmc.h +3 -0
@@ -253,6 +253,8 @@ struct _mmc_csd {* EXT_CSD fields */ +#define EXT_CSD_PARTITION_ATTRIBUTE 156/* R/W */ +#define EXT_CSD_PARTITION_SUPPORT 160/* RO */ #define EXT_CSD_ERASE_GROUP_DEF 175/* R/W */ #define EXT_CSD_ERASED_MEM_CONT 181/* RO */ #define EXT_CSD_BUS_WIDTH 183/* R/W */
@@ -262,6 +264,7 @@ struct _mmc_csd {#define EXT_CSD_CARD_TYPE 196/* RO */ #define EXT_CSD_SEC_CNT 212/* RO, 4 bytes */ #define EXT_CSD_S_A_TIMEOUT 217/* RO */ +#define EXT_CSD_HC_WP_GRP_SIZE 221/* RO */ #define EXT_CSD_ERASE_TIMEOUT_MULT 223/* RO */ #define EXT_CSD_HC_ERASE_GRP_SIZE 224/* RO */ #define EXT_CSD_SEC_TRIM_MULT 229/* RO */
Signature · 1 line
1.6.6.1
Hi Chuanxiao,
Quoted 10 lines · Chuanxiao Dong
Enhanced area feature is a new feature defined in eMMC4.4 standard. This kind of area can help to improve the performance.
MMC driver will read out the enhanced area offset and size and add them to be device attributes. The feature enabling should be done in manufactory. To use this feature, bit
ERASE_GRP_DEFshould also be set.
Documentation/ABI/testing/sysfs-devices-mmcdescribed the two new attributesSigned-off-by Chuanxiao Dong <[email protected]>
Looks good, pushed to mmc-next. Thanks for all the edits to this!
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child
Hi Chris,
Thanks for letting me know this. :)
-Chuanxiao
Quoted 27 lines
-----Original Message-----
From: Chris Ball [mailto:[email protected]]
Sent: Saturday, January 22, 2011 9:52 AM
To: Dong, Chuanxiao
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v4 1/1]mmc: implemented eMMC4.4 enhanced area featureHi Chuanxiao,
Quoted 10 lines · Chuanxiao Dong
Enhanced area feature is a new feature defined in eMMC4.4 standard. This kind of area can help to improve the performance.
MMC driver will read out the enhanced area offset and size and add them to be device attributes. The feature enabling should be done in manufactory. To use this feature, bit
ERASE_GRP_DEFshould also be set.
Documentation/ABI/testing/sysfs-devices-mmcdescribed the two new attributesSigned-off-by Chuanxiao Dong <[email protected]>Looks good, pushed to mmc-next. Thanks for all the edits to this!
--
Chris Ball <[email protected]> <http://printf.net/>
One Laptop Per Child