From patchwork Wed May 15 16:23:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 244132 X-Patchwork-Delegate: trini@ti.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 E77F12C009E for ; Thu, 16 May 2013 02:24:56 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AD3EE4A090; Wed, 15 May 2013 18:24:55 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 ws0tfNX5m-U1; Wed, 15 May 2013 18:24:55 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5827D4A032; Wed, 15 May 2013 18:24:46 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D3ED04A025 for ; Wed, 15 May 2013 18:24:39 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 0CGT4mvS-iEQ for ; Wed, 15 May 2013 18:24:34 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 BL_NJABL=SKIP(-1.5) (only DNSBL check requested) Received: from mail-gh0-f202.google.com (mail-gh0-f202.google.com [209.85.160.202]) by theia.denx.de (Postfix) with ESMTPS id 7A6AA4A036 for ; Wed, 15 May 2013 18:24:27 +0200 (CEST) Received: by mail-gh0-f202.google.com with SMTP id g24so199020ghb.5 for ; Wed, 15 May 2013 09:24:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=k2mVwDAt91RkuwoS8khMRo/lquoSU6bwGQRWcnKzTLs=; b=hoxqDRFP+KZ09grWes329J8awg8oSca2rJ6hDFSnJdyP6LOgKOcArsomgUp62niTwe yfmIBMAQ0XS/lsgQnVC+xv+69hjGXkVZh+qfQLmnLq0UUqUxtbNgl4cf0f0bZMmRGQUS vK04RIQSFsecsJKJdIVa2KbsHt1fwV3Z4TQ+VJIQN58Sbud07wnYtDWzVP8ytFtP3SMi 72cPixdZbNjPHJqPaKVKVCs2inKBDgnvkZjON9AfDQ8yCvzMH7MwqhYrtaMwTkHYv1/E a5zbFKCUcO+G2vLPXj7o6EwfbJDjuAHSdn+WQ954uu7xzAaAuOrxA/dOu35xF2ru4Ppy mYYQ== X-Received: by 10.236.113.203 with SMTP id a51mr20352059yhh.31.1368635066922; Wed, 15 May 2013 09:24:26 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id n23si193633yhi.7.2013.05.15.09.24.26 for (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Wed, 15 May 2013 09:24:26 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.83.1]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id B0A2531C1A7; Wed, 15 May 2013 09:24:26 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 706ED1605FB; Wed, 15 May 2013 09:24:26 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Wed, 15 May 2013 09:23:54 -0700 Message-Id: <1368635041-27638-2-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1368635041-27638-1-git-send-email-sjg@chromium.org> References: <1368635041-27638-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQn3E60G8oX5lmk1TZ1BrrwVggOU18gSX/y+PsHplln9lUn3BqCCqVW0hAPJU45XFvWUy4tIDwuNKwJVXhtujHYd4QflCXgQEulmnWt+vRLUIUeV6uJvlVTaT1CdF0jKSmXiRuCyW1l0MXs8kMb//SP+WtPsd5YvAF6RmY059mziDkKsti+cMZuhELxZKm/rWVfeRyqS Cc: Tom Rini , Joe Hershberger , u-boot-review@google.com Subject: [U-Boot] [PATCH v4 2/9] net: Add prototype for update_tftp X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This function should be declared in net.h. Signed-off-by: Simon Glass Reviewed-by: Joe Hershberger --- 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(-) 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 #include +#include #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__ */