Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46806
b: refs/heads/master
c: c75f902
h: refs/heads/master
v: v3
  • Loading branch information
Kumar Gala committed Jan 26, 2007
1 parent 58e7c56 commit 4e65760
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 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: 4d52719a767455d319263d598e0f59e027895e00
refs/heads/master: c75f902b93724ab9ba161f7dfab0fd09c7a8854d
29 changes: 21 additions & 8 deletions trunk/arch/powerpc/platforms/83xx/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,36 @@

#include "mpc83xx.h"

static __be32 __iomem *restart_reg_base;

static int __init mpc83xx_restart_init(void)
{
/* map reset restart_reg_baseister space */
restart_reg_base = ioremap(get_immrbase() + 0x900, 0xff);

return 0;
}

arch_initcall(mpc83xx_restart_init);

void mpc83xx_restart(char *cmd)
{
#define RST_OFFSET 0x00000900
#define RST_PROT_REG 0x00000018
#define RST_CTRL_REG 0x0000001c
__be32 __iomem *reg;

/* map reset register space */
reg = ioremap(get_immrbase() + 0x900, 0xff);

local_irq_disable();

/* enable software reset "RSTE" */
out_be32(reg + (RST_PROT_REG >> 2), 0x52535445);
if (restart_reg_base) {
/* enable software reset "RSTE" */
out_be32(restart_reg_base + (RST_PROT_REG >> 2), 0x52535445);

/* set software hard reset */
out_be32(restart_reg_base + (RST_CTRL_REG >> 2), 0x2);
} else {
printk (KERN_EMERG "Error: Restart registers not mapped, spinning!\n");
}

/* set software hard reset */
out_be32(reg + (RST_CTRL_REG >> 2), 0x2);
for (;;) ;
}

Expand Down

0 comments on commit 4e65760

Please sign in to comment.