aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@foss.st.com>2022-03-28 19:25:33 +0200
committerPatrice Chotard <patrice.chotard@foss.st.com>2022-05-10 10:56:39 +0200
commita9fed5aac5c6da9763fdc5d10fd83299d63b7c24 (patch)
treec5224e220c71167504f6b6801f854978833cb145
parent152576a598cad749c80c589a51ea5bd342d6f2cc (diff)
downloadu-boot-a9fed5aac5c6da9763fdc5d10fd83299d63b7c24.zip
u-boot-a9fed5aac5c6da9763fdc5d10fd83299d63b7c24.tar.gz
u-boot-a9fed5aac5c6da9763fdc5d10fd83299d63b7c24.tar.bz2
stm32mp: stm32prog: handle flashlayout without STM32 image header
Accept flashlayout without header in alternate 0, to simplify the support of stm32prog command with dfu-util. By default the flashlayout file size is the size of the received binary, provided with the offset in the DFU alternate. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
-rw-r--r--arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
index 65655e2..b711112 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
@@ -1706,7 +1706,8 @@ static void stm32prog_end_phase(struct stm32prog_data *data, u64 offset)
return;
}
#endif
- if (parse_flash_layout(data, STM32_DDR_BASE, 0))
+ log_notice("\nFlashLayout received, size = %lld\n", offset);
+ if (parse_flash_layout(data, STM32_DDR_BASE, offset))
stm32prog_err("Layout: invalid FlashLayout");
return;
}