aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/ebony.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2007-06-13 00:52:58 -0400
committerPaul Mackerras <paulus@samba.org>2007-06-14 08:30:16 -0400
commit11123346bfba8e65631957c6c25ed1a6ca1b4ffe (patch)
tree81d0d58de9da85551c8a4fd1169a52399990c1f2 /arch/powerpc/boot/ebony.c
parent4508dc21feb189159d4cc1d5b79c5a55fad5f2ed (diff)
[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/ebony.c')
-rw-r--r--arch/powerpc/boot/ebony.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/arch/powerpc/boot/ebony.c b/arch/powerpc/boot/ebony.c
index b1251ee7a102..634985802006 100644
--- a/arch/powerpc/boot/ebony.c
+++ b/arch/powerpc/boot/ebony.c
@@ -102,26 +102,10 @@ static void ebony_fixups(void)
102 dt_fixup_mac_addresses(ebony_mac0, ebony_mac1); 102 dt_fixup_mac_addresses(ebony_mac0, ebony_mac1);
103} 103}
104 104
105#define SPRN_DBCR0 0x134
106#define DBCR0_RST_SYSTEM 0x30000000
107
108static void ebony_exit(void)
109{
110 unsigned long tmp;
111
112 asm volatile (
113 "mfspr %0,%1\n"
114 "oris %0,%0,%2@h\n"
115 "mtspr %1,%0"
116 : "=&r"(tmp) : "i"(SPRN_DBCR0), "i"(DBCR0_RST_SYSTEM)
117 );
118
119}
120
121void ebony_init(void *mac0, void *mac1) 105void ebony_init(void *mac0, void *mac1)
122{ 106{
123 platform_ops.fixups = ebony_fixups; 107 platform_ops.fixups = ebony_fixups;
124 platform_ops.exit = ebony_exit; 108 platform_ops.exit = ibm44x_dbcr_reset;
125 ebony_mac0 = mac0; 109 ebony_mac0 = mac0;
126 ebony_mac1 = mac1; 110 ebony_mac1 = mac1;
127 ft_init(_dtb_start, _dtb_end - _dtb_start, 32); 111 ft_init(_dtb_start, _dtb_end - _dtb_start, 32);