From patchwork Mon Mar 7 17:37:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyle Moffett X-Patchwork-Id: 85785 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 8EB38B6F0B for ; Tue, 8 Mar 2011 04:42:46 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0DDA928096; Mon, 7 Mar 2011 18:40:08 +0100 (CET) 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 szRuToQF47Ns; Mon, 7 Mar 2011 18:40:07 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8B58228111; Mon, 7 Mar 2011 18:38:50 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F350A280A9 for ; Mon, 7 Mar 2011 18:38:27 +0100 (CET) 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 t+RmF6vKY6gP for ; Mon, 7 Mar 2011 18:38:27 +0100 (CET) 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 border.exmeritus.com (wsip-70-167-241-26.dc.dc.cox.net [70.167.241.26]) by theia.denx.de (Postfix) with ESMTP id 0AFB6280A0 for ; Mon, 7 Mar 2011 18:38:24 +0100 (CET) Received: from ysera.exmeritus.com (firewall2.exmeritus.com [10.13.38.2]) by border.exmeritus.com (Postfix) with ESMTP id D4E88AC09F; Mon, 7 Mar 2011 12:38:23 -0500 (EST) From: Kyle Moffett To: u-boot@lists.denx.de Date: Mon, 7 Mar 2011 12:37:42 -0500 Message-Id: <1299519462-25320-22-git-send-email-Kyle.D.Moffett@boeing.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1299519462-25320-1-git-send-email-Kyle.D.Moffett@boeing.com> References: <1299519462-25320-1-git-send-email-Kyle.D.Moffett@boeing.com> Cc: Kyle Moffett , Kyle Moffett Subject: [U-Boot] [PATCH 21/21] Remove legacy do_reset() function 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 All of the users of the legacy do_reset() function have been converted to __arch_restart() or __board_restart() as appropriate, so the compatibility calls to do_reset() may be removed. In addition the do_generic_reset() function is renamed to the now-unused name do_reset(). Signed-off-by: Kyle Moffett --- common/cmd_boot.c | 27 +++------------------------ include/command.h | 1 - 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/common/cmd_boot.c b/common/cmd_boot.c index c0f26fc..422d20c 100644 --- a/common/cmd_boot.c +++ b/common/cmd_boot.c @@ -72,9 +72,6 @@ void emergency_restart(void) __board_emergency_restart(); __arch_emergency_restart(); - /* Fallback to the old do_reset() until everything is converted. */ - do_reset(NULL, 0, 0, NULL); - printf("EMERGENCY RESTART: All attempts to reboot failed!"); hang(); } @@ -129,11 +126,6 @@ int system_restart(void) /* Now call into the architecture-specific code */ err = __arch_restart(); - if (err) - goto failed; - - /* Fallback to the old do_reset() until everything is converted. */ - err = do_reset(NULL, 0, 0, NULL); failed: printf("*** SYSTEM RESTART FAILED ***\n"); @@ -157,7 +149,7 @@ int __board_restart(void) __attribute__((__weak__)) int __arch_restart(void) { - /* Fallthrough to legacy do_reset() code */ + /* Some architectures have no generic reboot capability */ return 0; } @@ -166,24 +158,11 @@ int __arch_restart(void) * * This is what you get when you type "reset" at the command line. */ -int do_generic_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { return system_restart(); } -/* - * Empty legacy "do_reset" stub. - * - * This allows a platform using the new __board_restart() and - * __arch_restart() hooks to completely omit the old do_reset() function. - */ -int do_reset_stub(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) -{ - return 0; -} -__attribute__((__weak__,__alias__("do_reset_stub"))) -int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); - /* -------------------------------------------------------------------- */ U_BOOT_CMD( @@ -194,7 +173,7 @@ U_BOOT_CMD( ); U_BOOT_CMD( - reset, 1, 0, do_generic_reset, + reset, 1, 0, do_reset, "Perform RESET of the CPU", "" ); diff --git a/include/command.h b/include/command.h index ad8c915..d87f45d 100644 --- a/include/command.h +++ b/include/command.h @@ -99,7 +99,6 @@ extern int cmd_get_data_size(char* arg, int default_size); extern int do_bootd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); #endif extern int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); -extern int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); /* Generic system restart functions */ __attribute__((__noreturn__))