aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/boot/44x.c16
-rw-r--r--arch/powerpc/boot/44x.h2
-rw-r--r--arch/powerpc/boot/ebony.c18
3 files changed, 19 insertions, 17 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)
38 38
39 dt_fixup_memory(0, memsize); 39 dt_fixup_memory(0, memsize);
40} 40}
41
42#define SPRN_DBCR0 0x134
43#define DBCR0_RST_SYSTEM 0x30000000
44
45void ibm44x_dbcr_reset(void)
46{
47 unsigned long tmp;
48
49 asm volatile (
50 "mfspr %0,%1\n"
51 "oris %0,%0,%2@h\n"
52 "mtspr %1,%0"
53 : "=&r"(tmp) : "i"(SPRN_DBCR0), "i"(DBCR0_RST_SYSTEM)
54 );
55
56}
diff --git a/arch/powerpc/boot/44x.h b/arch/powerpc/boot/44x.h
index 7b129ad043e1..0da4abf390ad 100644
--- a/arch/powerpc/boot/44x.h
+++ b/arch/powerpc/boot/44x.h
@@ -11,6 +11,8 @@
11#define _PPC_BOOT_44X_H_ 11#define _PPC_BOOT_44X_H_
12 12
13void ibm44x_fixup_memsize(void); 13void ibm44x_fixup_memsize(void);
14
15void ibm44x_dbcr_reset(void);
14void ebony_init(void *mac0, void *mac1); 16void ebony_init(void *mac0, void *mac1);
15 17
16#endif /* _PPC_BOOT_44X_H_ */ 18#endif /* _PPC_BOOT_44X_H_ */
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);