Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161765
b: refs/heads/master
c: 7792da8
h: refs/heads/master
i:
  161763: 5e14774
v: v3
  • Loading branch information
Liang Li authored and Kumar Gala committed Aug 25, 2009
1 parent b77e386 commit 2ed01aa
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 944ac03804c4c9c0879347098ea458fd57f38687
refs/heads/master: 7792da8567a70be3280c8eef916334e6923815e3
39 changes: 38 additions & 1 deletion trunk/arch/powerpc/platforms/85xx/sbc8560.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,14 +267,51 @@ arch_initcall(sbc8560_rtc_init);

#endif /* M48T59 */

static __u8 __iomem *brstcr;

static int __init sbc8560_bdrstcr_init(void)
{
struct device_node *np;
struct resource res;

np = of_find_compatible_node(NULL, NULL, "wrs,sbc8560-brstcr");
if (np == NULL) {
printk(KERN_WARNING "sbc8560: No board specific RSTCR in DTB.\n");
return -ENODEV;
}

of_address_to_resource(np, 0, &res);

printk(KERN_INFO "sbc8560: Found BRSTCR at i/o 0x%x\n", res.start);

brstcr = ioremap(res.start, res.end - res.start);
if(!brstcr)
printk(KERN_WARNING "sbc8560: ioremap of brstcr failed.\n");

of_node_put(np);

return 0;
}

arch_initcall(sbc8560_bdrstcr_init);

void sbc8560_rstcr_restart(char * cmd)
{
local_irq_disable();
if(brstcr)
clrbits8(brstcr, 0x80);

while(1);
}

define_machine(sbc8560) {
.name = "SBC8560",
.probe = sbc8560_probe,
.setup_arch = sbc8560_setup_arch,
.init_IRQ = sbc8560_pic_init,
.show_cpuinfo = sbc8560_show_cpuinfo,
.get_irq = mpic_get_irq,
.restart = fsl_rstcr_restart,
.restart = sbc8560_rstcr_restart,
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
};

0 comments on commit 2ed01aa

Please sign in to comment.