| * We don't trust the firmware so we do it the classic way by poking and |
| * stabbing at the keyboard controller ... |
| #include <linux/jiffies.h> |
| #define KBD_STAT_IBF 0x02 /* Keyboard input buffer full */ |
| static void jazz_write_output(unsigned char val) |
| status = jazz_kh->command; |
| } while (status & KBD_STAT_IBF); |
| static void jazz_write_command(unsigned char val) |
| status = jazz_kh->command; |
| } while (status & KBD_STAT_IBF); |
| static unsigned char jazz_read_status(void) |
| static inline void kb_wait(void) |
| unsigned long start = jiffies; |
| unsigned long timeout = start + HZ/2; |
| if (! (jazz_read_status() & 0x02)) |
| } while (time_before_eq(jiffies, timeout)); |
| void jazz_machine_restart(char *command) |
| jazz_write_command(0xd1); |