diff options
author | Ben Gardiner <bengardiner@nanometrics.ca> | 2013-06-27 11:04:10 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-06-27 11:11:05 -0400 |
commit | 82bd9504b12160992309d6508dc5654b3db93c2b (patch) | |
tree | d514ac6f68e8381cf6c58d9cc8cc6b77c59efd2b | |
parent | 61177553619bdec11ddac133466ab9c733f45222 (diff) | |
download | mmc-utils-82bd9504b12160992309d6508dc5654b3db93c2b.tar.gz |
extract definitions for EXT_CSD register EXT_CSD_PARTITIONING_SUPPORT
Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r-- | mmc.h | 3 | ||||
-rw-r--r-- | mmc_cmds.c | 6 |
2 files changed, 6 insertions, 3 deletions
@@ -43,6 +43,7 @@ #define EXT_CSD_SANITIZE_START 165 #define EXT_CSD_BKOPS_EN 163 /* R/W */ #define EXT_CSD_RST_N_FUNCTION 162 /* R/W */ +#define EXT_CSD_PARTITIONING_SUPPORT 160 /* RO */ #define EXT_CSD_NATIVE_SECTOR_SIZE 63 /* R */ #define EXT_CSD_USE_NATIVE_SECTOR 62 /* R/W */ #define EXT_CSD_DATA_SECTOR_SIZE 61 /* R */ @@ -82,6 +83,8 @@ #define EXT_CSD_PART_CONFIG_ACC_BOOT1 (0x2) #define EXT_CSD_PART_CONFIG_ACC_USER_AREA (0x7) #define EXT_CSD_PART_CONFIG_ACC_ACK (0x40) +#define EXT_CSD_PARTITIONING_EN (1<<0) +#define EXT_CSD_ENH_ATTRIBUTE_EN (1<<1) /* From kernel linux/mmc/core.h */ #define MMC_RSP_PRESENT (1 << 0) @@ -660,14 +660,14 @@ int do_read_extcsd(int nargs, char **argv) printf("H/W reset function" " [RST_N_FUNCTION]: 0x%02x\n", ext_csd[162]); printf("HPI management [HPI_MGMT]: 0x%02x\n", ext_csd[161]); - reg = ext_csd[160]; + reg = ext_csd[EXT_CSD_PARTITIONING_SUPPORT]; printf("Partitioning Support [PARTITIONING_SUPPORT]: 0x%02x\n", reg); - if (reg & 0x1) + if (reg & EXT_CSD_PARTITIONING_EN) printf(" Device support partitioning feature\n"); else printf(" Device NOT support partitioning feature\n"); - if (reg & 0x2) + if (reg & EXT_CSD_ENH_ATTRIBUTE_EN) printf(" Device can have enhanced tech.\n"); else printf(" Device cannot have enhanced tech.\n"); |