Ok. I didn't make 2.4.0 in 2000. Tough. I tried, but we had some
[davej-history.git] / include / asm-arm / arch-ebsa285 / keyboard.h
blobf3c05b072fe35623efb5c6ba9930b8eff213f5df
1 /*
2 * linux/include/asm-arm/arch-ebsa285/keyboard.h
4 * Keyboard driver definitions for EBSA285 architecture
6 * (C) 1998 Russell King
7 * (C) 1998 Phil Blundell
8 */
9 #include <linux/ioport.h>
10 #include <asm/irq.h>
11 #include <asm/system.h>
13 extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode);
14 extern int pckbd_getkeycode(unsigned int scancode);
15 extern int pckbd_translate(unsigned char scancode, unsigned char *keycode,
16 char raw_mode);
17 extern char pckbd_unexpected_up(unsigned char keycode);
18 extern void pckbd_leds(unsigned char leds);
19 extern void pckbd_init_hw(void);
20 extern unsigned char pckbd_sysrq_xlate[128];
22 #define KEYBOARD_IRQ IRQ_ISA_KEYBOARD
24 #define NR_SCANCODES 128
26 #define kbd_setkeycode(sc,kc) \
27 ({ \
28 int __ret; \
29 if (have_isa_bridge) \
30 __ret = pckbd_setkeycode(sc,kc);\
31 else \
32 __ret = -EINVAL; \
33 __ret; \
36 #define kbd_getkeycode(sc) \
37 ({ \
38 int __ret; \
39 if (have_isa_bridge) \
40 __ret = pckbd_getkeycode(sc); \
41 else \
42 __ret = -EINVAL; \
43 __ret; \
46 #define kbd_translate(sc, kcp, rm) \
47 ({ \
48 pckbd_translate(sc, kcp, rm); \
51 #define kbd_unexpected_up pckbd_unexpected_up
53 #define kbd_leds(leds) \
54 do { \
55 if (have_isa_bridge) \
56 pckbd_leds(leds); \
57 } while (0)
59 #define kbd_init_hw() \
60 do { \
61 if (have_isa_bridge) \
62 pckbd_init_hw(); \
63 } while (0)
65 #define kbd_sysrq_xlate pckbd_sysrq_xlate
67 #define kbd_disable_irq()
68 #define kbd_enable_irq()
70 #define SYSRQ_KEY 0x54
72 /* resource allocation */
73 #define kbd_request_region() request_region(0x60, 16, "keyboard")
74 #define kbd_request_irq(handler) request_irq(KEYBOARD_IRQ, handler, 0, \
75 "keyboard", NULL)
77 /* How to access the keyboard macros on this platform. */
78 #define kbd_read_input() inb(KBD_DATA_REG)
79 #define kbd_read_status() inb(KBD_STATUS_REG)
80 #define kbd_write_output(val) outb(val, KBD_DATA_REG)
81 #define kbd_write_command(val) outb(val, KBD_CNTL_REG)
83 /* Some stoneage hardware needs delays after some operations. */
84 #define kbd_pause() do { } while(0)
86 #define aux_request_irq(hand, dev_id) \
87 request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS/2 Mouse", dev_id)
89 #define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id)