Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60656
b: refs/heads/master
c: 68fb0d2
h: refs/heads/master
v: v3
  • Loading branch information
Roy Zang authored and Kumar Gala committed Jul 3, 2007
1 parent 4cfbb17 commit 582fee4
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a4ecababf4f007940300374ff68ac10b96733586
refs/heads/master: 68fb0d203f4f62c8d1ac24d8ef2473582d8ea9db
6 changes: 6 additions & 0 deletions trunk/arch/powerpc/boot/dts/mpc8548cds.dts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@
interrupt-parent = <&mpic>;
};

global-utilities@e0000 { //global utilities reg
compatible = "fsl,mpc8548-guts";
reg = <e0000 1000>;
fsl,has-rstcr;
};

pci1: pci@8000 {
interrupt-map-mask = <1f800 0 0 7>;
interrupt-map = <
Expand Down
32 changes: 32 additions & 0 deletions trunk/arch/powerpc/platforms/85xx/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,43 @@
#include <linux/irq.h>
#include <linux/module.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <asm/prom.h>
#include <sysdev/fsl_soc.h>

static __be32 __iomem *rstcr;

extern void abort(void);

static int __init mpc85xx_rstcr(void)
{
struct device_node *np;
np = of_find_node_by_name(NULL, "global-utilities");
if ((np && of_get_property(np, "fsl,has-rstcr", NULL))) {
const u32 *prop = of_get_property(np, "reg", NULL);
if (prop) {
/* map reset control register
* 0xE00B0 is offset of reset control register
*/
rstcr = ioremap(get_immrbase() + *prop + 0xB0, 0xff);
if (!rstcr)
printk (KERN_EMERG "Error: reset control "
"register not mapped!\n");
}
} else
printk (KERN_INFO "rstcr compatible register does not exist!\n");
if (np)
of_node_put(np);
return 0;
}

arch_initcall(mpc85xx_rstcr);

void mpc85xx_restart(char *cmd)
{
local_irq_disable();
if (rstcr)
/* set reset control register */
out_be32(rstcr, 0x2); /* HRESET_REQ */
abort();
}

0 comments on commit 582fee4

Please sign in to comment.