wdenk | b983fa2 | 2004-01-16 00:30:56 +0000 | [diff] [blame] | 1 | #ifndef __LINUX_PS2MULT_H |
| 2 | #define __LINUX_PS2MULT_H |
| 3 | |
| 4 | #define kbd_request_region() ps2mult_init() |
| 5 | #define kbd_request_irq(handler) ps2mult_request_irq(handler) |
| 6 | |
| 7 | #define kbd_read_input() ps2mult_read_input() |
| 8 | #define kbd_read_status() ps2mult_read_status() |
| 9 | #define kbd_write_output(val) ps2mult_write_output(val) |
| 10 | #define kbd_write_command(val) ps2mult_write_command(val) |
| 11 | |
| 12 | #define aux_request_irq(hand, dev_id) 0 |
| 13 | #define aux_free_irq(dev_id) |
| 14 | |
| 15 | #define PS2MULT_KB_SELECTOR 0xA0 |
| 16 | #define PS2MULT_MS_SELECTOR 0xA1 |
| 17 | #define PS2MULT_ESCAPE 0x7D |
| 18 | #define PS2MULT_BSYNC 0x7E |
| 19 | #define PS2MULT_SESSION_START 0x55 |
| 20 | #define PS2MULT_SESSION_END 0x56 |
| 21 | |
| 22 | #define PS2BUF_SIZE 512 /* power of 2, please */ |
| 23 | |
wdenk | da55c6e | 2004-01-20 23:12:12 +0000 | [diff] [blame] | 24 | #ifndef CONFIG_PS2MULT_DELAY |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 25 | #define CONFIG_PS2MULT_DELAY (CONFIG_SYS_HZ/2) /* Initial delay */ |
wdenk | da55c6e | 2004-01-20 23:12:12 +0000 | [diff] [blame] | 26 | #endif |
| 27 | |
wdenk | b983fa2 | 2004-01-16 00:30:56 +0000 | [diff] [blame] | 28 | /* PS/2 controller interface (include/asm/keyboard.h) |
| 29 | */ |
| 30 | extern int ps2mult_init (void); |
| 31 | extern int ps2mult_request_irq(void (*handler)(void *)); |
| 32 | extern u_char ps2mult_read_input(void); |
| 33 | extern u_char ps2mult_read_status(void); |
| 34 | extern void ps2mult_write_output(u_char val); |
| 35 | extern void ps2mult_write_command(u_char val); |
| 36 | |
wdenk | da55c6e | 2004-01-20 23:12:12 +0000 | [diff] [blame] | 37 | extern void ps2mult_early_init (void); |
wdenk | b983fa2 | 2004-01-16 00:30:56 +0000 | [diff] [blame] | 38 | extern void ps2mult_callback (int in_cnt); |
| 39 | |
| 40 | /* Simple serial interface |
| 41 | */ |
| 42 | extern int ps2ser_init(void); |
| 43 | extern void ps2ser_putc(int chr); |
| 44 | extern int ps2ser_getc(void); |
| 45 | extern int ps2ser_check(void); |
| 46 | |
| 47 | |
| 48 | /* Serial related stuff |
| 49 | */ |
| 50 | struct serial_state { |
| 51 | int baud_base; |
| 52 | int irq; |
| 53 | u8 *iomem_base; |
| 54 | }; |
| 55 | |
wdenk | b983fa2 | 2004-01-16 00:30:56 +0000 | [diff] [blame] | 56 | #endif /* __LINUX_PS2MULT_H */ |