summaryrefslogtreecommitdiff
path: root/include/net.h
diff options
context:
space:
mode:
authorLukasz Majewski <l.majewski@majess.pl>2015-08-24 00:21:47 +0200
committerMarek Vasut <marex@denx.de>2015-09-07 13:41:05 +0200
commitc7ff5528439af8f1e6e10424e495eb7d6238d6c5 (patch)
tree81ac1c72bc7f753efd96bd49236a4b2636e48d73 /include/net.h
parent2092e4610485618ec7a676ff8e6d297ea9dca3d5 (diff)
downloadu-boot-imx-c7ff5528439af8f1e6e10424e495eb7d6238d6c5.zip
u-boot-imx-c7ff5528439af8f1e6e10424e495eb7d6238d6c5.tar.gz
u-boot-imx-c7ff5528439af8f1e6e10424e495eb7d6238d6c5.tar.bz2
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>
Diffstat (limited to 'include/net.h')
-rw-r--r--include/net.h14
1 files changed, 12 insertions, 2 deletions
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);
/**********************************************************************/