diff mbox

[U-Boot,v4,2/9] net: Add prototype for update_tftp

Message ID 1368635041-27638-2-git-send-email-sjg@chromium.org
State Accepted, archived
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass May 15, 2013, 4:23 p.m. UTC
This function should be declared in net.h.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v4:
- Removed autoconf() code for now

Changes in v3: None

 common/cmd_fitupd.c | 3 +--
 common/main.c       | 4 ----
 include/net.h       | 3 +++
 3 files changed, 4 insertions(+), 6 deletions(-)

Comments

Joe Hershberger May 15, 2013, 4:36 p.m. UTC | #1
On Wed, May 15, 2013 at 11:23 AM, Simon Glass <sjg@chromium.org> wrote:
> This function should be declared in net.h.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> Changes in v4:
> - Removed autoconf() code for now
>
> Changes in v3: None
>
>  common/cmd_fitupd.c | 3 +--
>  common/main.c       | 4 ----
>  include/net.h       | 3 +++
>  3 files changed, 4 insertions(+), 6 deletions(-)

Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
diff mbox

Patch

diff --git a/common/cmd_fitupd.c b/common/cmd_fitupd.c
index 7a3789e..618ff7c 100644
--- a/common/cmd_fitupd.c
+++ b/common/cmd_fitupd.c
@@ -8,13 +8,12 @@ 
 
 #include <common.h>
 #include <command.h>
+#include <net.h>
 
 #if !defined(CONFIG_UPDATE_TFTP)
 #error "CONFIG_UPDATE_TFTP required"
 #endif
 
-extern int update_tftp(ulong addr);
-
 static int do_fitupd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	ulong addr = 0UL;
diff --git a/common/main.c b/common/main.c
index 953ef29..9890184 100644
--- a/common/main.c
+++ b/common/main.c
@@ -57,10 +57,6 @@  DECLARE_GLOBAL_DATA_PTR;
 void inline __show_boot_progress (int val) {}
 void show_boot_progress (int val) __attribute__((weak, alias("__show_boot_progress")));
 
-#if defined(CONFIG_UPDATE_TFTP)
-int update_tftp (ulong addr);
-#endif /* CONFIG_UPDATE_TFTP */
-
 #define MAX_DELAY_STOP_STR 32
 
 #undef DEBUG_PARSER
diff --git a/include/net.h b/include/net.h
index 970d4d1..23fb947 100644
--- a/include/net.h
+++ b/include/net.h
@@ -695,6 +695,9 @@  extern void copy_filename(char *dst, const char *src, int size);
 /* get a random source port */
 extern unsigned int random_port(void);
 
+/* Update U-Boot over TFTP */
+extern int update_tftp(ulong addr);
+
 /**********************************************************************/
 
 #endif /* __NET_H__ */