summaryrefslogtreecommitdiffstats
path: root/common/cmd_mmc.c
diff options
context:
space:
mode:
authorDiego Santa Cruz <Diego.SantaCruz@spinetix.com>2014-12-23 10:50:17 +0100
committerPantelis Antoniou <pantelis.antoniou@konsulko.com>2015-01-19 17:01:34 +0200
commitc3dbb4f9b7539e39d418fd1f518129fd60c8eca9 (patch)
treee6effaac26027d67e5bdb54191484d4e4fc1ac50 /common/cmd_mmc.c
parentc5f0d3f1c5078870926ebbc84af92f0f66133cb3 (diff)
downloadtalos-obmc-uboot-c3dbb4f9b7539e39d418fd1f518129fd60c8eca9.tar.gz
talos-obmc-uboot-c3dbb4f9b7539e39d418fd1f518129fd60c8eca9.zip
mmc: extend mmcinfo to show enhanced partition attribute
This extends the mmcinfo command's output to show which eMMC partitions have the enhanced attribute set. Note that the eMMC spec says that if the enhanced attribute is supported then the boot and RPMB partitions are of the enhanced type. The output of mmcinfo becomes: Device: OMAP SD/MMC Manufacturer ID: fe OEM: 14e Name: MMC16 Tran Speed: 52000000 Rd Block Len: 512 MMC version 4.41 High Capacity: Yes Capacity: 13.8 GiB Bus Width: 4-bit User Capacity: 13.8 GiB ENH Boot Capacity: 16 MiB ENH RPMB Capacity: 128 KiB ENH GP1 Capacity: 64 MiB ENH GP2 Capacity: 64 MiB ENH Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
Diffstat (limited to 'common/cmd_mmc.c')
-rw-r--r--common/cmd_mmc.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index cdcbf5f80f..d95cfaa4f8 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -96,16 +96,22 @@ static void print_mmcinfo(struct mmc *mmc)
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");
}
}
}
OpenPOWER on IntegriCloud