summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tsbogend@alpha.franken.de>1998-01-10 19:28:52 +0000
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>1998-01-10 19:28:52 +0000
commit3d697109c1ff85ef563aec3d5e113ef225ed2792 (patch)
treed2cade6b8f2e404dd4e520dc058606cc2023ddb0
parentbd67fb7fe90bf124b67f01e63738d420efec8e69 (diff)
added restart code
-rw-r--r--arch/mips/jazz/reset.c24
1 files changed, 21 insertions, 3 deletions
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 <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)