From patchwork Sat Jul 25 08:11:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 499949 X-Patchwork-Delegate: l.majewski@samsung.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 0C4A21402C7 for ; Sat, 25 Jul 2015 20:47:11 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CBAD84B62A; Sat, 25 Jul 2015 12:47:04 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s_miUhC8nUa7; Sat, 25 Jul 2015 12:47:04 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CDF4C4B64D; Sat, 25 Jul 2015 12:47:01 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1BCFE4A03A for ; Sat, 25 Jul 2015 10:32:20 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TE6hdjXVVjtZ for ; Sat, 25 Jul 2015 10:32:19 +0200 (CEST) X-Greylist: delayed 549 seconds by postgrey-1.34 at theia; Sat, 25 Jul 2015 10:32:14 CEST X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from 19.mo1.mail-out.ovh.net (19.mo1.mail-out.ovh.net [178.32.97.206]) by theia.denx.de (Postfix) with ESMTPS id 2719F4A039 for ; Sat, 25 Jul 2015 10:32:14 +0200 (CEST) Received: from mail26.ha.ovh.net (gw6.ovh.net [213.251.189.206]) by mo1.mail-out.ovh.net (Postfix) with SMTP id 9CA03101C085 for ; Sat, 25 Jul 2015 10:16:15 +0200 (CEST) Received: from localhost (HELO queueout) (127.0.0.1) by localhost with SMTP; 25 Jul 2015 10:16:15 +0200 Received: from 109241105088.warszawa.vectranet.pl (HELO localhost.localdomain) (l.majewski%majess.pl@109.241.105.88) by ns0.ovh.net with SMTP; 25 Jul 2015 10:16:13 +0200 From: Lukasz Majewski To: u-boot@lists.denx.de, Tom Rini Date: Sat, 25 Jul 2015 10:11:10 +0200 Message-Id: <1437811877-13764-3-git-send-email-l.majewski@majess.pl> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1437811877-13764-1-git-send-email-l.majewski@majess.pl> References: <1437811877-13764-1-git-send-email-l.majewski@majess.pl> X-Ovh-Tracer-Id: 5006876886295560732 X-Ovh-Remote: 109.241.105.88 (109241105088.warszawa.vectranet.pl) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: -100 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeekvddrkedtucetufdoteggucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeekvddrkedtucetufdoteggucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm X-Mailman-Approved-At: Sat, 25 Jul 2015 12:46:44 +0200 Cc: Marek Vasut , Steve Rae , Stephen Warren , Joe Hershberger , Egli Samuel , Pantelis Antoniou , Przemyslaw Marczak , Tormod Volden Subject: [U-Boot] [PATCH v2 2/9] net: tftp: Move tftp.h file from ./net to ./include/net X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This change gives the ability to reuse the header file by other subsystems (like e.g. dfu). Without this change compilation error emerges for the legacy update.c file. Signed-off-by: Lukasz Majewski --- Changes for v2: - Move tftp.h from ./include to ./include/net/ directory --- include/net/tftp.h | 30 ++++++++++++++++++++++++++++++ net/bootp.c | 2 +- net/net.c | 2 +- net/rarp.c | 2 +- net/tftp.c | 2 +- net/tftp.h | 30 ------------------------------ 6 files changed, 34 insertions(+), 34 deletions(-) create mode 100644 include/net/tftp.h delete mode 100644 net/tftp.h diff --git a/include/net/tftp.h b/include/net/tftp.h new file mode 100644 index 0000000..c411c9b --- /dev/null +++ b/include/net/tftp.h @@ -0,0 +1,30 @@ +/* + * LiMon - BOOTP/TFTP. + * + * Copyright 1994, 1995, 2000 Neil Russell. + * Copyright 2011 Comelit Group SpA + * Luca Ceresoli + * (See License) + */ + +#ifndef __TFTP_H__ +#define __TFTP_H__ + +/**********************************************************************/ +/* + * Global functions and variables. + */ + +/* tftp.c */ +void tftp_start(enum proto_t protocol); /* Begin TFTP get/put */ + +#ifdef CONFIG_CMD_TFTPSRV +void tftp_start_server(void); /* Wait for incoming TFTP put */ +#endif + +extern ulong tftp_timeout_ms; +extern int tftp_timeout_count_max; + +/**********************************************************************/ + +#endif /* __TFTP_H__ */ diff --git a/net/bootp.c b/net/bootp.c index 43466af..b2f8ad4 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -11,8 +11,8 @@ #include #include #include +#include #include "bootp.h" -#include "tftp.h" #include "nfs.h" #ifdef CONFIG_STATUS_LED #include diff --git a/net/net.c b/net/net.c index 67e0ad2..61e010f 100644 --- a/net/net.c +++ b/net/net.c @@ -86,6 +86,7 @@ #include #include #include +#include #if defined(CONFIG_STATUS_LED) #include #include @@ -105,7 +106,6 @@ #if defined(CONFIG_CMD_SNTP) #include "sntp.h" #endif -#include "tftp.h" DECLARE_GLOBAL_DATA_PTR; diff --git a/net/rarp.c b/net/rarp.c index 4ce2f37..1fa11b6 100644 --- a/net/rarp.c +++ b/net/rarp.c @@ -8,10 +8,10 @@ #include #include #include +#include #include "nfs.h" #include "bootp.h" #include "rarp.h" -#include "tftp.h" #define TIMEOUT 5000UL /* Milliseconds before trying BOOTP again */ #ifndef CONFIG_NET_RETRY_COUNT diff --git a/net/tftp.c b/net/tftp.c index 3e99e73..48ccceb 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -10,7 +10,7 @@ #include #include #include -#include "tftp.h" +#include #include "bootp.h" #ifdef CONFIG_SYS_DIRECT_FLASH_TFTP #include diff --git a/net/tftp.h b/net/tftp.h deleted file mode 100644 index c411c9b..0000000 --- a/net/tftp.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * LiMon - BOOTP/TFTP. - * - * Copyright 1994, 1995, 2000 Neil Russell. - * Copyright 2011 Comelit Group SpA - * Luca Ceresoli - * (See License) - */ - -#ifndef __TFTP_H__ -#define __TFTP_H__ - -/**********************************************************************/ -/* - * Global functions and variables. - */ - -/* tftp.c */ -void tftp_start(enum proto_t protocol); /* Begin TFTP get/put */ - -#ifdef CONFIG_CMD_TFTPSRV -void tftp_start_server(void); /* Wait for incoming TFTP put */ -#endif - -extern ulong tftp_timeout_ms; -extern int tftp_timeout_count_max; - -/**********************************************************************/ - -#endif /* __TFTP_H__ */