From patchwork Thu Jun 23 18:27:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Hobbs X-Patchwork-Id: 101666 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 B8E59B6F64 for ; Fri, 24 Jun 2011 04:28:36 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0068B2809F; Thu, 23 Jun 2011 20:28:26 +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 XhfHFLKZd0Ai; Thu, 23 Jun 2011 20:28:25 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9AD9A280A0; Thu, 23 Jun 2011 20:28:06 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0E90228091 for ; Thu, 23 Jun 2011 20:28:01 +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 hZhTwfmz4ea3 for ; Thu, 23 Jun 2011 20:27:58 +0200 (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 smtp125.dfw.emailsrvr.com (smtp125.dfw.emailsrvr.com [67.192.241.125]) by theia.denx.de (Postfix) with ESMTPS id 8355C28086 for ; Thu, 23 Jun 2011 20:27:56 +0200 (CEST) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp2.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 3AD382A8574; Thu, 23 Jun 2011 14:27:55 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp2.relay.dfw1a.emailsrvr.com (Authenticated sender: jason.hobbs-AT-calxeda.com) with ESMTPSA id 198D92A859B; Thu, 23 Jun 2011 14:27:54 -0400 (EDT) Received: by jhobbs-laptop (sSMTP sendmail emulation); Thu, 23 Jun 2011 13:27:52 -0500 From: "Jason Hobbs" To: u-boot@lists.denx.de Date: Thu, 23 Jun 2011 13:27:32 -0500 Message-Id: <1308853655-12407-4-git-send-email-jason.hobbs@calxeda.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1308853655-12407-1-git-send-email-jason.hobbs@calxeda.com> References: <1308853655-12407-1-git-send-email-jason.hobbs@calxeda.com> Cc: Jason Hobbs , wd@denx.edu Subject: [U-Boot] [PATCH v2 3/6] common: make abortboot available for menu use X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 Signed-off-by: Jason Hobbs --- changes in v2: - expose abortboot externally instead of using a wrapper - expose abortboot externally when CONFIG_MENU is set common/main.c | 12 ++++++++---- include/common.h | 3 +++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/common/main.c b/common/main.c index 1f64523..a031a33 100644 --- a/common/main.c +++ b/common/main.c @@ -56,10 +56,6 @@ void update_tftp (void); #define MAX_DELAY_STOP_STR 32 -#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0) -static int abortboot(int); -#endif - #undef DEBUG_PARSER char console_buffer[CONFIG_SYS_CBSIZE + 1]; /* console I/O buffer */ @@ -91,7 +87,11 @@ extern void mdm_init(void); /* defined in board.c */ */ #if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0) # if defined(CONFIG_AUTOBOOT_KEYED) +#ifdef CONFIG_MENU +int abortboot(int bootdelay) +#else static __inline__ int abortboot(int bootdelay) +#endif { int abort = 0; uint64_t etime = endtick(bootdelay); @@ -205,7 +205,11 @@ static __inline__ int abortboot(int bootdelay) static int menukey = 0; #endif +#ifdef CONFIG_MENU +int abortboot(int bootdelay) +#else static __inline__ int abortboot(int bootdelay) +#endif { int abort = 0; diff --git a/include/common.h b/include/common.h index e659630..d8b8a79 100644 --- a/include/common.h +++ b/include/common.h @@ -234,6 +234,9 @@ int readline_into_buffer (const char *const prompt, char * buffer); int parse_line (char *, char *[]); void init_cmd_timeout(void); void reset_cmd_timeout(void); +#ifdef CONFIG_MENU +int abortboot(int bootdelay); +#endif /* arch/$(ARCH)/lib/board.c */ void board_init_f (ulong) __attribute__ ((noreturn));