summaryrefslogtreecommitdiff
path: root/arch/arm/mach-stm32mp
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-stm32mp')
-rw-r--r--arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c9
-rw-r--r--arch/arm/mach-stm32mp/dram_init.c2
2 files changed, 7 insertions, 4 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) {
diff --git a/arch/arm/mach-stm32mp/dram_init.c b/arch/arm/mach-stm32mp/dram_init.c
index b06105768b3..34b958d7afd 100644
--- a/arch/arm/mach-stm32mp/dram_init.c
+++ b/arch/arm/mach-stm32mp/dram_init.c
@@ -81,7 +81,7 @@ phys_addr_t board_get_usable_ram_top(phys_size_t total_size)
/* add 8M for U-Boot reserved memory: display, fdt, gd,... */
size = ALIGN(SZ_8M + CONFIG_SYS_MALLOC_LEN + total_size, MMU_SECTION_SIZE);
- reg = gd->ram_top - size;
+ reg = ALIGN(gd->ram_top - size, MMU_SECTION_SIZE);
/* Reserved memory for OP-TEE at END of DDR for STM32MP1 SoC */
if (IS_ENABLED(CONFIG_STM32MP13X) || IS_ENABLED(CONFIG_STM32MP15X)) {