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
9 #include <linux/ioport.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
,
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) \
29 if (have_isa_bridge) \
30 __ret = pckbd_setkeycode(sc,kc);\
36 #define kbd_getkeycode(sc) \
39 if (have_isa_bridge) \
40 __ret = pckbd_getkeycode(sc); \
46 #define kbd_translate(sc, kcp, rm) \
48 pckbd_translate(sc, kcp, rm); \
51 #define kbd_unexpected_up pckbd_unexpected_up
53 #define kbd_leds(leds) \
55 if (have_isa_bridge) \
59 #define kbd_init_hw() \
61 if (have_isa_bridge) \
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, \
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)