summaryrefslogtreecommitdiff
path: root/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-04-09 13:10:59 -0400
committerTom Rini <trini@konsulko.com>2021-04-09 13:10:59 -0400
commit3f2e3c7845df11ca8359a6cc804bfd6eb5ce215b (patch)
tree423c18c94b1e62122f8988b94668bada1b85340b /arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
parent92c4eb7ae3e8fe2c2b3c5b37f882b42282a08e84 (diff)
parent2c2d7d6a72ba4a4f9323f24b8caa3b1e05546d83 (diff)
Merge tag 'u-boot-stm32-20210409' of https://source.denx.de/u-boot/custodians/u-boot-stm
Add rt-thread art-pi board support based on STM32H750 SoC Add Engicam i.Core STM32MP1 SoM Add FIP header support for STM32programmer Update uart number when no serial device found for STM32MP1 Remove board_check_usb_power function when ADC flag is not set Update SPL size limitation for STM32MP1 Set soc_type, soc_pkg, soc_rev env variables for STM32MP1
Diffstat (limited to 'arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c')
-rw-r--r--arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
index a51e5e3ec86..2b92e3b1498 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
@@ -309,11 +309,10 @@ static u8 stm32prog_header(struct stm32prog_data *data)
/* force cleanup to avoid issue with previous read */
dfu_transaction_cleanup(dfu_entity);
- ret = stm32prog_header_check(data->header_data,
- &data->header);
+ stm32prog_header_check(data->header_data, &data->header);
- /* no header : max size is partition size */
- if (ret) {
+ /* no stm32 image header : max size is partition size */
+ if (data->header.type != HEADER_STM32IMAGE) {
dfu_entity->get_medium_size(dfu_entity, &size);
data->header.image_length = size;
}
@@ -389,7 +388,7 @@ static u8 stm32prog_start(struct stm32prog_data *data, u32 address)
data->dfu_seq = 0;
printf("\n received length = 0x%x\n", data->cursor);
- if (data->header.present) {
+ if (data->header.type == HEADER_STM32IMAGE) {
if (data->cursor !=
(data->header.image_length + BL_HEADER_SIZE)) {
stm32prog_err("transmission interrupted (length=0x%x expected=0x%x)",
@@ -789,7 +788,7 @@ static void download_command(struct stm32prog_data *data)
}
}
- if (image_header->present) {
+ if (data->header.type == HEADER_STM32IMAGE) {
if (data->cursor <= BL_HEADER_SIZE)
goto end;
/* compute checksum on payload */