From patchwork Fri Dec 3 16:28:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Tyser X-Patchwork-Id: 74164 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 1F82AB7080 for ; Sat, 4 Dec 2010 03:29:11 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AA2212819F; Fri, 3 Dec 2010 17:29:09 +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 7CA6n4YoR-+Z; Fri, 3 Dec 2010 17:29:09 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C98E9281A4; Fri, 3 Dec 2010 17:29:07 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 33921281A4 for ; Fri, 3 Dec 2010 17:29:06 +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 TalAlxz76dO8 for ; Fri, 3 Dec 2010 17:29:04 +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 xes-mad.com (xes-mad.com [216.165.139.218]) by theia.denx.de (Postfix) with ESMTPS id 07B8C2819F for ; Fri, 3 Dec 2010 17:29:01 +0100 (CET) Received: from localhost.localdomain (petert.xes-mad.com [10.52.0.62]) by xes-mad.com (8.13.8/8.13.8) with ESMTP id oB3GSnh1032202; Fri, 3 Dec 2010 10:28:49 -0600 From: Peter Tyser To: u-boot@lists.denx.de Date: Fri, 3 Dec 2010 10:28:47 -0600 Message-Id: <1291393727-337-1-git-send-email-ptyser@xes-inc.com> X-Mailer: git-send-email 1.7.0.4 X-Virus-Scanned: clamav-milter 0.96 at mail X-Virus-Status: Clean Cc: Peter Tyser Subject: [U-Boot] [PATCH/next] 74xx_7xx/mpc86xx/ppmc7xx: Fix do_reset() declaration 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 The following commit: commit 882b7d726febe65579d6502c271412ecb05821d7 Author: Mike Frysinger Date: Wed Oct 20 03:41:17 2010 -0400 do_reset: unify duplicate prototypes missed the 74xx_7xx and mpc86xx arches and the ppmc7xx board do_reset() functions which resulted in build errors such as: cpu.c:128: error: conflicting types for 'do_reset' include/command.h:102: error: previous declaration of 'do_reset' was here Signed-off-by: Peter Tyser Signed-off-by: Mike Frysinger --- arch/powerpc/cpu/74xx_7xx/cpu.c | 10 +++++++--- arch/powerpc/cpu/mpc86xx/cpu.c | 5 +++-- board/ppmc7xx/ppmc7xx.c | 7 +++++-- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/cpu/74xx_7xx/cpu.c b/arch/powerpc/cpu/74xx_7xx/cpu.c index ab6f11d..b6a31b4 100644 --- a/arch/powerpc/cpu/74xx_7xx/cpu.c +++ b/arch/powerpc/cpu/74xx_7xx/cpu.c @@ -234,8 +234,7 @@ soft_restart(unsigned long addr) !defined(CONFIG_ELPPC) && \ !defined(CONFIG_PPMC7XX) /* no generic way to do board reset. simply call soft_reset. */ -void -do_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[]) { ulong addr; /* flush and disable I/D cache */ @@ -263,7 +262,12 @@ do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) addr = CONFIG_SYS_MONITOR_BASE - sizeof (ulong); #endif soft_restart(addr); - while(1); /* not reached */ + + /* not reached */ + while(1) + ; + + return 1; } #endif diff --git a/arch/powerpc/cpu/mpc86xx/cpu.c b/arch/powerpc/cpu/mpc86xx/cpu.c index 4e90fd2..ffcc8e6 100644 --- a/arch/powerpc/cpu/mpc86xx/cpu.c +++ b/arch/powerpc/cpu/mpc86xx/cpu.c @@ -123,8 +123,7 @@ checkcpu(void) } -void -do_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[]) { volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR; volatile ccsr_gur_t *gur = &immap->im_gur; @@ -137,6 +136,8 @@ do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) while (1) ; + + return 1; } diff --git a/board/ppmc7xx/ppmc7xx.c b/board/ppmc7xx/ppmc7xx.c index 5e7427f..432d366 100644 --- a/board/ppmc7xx/ppmc7xx.c +++ b/board/ppmc7xx/ppmc7xx.c @@ -88,7 +88,7 @@ int misc_init_r( void ) * * Shell command to reset the board. */ -void do_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[]) { printf( "Resetting...\n" ); @@ -100,7 +100,10 @@ void do_reset( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] ) _start(); /* Should never get here */ - while(1); + while(1) + ; + + return 1; } int board_eth_init(bd_t *bis)