[U-Boot] [PATCH v2 11/18] mmc: show the erase group size and HC WP group size in mmcinfo output
Diego Santa Cruz
Diego.SantaCruz at spinetix.com
Thu Dec 4 18:02:08 CET 2014
This adds the erase group size and high-capacity WP group size to
mmcinfo's output. The erase group size is necessary to properly align
erase requests on eMMC. The high-capacity WP group size is necessary
to properly align partitions on eMMC.
---
common/cmd_mmc.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index aa5ba0e..7b7167c 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -94,9 +94,16 @@ static void print_mmcinfo(struct mmc *mmc)
printf("Bus Width: %d-bit\n", mmc->bus_width);
+ puts("Erase Group Size: ");
+ print_size(((u64)mmc->erase_grp_size) << 9, "\n");
+
if (!IS_SD(mmc) && (mmc->version >= MMC_VERSION_4_41)) {
bool has_enh = (mmc->part_support & ENHNCD_SUPPORT) != 0;
bool usr_enh = has_enh && (mmc->part_attr & EXT_CSD_ENH_USR);
+
+ puts("HC WP Group Size: ");
+ print_size(((u64)mmc->hc_wp_grp_size) << 9, "\n");
+
puts("User Capacity: ");
print_size(mmc->capacity_user, usr_enh ? " ENH\n" : "\n");
if (usr_enh) {
@@ -105,10 +112,13 @@ static void print_mmcinfo(struct mmc *mmc)
puts("User Enhanced Size: ");
print_size(mmc->enh_user_size, "\n");
}
+
puts("Boot Capacity: ");
print_size(mmc->capacity_boot, has_enh ? " ENH\n" : "\n");
+
puts("RPMB Capacity: ");
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));
--
1.7.1
More information about the U-Boot
mailing list