update: tftp: dfu: Extend update_tftp() function to support DFU

This code allows using DFU defined mediums for storing data received via
TFTP protocol.

It reuses and preserves functionality of legacy code at common/update.c.

The update_tftp() function now accepts parameters - namely medium device
name and its number (e.g. mmc 1).

Without this information passed old behavior is preserved.

Signed-off-by: Lukasz Majewski <l.majewski@majess.pl>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
Lukasz Majewski 2015-08-24 00:21:47 +02:00 committed by Marek Vasut
parent 2092e46104
commit c7ff552843
5 changed files with 52 additions and 14 deletions

View file

@ -75,7 +75,7 @@ void main_loop(void)
run_preboot_environment_command();
#if defined(CONFIG_UPDATE_TFTP)
update_tftp(0UL);
update_tftp(0UL, NULL, NULL);
#endif /* CONFIG_UPDATE_TFTP */
s = bootdelay_process();