mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-18 10:54:37 +00:00
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:
parent
cc8579cc0c
commit
2d774c19f2
1 changed files with 4 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue