arm: stm32mp: stm32prog: update multiplier is part-size is above SZ_1G

Set multiplier to 'G' if part->size if above SZ_1G.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
This commit is contained in:
Patrice Chotard 2024-11-29 13:27:08 +01:00
parent cc8579cc0c
commit 2d774c19f2

View file

@ -1229,7 +1229,10 @@ static int stm32prog_alt_add(struct stm32prog_data *data,
char multiplier, type;
/* max 3 digit for sector size */
if (part->size > SZ_1M) {
if (part->size > SZ_1G) {
size = (u32)(part->size / SZ_1G);
multiplier = 'G';
} else if (part->size > SZ_1M) {
size = (u32)(part->size / SZ_1M);
multiplier = 'M';
} else if (part->size > SZ_1K) {