summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2007-02-04 16:36:52 -0600
committerPaul Mackerras <paulus@samba.org>2007-02-07 14:03:22 +1100
commitf620be99e9355c41693f0c748ba9260f69278ee0 (patch)
treee2acc48246629e4afe44abff2f04f79ee9092f61 /arch
parent1199919b69ff9559a3d3444fb5eb45b7cc48264d (diff)
[POWERPC] pasemi: Implement restart
Implement reset on platforms/pasemi. Default is just to reset the cpu using the SDC registers. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/pasemi/setup.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index f69f5e76618f..cabf7017c05e 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -38,21 +38,13 @@
#include "pasemi.h"
-static void pas_restart(char *cmd)
-{
- printk("restart unimplemented, looping...\n");
- for (;;) ;
-}
-
-static void pas_power_off(void)
-{
- printk("power off unimplemented, looping...\n");
- for (;;) ;
-}
+static void __iomem *reset_reg;
-static void pas_halt(void)
+static void pas_restart(char *cmd)
{
- pas_power_off();
+ printk("Restarting...\n");
+ while (1)
+ out_le32(reset_reg, 0x6000000);
}
#ifdef CONFIG_SMP
@@ -82,6 +74,10 @@ void __init pas_setup_arch(void)
conswitchp = &dummy_con;
#endif
+ /* Remap SDC register for doing reset */
+ /* XXXOJN This should maybe come out of the device tree */
+ reset_reg = ioremap(0xfc101100, 4);
+
pasemi_idle_init();
}
@@ -211,8 +207,6 @@ define_machine(pas) {
.init_IRQ = pas_init_IRQ,
.get_irq = mpic_get_irq,
.restart = pas_restart,
- .power_off = pas_power_off,
- .halt = pas_halt,
.get_boot_time = pas_get_boot_time,
.calibrate_decr = generic_calibrate_decr,
.check_legacy_ioport = pas_check_legacy_ioport,