mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
stm32mp: stm32prog: handle dfu error
Handle DFU stack error in STM32CubeProgrammer protocol. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
This commit is contained in:
parent
d4710326c8
commit
1f2e3d5599
1 changed files with 14 additions and 0 deletions
|
@ -1783,3 +1783,17 @@ void dfu_initiated_callback(struct dfu_entity *dfu)
|
|||
log_debug("dfu offset = 0x%llx\n", dfu->offset);
|
||||
}
|
||||
}
|
||||
|
||||
void dfu_error_callback(struct dfu_entity *dfu, const char *msg)
|
||||
{
|
||||
struct stm32prog_data *data = stm32prog_data;
|
||||
|
||||
if (!stm32prog_data)
|
||||
return;
|
||||
|
||||
if (!stm32prog_data->cur_part)
|
||||
return;
|
||||
|
||||
if (dfu->alt == stm32prog_data->cur_part->alt_id)
|
||||
stm32prog_err(msg);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue