[PATCH] Fix e500 v2 core reboot bug

Jon Loeliger jdl at freescale.com
Thu Mar 8 05:22:35 EST 2007


From: Roy Zang <tie-fei.zang at freescale.com>

For e500 v2 core, a new reset control register is added.

Signed-off-by: Roy Zang <tie-fei.zang at freescale.com>
Acked-by: Jon Loeliger <jdl at freescale.com>
---
 arch/powerpc/platforms/85xx/misc.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/85xx/misc.c b/arch/powerpc/platforms/85xx/misc.c
index 3e62fcb..9fcbf56 100644
--- a/arch/powerpc/platforms/85xx/misc.c
+++ b/arch/powerpc/platforms/85xx/misc.c
@@ -13,11 +13,21 @@
 #include <linux/irq.h>
 #include <linux/module.h>
 #include <asm/irq.h>
+#include <asm/io.h>
+#include <sysdev/fsl_soc.h>
 
 extern void abort(void);
 
 void mpc85xx_restart(char *cmd)
 {
+	unsigned int pvr;
+
+	pvr = mfspr(SPRN_PVR);
+	if ((pvr >> 16) & 0x1){
+		u32 __iomem *rstcr;
+		rstcr = ioremap(get_immrbase() + 0xE00B0, 0x100);
+		*rstcr = 0x2;           /* HRESET_REQ */
+	}
 	local_irq_disable();
 	abort();
 }
-- 
1.5.0.1.213.g509b






More information about the Linuxppc-dev mailing list