patch-2.1.101 linux/arch/mips/jazz/reset.c

Next file: linux/arch/mips/jazz/setup.c
Previous file: linux/arch/mips/jazz/jazzdma.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.100/linux/arch/mips/jazz/reset.c linux/arch/mips/jazz/reset.c
@@ -2,16 +2,36 @@
  *  linux/arch/mips/jazz/process.c
  *
  *  Reset a Jazz machine.
+ *
+ *  $Id: reset.c,v 1.2 1998/05/01 01:33:40 ralf Exp $
  */
+
+#include <linux/sched.h>
+#include <asm/jazz.h>
 #include <asm/io.h>
 #include <asm/system.h>
 #include <asm/reboot.h>
+#include <asm/delay.h>
+#include <asm/keyboard.h>
+
+static inline void kb_wait(void)
+{
+	unsigned long start = jiffies;
+
+	do {
+		if (! (kbd_read_status() & 0x02))
+			return;
+	} while (jiffies - start < 50);
+}
 
 void jazz_machine_restart(char *command)
 {
-	printk("Implement jazz_machine_restart().\n");
-	printk("Press reset to continue.\n");
-	while(1);
+    while (1) {
+	kb_wait ();    
+	kbd_write_command (0xd1);
+	kb_wait ();
+	kbd_write_output (0x00);
+    }
 }
 
 void jazz_machine_halt(void)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov