mmc->ddr_mode ? " DDR" : "");
if (!IS_SD(mmc) && mmc->version >= MMC_VERSION_4) {
+ bool has_enh = (mmc->part_support & ENHNCD_SUPPORT) != 0;
puts("User Capacity: ");
- print_size(mmc->capacity_user, "\n");
+ print_size(mmc->capacity_user,
+ has_enh && (mmc->part_attr & EXT_CSD_ENH_USR) ?
+ " ENH\n" : "\n");
puts("Boot Capacity: ");
- print_size(mmc->capacity_boot, "\n");
+ print_size(mmc->capacity_boot, has_enh ? " ENH\n" : "\n");
puts("RPMB Capacity: ");
- print_size(mmc->capacity_rpmb, "\n");
+ print_size(mmc->capacity_rpmb, has_enh ? " ENH\n" : "\n");
for (i = 0; i < ARRAY_SIZE(mmc->capacity_gp); i++) {
+ bool is_enh = has_enh &&
+ (mmc->part_attr & EXT_CSD_ENH_GP(i));
if (mmc->capacity_gp[i]) {
printf("GP%i Capacity: ", i);
- print_size(mmc->capacity_gp[i], "\n");
+ print_size(mmc->capacity_gp[i],
+ is_enh ? " ENH\n" : "\n");
}
}
}
}
/* store the partition info of emmc */
+ mmc->part_support = ext_csd[EXT_CSD_PARTITIONING_SUPPORT];
if ((ext_csd[EXT_CSD_PARTITIONING_SUPPORT] & PART_SUPPORT) ||
ext_csd[EXT_CSD_BOOT_MULT])
mmc->part_config = ext_csd[EXT_CSD_PART_CONF];
+ if (ext_csd[EXT_CSD_PARTITIONING_SUPPORT] & ENHNCD_SUPPORT)
+ mmc->part_attr = ext_csd[EXT_CSD_PARTITIONS_ATTRIBUTE];
mmc->capacity_boot = ext_csd[EXT_CSD_BOOT_MULT] << 17;
#define EXT_CSD_PARTITION_SETTING_COMPLETED (1 << 0)
+#define EXT_CSD_ENH_USR (1 << 0) /* user data area is enhanced */
+#define EXT_CSD_ENH_GP(x) (1 << ((x)+1)) /* GP part (x+1) is enhanced */
+
#define R1_ILLEGAL_COMMAND (1 << 22)
#define R1_APP_CMD (1 << 5)
#define MMCPART_NOAVAILABLE (0xff)
#define PART_ACCESS_MASK (0x7)
#define PART_SUPPORT (0x1)
+#define ENHNCD_SUPPORT (0x2)
#define PART_ENH_ATTRIB (0x1f)
/* Maximum block size for MMC */
uint csd[4];
uint cid[4];
ushort rca;
+ u8 part_support;
+ u8 part_attr;
char part_config;
char part_num;
uint tran_speed;