summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/44x.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2007-06-13 14:52:58 +1000
committerPaul Mackerras <paulus@samba.org>2007-06-14 22:30:16 +1000
commit11123346bfba8e65631957c6c25ed1a6ca1b4ffe (patch)
tree81d0d58de9da85551c8a4fd1169a52399990c1f2 /arch/powerpc/boot/44x.c
parent4508dc21feb189159d4cc1d5b79c5a55fad5f2ed (diff)
downloadlinux-stable-11123346bfba8e65631957c6c25ed1a6ca1b4ffe.tar.gz
linux-stable-11123346bfba8e65631957c6c25ed1a6ca1b4ffe.tar.bz2
linux-stable-11123346bfba8e65631957c6c25ed1a6ca1b4ffe.zip
[POWERPC] Factor zImage's 44x reset code out of ebony.c
The ebony_exit() function which resets the Ebony board should in fact be common to most if not all 44x boards. This moves the function out into 44x.c, renaming it, so it can be used by other 44x platforms. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot/44x.c')
-rw-r--r--arch/powerpc/boot/44x.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/powerpc/boot/44x.c b/arch/powerpc/boot/44x.c
index d51377d9024f..bc3f570ff9ba 100644
--- a/arch/powerpc/boot/44x.c
+++ b/arch/powerpc/boot/44x.c
@@ -38,3 +38,19 @@ void ibm44x_fixup_memsize(void)
dt_fixup_memory(0, memsize);
}
+
+#define SPRN_DBCR0 0x134
+#define DBCR0_RST_SYSTEM 0x30000000
+
+void ibm44x_dbcr_reset(void)
+{
+ unsigned long tmp;
+
+ asm volatile (
+ "mfspr %0,%1\n"
+ "oris %0,%0,%2@h\n"
+ "mtspr %1,%0"
+ : "=&r"(tmp) : "i"(SPRN_DBCR0), "i"(DBCR0_RST_SYSTEM)
+ );
+
+}