diff options
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/85xx/sbc8560.c | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/85xx/sbc8560.c b/arch/powerpc/platforms/85xx/sbc8560.c index cc27807a8b64..a5ad1c7794bf 100644 --- a/arch/powerpc/platforms/85xx/sbc8560.c +++ b/arch/powerpc/platforms/85xx/sbc8560.c | |||
@@ -267,6 +267,43 @@ arch_initcall(sbc8560_rtc_init); | |||
267 | 267 | ||
268 | #endif /* M48T59 */ | 268 | #endif /* M48T59 */ |
269 | 269 | ||
270 | static __u8 __iomem *brstcr; | ||
271 | |||
272 | static int __init sbc8560_bdrstcr_init(void) | ||
273 | { | ||
274 | struct device_node *np; | ||
275 | struct resource res; | ||
276 | |||
277 | np = of_find_compatible_node(NULL, NULL, "wrs,sbc8560-brstcr"); | ||
278 | if (np == NULL) { | ||
279 | printk(KERN_WARNING "sbc8560: No board specific RSTCR in DTB.\n"); | ||
280 | return -ENODEV; | ||
281 | } | ||
282 | |||
283 | of_address_to_resource(np, 0, &res); | ||
284 | |||
285 | printk(KERN_INFO "sbc8560: Found BRSTCR at i/o 0x%x\n", res.start); | ||
286 | |||
287 | brstcr = ioremap(res.start, res.end - res.start); | ||
288 | if(!brstcr) | ||
289 | printk(KERN_WARNING "sbc8560: ioremap of brstcr failed.\n"); | ||
290 | |||
291 | of_node_put(np); | ||
292 | |||
293 | return 0; | ||
294 | } | ||
295 | |||
296 | arch_initcall(sbc8560_bdrstcr_init); | ||
297 | |||
298 | void sbc8560_rstcr_restart(char * cmd) | ||
299 | { | ||
300 | local_irq_disable(); | ||
301 | if(brstcr) | ||
302 | clrbits8(brstcr, 0x80); | ||
303 | |||
304 | while(1); | ||
305 | } | ||
306 | |||
270 | define_machine(sbc8560) { | 307 | define_machine(sbc8560) { |
271 | .name = "SBC8560", | 308 | .name = "SBC8560", |
272 | .probe = sbc8560_probe, | 309 | .probe = sbc8560_probe, |
@@ -274,7 +311,7 @@ define_machine(sbc8560) { | |||
274 | .init_IRQ = sbc8560_pic_init, | 311 | .init_IRQ = sbc8560_pic_init, |
275 | .show_cpuinfo = sbc8560_show_cpuinfo, | 312 | .show_cpuinfo = sbc8560_show_cpuinfo, |
276 | .get_irq = mpic_get_irq, | 313 | .get_irq = mpic_get_irq, |
277 | .restart = fsl_rstcr_restart, | 314 | .restart = sbc8560_rstcr_restart, |
278 | .calibrate_decr = generic_calibrate_decr, | 315 | .calibrate_decr = generic_calibrate_decr, |
279 | .progress = udbg_progress, | 316 | .progress = udbg_progress, |
280 | }; | 317 | }; |