From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id B7BC0DE00E for ; Wed, 30 May 2007 05:29:12 +1000 (EST) In-Reply-To: <1180406209.8139.13.camel@localhost.localdomain> References: <1180406209.8139.13.camel@localhost.localdomain> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: From: Kumar Gala Subject: Re: [PATCH v2]: Fix e500 v2 core reboot bug Date: Tue, 29 May 2007 14:29:00 -0500 To: Zang Roy-r61911 Cc: linuxppc-dev list , Paul Mackerras List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On May 28, 2007, at 9:36 PM, Zang Roy-r61911 wrote: > Fix the e500 v2 core reset bug. > For e500 v2 core, a new reset control register is added to > reset the core. > On 85xx CDS board with e500 v2 core, normal reboot code will > induce DDR block in u-boot. This patch fixes this bug. It is > also tested on legacy e500 v1 core. what happens on an e500 based 85xx system? I'm not terrible happy with blindly writing to rstcr. - k > > > Signed-off-by: Roy Zang > --- > > arch/powerpc/platforms/85xx/misc.c | 18 ++++++++++++++++++ > 1 files changed, 18 insertions(+), 0 deletions(-) > > diff --git a/arch/powerpc/platforms/85xx/misc.c b/arch/powerpc/ > platforms/85xx/misc.c > index 3e62fcb..886a13f 100644 > --- a/arch/powerpc/platforms/85xx/misc.c > +++ b/arch/powerpc/platforms/85xx/misc.c > @@ -13,11 +13,29 @@ > #include > #include > #include > +#include > +#include > + > +static __be32 __iomem *rstcr; > > extern void abort(void); > > +static int __init mpc85xx_rstcr(void) > +{ > + /* map reset control register */ > + rstcr = ioremap(get_immrbase() + 0xE00B0, 0xff); > + return 0; > +} > + > +arch_initcall(mpc85xx_rstcr); > + > void mpc85xx_restart(char *cmd) > { > local_irq_disable(); > + if (rstcr) > + /* set reset control register */ > + out_be32(rstcr, 0x2); /* HRESET_REQ */ > + else > + printk (KERN_EMERG "Error: reset control register not mapped, > spinning!\n"); > abort(); > } > -- > 1.5.1 >