Thread (21 messages) flat view 21 messages, 5 authors, 2007-02-05
STALE7167d

[PATCH] [5/9] pasemi: Implement restart

From: Olof Johansson <hidden>
Date: 2007-02-02 05:04:20

Implement reset on platforms/pasemi. Default is just to reset the
cpu using the SDC registers.

Signed-off-by: Olof Johansson <redacted>


Index: merge/arch/powerpc/platforms/pasemi/setup.c
===================================================================
--- merge.orig/arch/powerpc/platforms/pasemi/setup.c
+++ merge/arch/powerpc/platforms/pasemi/setup.c
@@ -42,19 +42,13 @@
 
 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 pas_halt(void)
-{
-	pas_power_off();
+	void __iomem *sdcreg;
+	printk("Restarting...\n");
+	/* XXXOJN This should maybe come out of the device tree */
+	sdcreg = ioremap(0xfc101100, 4);
+	while (1)
+		out_le32(sdcreg, 0x6000000);
+	/* No need to iounmap; never coming back */
 }
 
 #ifdef CONFIG_SMP
@@ -220,8 +214,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,

--
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help