blob: 1a38733b7649af5a240e26d832dae51587cf89a2 [file] [log] [blame]
wdenkb983fa22004-01-16 00:30:56 +00001#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
wdenkda55c6e2004-01-20 23:12:12 +000024#ifndef CONFIG_PS2MULT_DELAY
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020025#define CONFIG_PS2MULT_DELAY (CONFIG_SYS_HZ/2) /* Initial delay */
wdenkda55c6e2004-01-20 23:12:12 +000026#endif
27
wdenkb983fa22004-01-16 00:30:56 +000028 /* PS/2 controller interface (include/asm/keyboard.h)
29 */
30extern int ps2mult_init (void);
31extern int ps2mult_request_irq(void (*handler)(void *));
32extern u_char ps2mult_read_input(void);
33extern u_char ps2mult_read_status(void);
34extern void ps2mult_write_output(u_char val);
35extern void ps2mult_write_command(u_char val);
36
wdenkda55c6e2004-01-20 23:12:12 +000037extern void ps2mult_early_init (void);
wdenkb983fa22004-01-16 00:30:56 +000038extern void ps2mult_callback (int in_cnt);
39
40 /* Simple serial interface
41 */
42extern int ps2ser_init(void);
43extern void ps2ser_putc(int chr);
44extern int ps2ser_getc(void);
45extern int ps2ser_check(void);
46
47
48 /* Serial related stuff
49 */
50struct serial_state {
51 int baud_base;
52 int irq;
53 u8 *iomem_base;
54};
55
wdenkb983fa22004-01-16 00:30:56 +000056#endif /* __LINUX_PS2MULT_H */