summaryrefslogtreecommitdiff
path: root/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-01-31 08:32:11 -0600
committerTom Rini <trini@konsulko.com>2025-01-31 08:32:11 -0600
commita582e485338633fb2bd3b124a06da1254b71947c (patch)
tree8e762f999cd7d4eecf2c3192ef0670c1bfd2fd8e /arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
parent487b254702858a69f96d0c314ab1eab66ac084e2 (diff)
parent84bbb8f59a89b24daebc9eff532df6160f049faf (diff)
Merge tag 'u-boot-stm32-20250131' of https://source.denx.de/u-boot/custodians/u-boot-stm
STM32 MPU: - Remove dt-bindings headers available in dts/upstream - Fixes for stm32prog - Enable CONFIG_SYS_64BIT_LBA for STM32MP15/13/25 defconfigs - Add upport of ck_usbo_48m in pre-reloc stage for STM32MP13 - Clean env_get_location() for STM32MP1 - Fix board_get_usable_ram_top() to fix infinite loop in cache management for STM32MP2. - Fix ck_flexgen_08 frequency for STM32MP2 STM32 MCU: - Tune CYCLIC_MAX_CPU_TIME_US to avoid cyclic warning for STM32F469-Disco - Tune CYCLIC_MAX_CPU_TIME_US to avoid cyclic warning for STM32F769-Disco
Diffstat (limited to 'arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c')
-rw-r--r--arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
index 393f9a1b411..353aecc09de 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
@@ -790,8 +790,8 @@ static int init_device(struct stm32prog_data *data,
last_addr = (u64)(block_dev->lba - GPT_HEADER_SZ - 1) *
block_dev->blksz;
}
- log_debug("MMC %d: lba=%ld blksz=%ld\n", dev->dev_id,
- block_dev->lba, block_dev->blksz);
+ log_debug("MMC %d: lba=%lld blksz=%ld\n", dev->dev_id,
+ (u64)block_dev->lba, block_dev->blksz);
log_debug(" available address = 0x%llx..0x%llx\n",
first_addr, last_addr);
log_debug(" full_update = %d\n", dev->full_update);
@@ -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) {