From patchwork Mon Feb 21 17:59:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyle Moffett X-Patchwork-Id: 83914 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 BE740B6F12 for ; Tue, 22 Feb 2011 17:19:48 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 30783280D9; Tue, 22 Feb 2011 07:18:42 +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 bMy4H+mPiJ7V; Tue, 22 Feb 2011 07:18:42 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C97772808A; Tue, 22 Feb 2011 07:17:13 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2D46728085 for ; Mon, 21 Feb 2011 19:00:14 +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 MRbttKxMnneA for ; Mon, 21 Feb 2011 19:00:12 +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 firewall1 (wsip-70-167-241-26.dc.dc.cox.net [70.167.241.26]) by theia.denx.de (Postfix) with ESMTP id 47F1B28080 for ; Mon, 21 Feb 2011 19:00:11 +0100 (CET) Received: from ysera.exmeritus.com (firewall2.exmeritus.com [10.13.38.2]) by firewall1 (Postfix) with ESMTP id 0CC17AC079; Mon, 21 Feb 2011 13:00:10 -0500 (EST) From: Kyle Moffett To: u-boot@lists.denx.de Date: Mon, 21 Feb 2011 12:59:53 -0500 Message-Id: <1298311199-18775-2-git-send-email-Kyle.D.Moffett@boeing.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1298311199-18775-1-git-send-email-Kyle.D.Moffett@boeing.com> References: <1298311199-18775-1-git-send-email-Kyle.D.Moffett@boeing.com> Cc: Peter Tyser , John Livingston , Kyle Moffett Subject: [U-Boot] [PATCH 1/7] mpc85xx: Support a board-specific processor reset routines 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 Some board models (such as the submitted P2020-based HWW-1U-1A hardware) need specialized code to run when a reset is requested to ensure proper synchronization with other hardware. In order to facilitate such board ports, we add a board_reset_r() routine which is called from the do_reset() command function instead of directly poking at the MPC85xx "RSTCR" (reset control) register. Signed-off-by: Kyle Moffett --- arch/powerpc/cpu/mpc85xx/cpu.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index 1aad2ba..dbc662f 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -204,8 +204,10 @@ int checkcpu (void) int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { -/* Everything after the first generation of PQ3 parts has RSTCR */ -#if defined(CONFIG_MPC8540) || defined(CONFIG_MPC8541) || \ +#if defined(CONFIG_BOARD_RESET_R) + extern void board_reset_r(void); + board_reset_r(); +#elif defined(CONFIG_MPC8540) || defined(CONFIG_MPC8541) || \ defined(CONFIG_MPC8555) || defined(CONFIG_MPC8560) unsigned long val, msr; @@ -221,6 +223,7 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) val |= 0x70000000; mtspr(DBCR0,val); #else + /* Everything after the first generation of PQ3 parts has RSTCR */ volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); out_be32(&gur->rstcr, 0x2); /* HRESET_REQ */ udelay(100);