linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2]: Fix e500 v2 core reboot bug
@ 2007-05-29  2:36 Zang Roy-r61911
  2007-05-29 17:38 ` Andy Fleming
                   ` (2 more replies)
  0 siblings, 3 replies; 29+ messages in thread
From: Zang Roy-r61911 @ 2007-05-29  2:36 UTC (permalink / raw)
  To: Kumar Gala, Paul Mackerras; +Cc: linuxppc-dev list

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. 


Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
---

 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 <linux/irq.h>
 #include <linux/module.h>
 #include <asm/irq.h>
+#include <asm/io.h>
+#include <sysdev/fsl_soc.h>
+
+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

^ permalink raw reply related	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2007-06-13  7:04 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-29  2:36 [PATCH v2]: Fix e500 v2 core reboot bug Zang Roy-r61911
2007-05-29 17:38 ` Andy Fleming
2007-05-29 19:29 ` Kumar Gala
2007-05-30  2:34   ` Zang Roy-r61911
2007-05-30  2:40     ` Kumar Gala
2007-05-30  5:46       ` Zang Roy-r61911
2007-05-30 12:25         ` Kumar Gala
2007-05-30 13:49           ` Kumar Gala
2007-05-30 15:21             ` Segher Boessenkool
2007-05-31  5:32               ` Zang Roy-r61911
2007-05-31  5:52               ` Benjamin Herrenschmidt
2007-05-31  3:40             ` Zang Roy-r61911
2007-06-04  8:28             ` Zang Roy-r61911
2007-06-04  8:41               ` Segher Boessenkool
2007-06-04  9:01                 ` Zang Roy-r61911
2007-06-04 10:37                   ` Segher Boessenkool
2007-06-05  2:15                     ` Zang Roy-r61911
2007-05-31  2:38           ` Zang Roy-r61911
2007-06-12  9:08 ` [PATCH v3]: " Zang Roy-r61911
2007-06-12 16:18   ` Timur Tabi
2007-06-13  4:44   ` Segher Boessenkool
2007-06-13  5:45     ` Zang Roy-r61911
2007-06-13  6:24       ` Zang Roy-r61911
2007-06-13  6:43         ` Zang Roy-r61911
2007-06-13  6:57           ` Segher Boessenkool
2007-06-13  7:04             ` Segher Boessenkool
2007-06-13  6:16     ` Zang Roy-r61911
2007-06-13  6:28       ` Segher Boessenkool
2007-06-13  6:31         ` Zang Roy-r61911

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).