commented early_printk patch because of rejects.
[linux-flexiantxendom0-3.2.10.git] / arch / mips / jazz / reset.c
1 /*
2  * Reset a Jazz machine.
3  */
4 #include <linux/jiffies.h>
5 #include <asm/jazz.h>
6 #include <asm/io.h>
7 #include <asm/system.h>
8 #include <asm/reboot.h>
9 #include <asm/delay.h>
10
11 static inline void kb_wait(void)
12 {
13         unsigned long start = jiffies;
14         unsigned long timeout = start + HZ/2;
15
16         do {
17                 if (! (kbd_read_status() & 0x02))
18                         return;
19         } time_before_eq(jiffies, timeout);
20 }
21
22 void jazz_machine_restart(char *command)
23 {
24     while (1) {
25         kb_wait ();
26         kbd_write_command (0xd1);
27         kb_wait ();
28         kbd_write_output (0x00);
29     }
30 }
31
32 void jazz_machine_halt(void)
33 {
34 }
35
36 void jazz_machine_power_off(void)
37 {
38         /* Jazz machines don't have a software power switch */
39 }