diff options
Diffstat (limited to 'arch/powerpc/platforms/cell/ras.c')
-rw-r--r-- | arch/powerpc/platforms/cell/ras.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/cell/ras.c b/arch/powerpc/platforms/cell/ras.c index 655704ad03cf..505f9b9bdf0c 100644 --- a/arch/powerpc/platforms/cell/ras.c +++ b/arch/powerpc/platforms/cell/ras.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <asm/reg.h> | 17 | #include <asm/reg.h> |
18 | #include <asm/io.h> | 18 | #include <asm/io.h> |
19 | #include <asm/prom.h> | 19 | #include <asm/prom.h> |
20 | #include <asm/kexec.h> | ||
20 | #include <asm/machdep.h> | 21 | #include <asm/machdep.h> |
21 | #include <asm/rtas.h> | 22 | #include <asm/rtas.h> |
22 | #include <asm/cell-regs.h> | 23 | #include <asm/cell-regs.h> |
@@ -226,6 +227,11 @@ static int cbe_ptcal_notify_reboot(struct notifier_block *nb, | |||
226 | return cbe_ptcal_disable(); | 227 | return cbe_ptcal_disable(); |
227 | } | 228 | } |
228 | 229 | ||
230 | static void cbe_ptcal_crash_shutdown(void) | ||
231 | { | ||
232 | cbe_ptcal_disable(); | ||
233 | } | ||
234 | |||
229 | static struct notifier_block cbe_ptcal_reboot_notifier = { | 235 | static struct notifier_block cbe_ptcal_reboot_notifier = { |
230 | .notifier_call = cbe_ptcal_notify_reboot | 236 | .notifier_call = cbe_ptcal_notify_reboot |
231 | }; | 237 | }; |
@@ -241,12 +247,20 @@ int __init cbe_ptcal_init(void) | |||
241 | return -ENODEV; | 247 | return -ENODEV; |
242 | 248 | ||
243 | ret = register_reboot_notifier(&cbe_ptcal_reboot_notifier); | 249 | ret = register_reboot_notifier(&cbe_ptcal_reboot_notifier); |
244 | if (ret) { | 250 | if (ret) |
245 | printk(KERN_ERR "Can't disable PTCAL, so not enabling\n"); | 251 | goto out1; |
246 | return ret; | 252 | |
247 | } | 253 | ret = crash_shutdown_register(&cbe_ptcal_crash_shutdown); |
254 | if (ret) | ||
255 | goto out2; | ||
248 | 256 | ||
249 | return cbe_ptcal_enable(); | 257 | return cbe_ptcal_enable(); |
258 | |||
259 | out2: | ||
260 | unregister_reboot_notifier(&cbe_ptcal_reboot_notifier); | ||
261 | out1: | ||
262 | printk(KERN_ERR "Can't disable PTCAL, so not enabling\n"); | ||
263 | return ret; | ||
250 | } | 264 | } |
251 | 265 | ||
252 | arch_initcall(cbe_ptcal_init); | 266 | arch_initcall(cbe_ptcal_init); |