From c7ff5528439af8f1e6e10424e495eb7d6238d6c5 Mon Sep 17 00:00:00 2001 From: Lukasz Majewski Date: Mon, 24 Aug 2015 00:21:47 +0200 Subject: 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 Acked-by: Joe Hershberger --- include/net.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'include/net.h') diff --git a/include/net.h b/include/net.h index d09bec9..f1671e3 100644 --- a/include/net.h +++ b/include/net.h @@ -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); /**********************************************************************/ -- cgit v1.1