diff options
author | Schoyswohl, Roland <Roland.Schoyswohl@ife-doors.com> | 2023-03-23 13:42:46 +0000 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-04-05 11:54:37 +0200 |
commit | bb4c87a93399326257f8ae6aa8829cd6d31b0e7d (patch) | |
tree | 69b9755ab5f55feae5fc94f6a795a71d1476568c /commands | |
parent | 0e47f028dae4b132a55ff09def532dc620c07fa3 (diff) | |
download | barebox-bb4c87a93399326257f8ae6aa8829cd6d31b0e7d.tar.gz barebox-bb4c87a93399326257f8ae6aa8829cd6d31b0e7d.tar.xz |
mmc: fix calculation of Max Enhanced Area
According extcsd documentation, the HC_ERASE_GRP_SIZE must be multiplied by
HC_ERASE_GRP_SIZE and not added.
Signed-off-by: Roland Schoyswohl roland.schoyswohl@ife-doors.com
Link: https://lore.barebox.org/AM6PR04MB472829B69D627CA15218927EA2879@AM6PR04MB4728.eurprd04.prod.outlook.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/mmc_extcsd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/mmc_extcsd.c b/commands/mmc_extcsd.c index 7ae068348d..f67c48404a 100644 --- a/commands/mmc_extcsd.c +++ b/commands/mmc_extcsd.c @@ -1427,7 +1427,7 @@ static int print_field(u8 *reg, int index) case EXT_CSD_MAX_ENH_SIZE_MULT: tmp = get_field_val(EXT_CSD_HC_WP_GRP_SIZE, 0, 0xFF); - tmp = tmp + get_field_val(EXT_CSD_HC_ERASE_GRP_SIZE, 0, 0xFF); + tmp = tmp * get_field_val(EXT_CSD_HC_ERASE_GRP_SIZE, 0, 0xFF); tmp64 *= tmp; tmp64 *= SZ_512K; printf("\tMax Enhanced Area: %llu B\n", tmp64); |