diff options
author | Diego Santa Cruz <Diego.SantaCruz@spinetix.com> | 2014-12-23 10:50:26 +0100 |
---|---|---|
committer | Pantelis Antoniou <pantelis.antoniou@konsulko.com> | 2015-01-19 17:04:46 +0200 |
commit | b0361526d5dc3b09d16fbb8f36fbf999cc064640 (patch) | |
tree | 5a9f4cdf5ac168480295b44bc260c8e85c60d469 /common | |
parent | 037dc0ab5dff36984d97735987dff01a7ec73893 (diff) | |
download | u-boot-imx-b0361526d5dc3b09d16fbb8f36fbf999cc064640.zip u-boot-imx-b0361526d5dc3b09d16fbb8f36fbf999cc064640.tar.gz u-boot-imx-b0361526d5dc3b09d16fbb8f36fbf999cc064640.tar.bz2 |
mmc: show the erase group size and HC WP group size in mmcinfo output
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.
Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_mmc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c index bcb03ea..18ed660 100644 --- a/common/cmd_mmc.c +++ b/common/cmd_mmc.c @@ -95,9 +95,16 @@ static void print_mmcinfo(struct mmc *mmc) printf("Bus Width: %d-bit%s\n", mmc->bus_width, mmc->ddr_mode ? " DDR" : ""); + 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) { @@ -110,6 +117,7 @@ static void print_mmcinfo(struct mmc *mmc) 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)); |