summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)