From 3d697109c1ff85ef563aec3d5e113ef225ed2792 Mon Sep 17 00:00:00 2001 From: Thomas Bogendoerfer Date: Sat, 10 Jan 1998 19:28:52 +0000 Subject: added restart code --- arch/mips/jazz/reset.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/mips/jazz/reset.c b/arch/mips/jazz/reset.c index ccc7a7c8a..d26e44034 100644 --- a/arch/mips/jazz/reset.c +++ b/arch/mips/jazz/reset.c @@ -3,15 +3,33 @@ * * Reset a Jazz machine. */ + +#include +#include #include #include #include +#include +#include + +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) -- cgit v1.2.3