mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
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:
parent
2092e46104
commit
c7ff552843
5 changed files with 52 additions and 14 deletions
|
@ -813,8 +813,18 @@ void copy_filename(char *dst, const char *src, int size);
|
|||
/* get a random source port */
|
||||
unsigned int random_port(void);
|
||||
|
||||
/* Update U-Boot over TFTP */
|
||||
int update_tftp(ulong addr);
|
||||
/**
|
||||
* update_tftp - Update firmware over TFTP (via DFU)
|
||||
*
|
||||
* This function updates board's firmware via TFTP
|
||||
*
|
||||
* @param addr - memory address where data is stored
|
||||
* @param interface - the DFU medium name - e.g. "mmc"
|
||||
* @param devstring - the DFU medium number - e.g. "1"
|
||||
*
|
||||
* @return - 0 on success, other value on failure
|
||||
*/
|
||||
int update_tftp(ulong addr, char *interface, char *devstring);
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue