From patchwork Mon Mar 7 17:37:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyle Moffett X-Patchwork-Id: 85777 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 8F9B5B70F9 for ; Tue, 8 Mar 2011 04:40:57 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 194FA280A0; Mon, 7 Mar 2011 18:39:29 +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 z+ID3w8uIWAW; Mon, 7 Mar 2011 18:39:28 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B46EB280E0; Mon, 7 Mar 2011 18:38:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id ACAC028088 for ; Mon, 7 Mar 2011 18:38:24 +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 mVd-f1+9N9c7 for ; Mon, 7 Mar 2011 18:38:24 +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 19F5D280A6 for ; Mon, 7 Mar 2011 18:38:21 +0100 (CET) Received: from ysera.exmeritus.com (firewall2.exmeritus.com [10.13.38.2]) by border.exmeritus.com (Postfix) with ESMTP id 7BCB5AC087; Mon, 7 Mar 2011 12:38:21 -0500 (EST) From: Kyle Moffett To: u-boot@lists.denx.de Date: Mon, 7 Mar 2011 12:37:32 -0500 Message-Id: <1299519462-25320-12-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 11/21] i386: Generic system restart support 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 i386 port has its own reset_cpu() dispatch for its various supported CPU families, so the existing do_reset() function is simply altered to use the new prototype for __arch_restart(). In addition, the debug message and delay are duplicated from the generic code, so they are removed. This reset code will probably work even when the CPU is in a bad state, so no separate __arch_emergency_restart() function is required. Signed-off-by: Kyle Moffett Cc: Graeme Russ --- arch/i386/cpu/cpu.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/arch/i386/cpu/cpu.c b/arch/i386/cpu/cpu.c index 2339cd4..b1454ba 100644 --- a/arch/i386/cpu/cpu.c +++ b/arch/i386/cpu/cpu.c @@ -122,10 +122,8 @@ int x86_cpu_init_r(void) } int cpu_init_r(void) __attribute__((weak, alias("x86_cpu_init_r"))); -int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int __arch_restart(void) { - printf ("resetting ...\n"); - udelay(50000); /* wait 50 ms */ disable_interrupts(); reset_cpu(0);