@@ -40,6 +40,7 @@
#define EXT_CSD_WR_REL_PARAM 166
#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 */
@@ -79,6 +80,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)
@@ -670,14 +670,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");
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> --- mmc.h | 3 +++ mmc_cmds.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-)