patch-2.1.132 linux/include/asm-arm/arch-ebsa285/keyboard.h

Next file: linux/include/asm-arm/arch-ebsa285/mmu.h
Previous file: linux/include/asm-arm/arch-ebsa285/irqs.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.131/linux/include/asm-arm/arch-ebsa285/keyboard.h linux/include/asm-arm/arch-ebsa285/keyboard.h
@@ -4,16 +4,48 @@
  * Keyboard driver definitions for EBSA285 architecture
  *
  * (C) 1998 Russell King
+ * (C) 1998 Phil Blundell
  */
 
 #include <linux/config.h>
 #include <asm/irq.h>
+#include <asm/system.h>
 
 #define NR_SCANCODES 128
 
-#ifdef CONFIG_MAGIC_SYSRQ
-static unsigned char kbd_sysrq_xlate[NR_SCANCODES];
-#endif
+#ifdef CONFIG_CATS
+
+#define KEYBOARD_IRQ		IRQ_ISA(1)
+
+extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode);
+extern int pckbd_getkeycode(unsigned int scancode);
+extern int pckbd_pretranslate(unsigned char scancode, char raw_mode);
+extern int pckbd_translate(unsigned char scancode, unsigned char *keycode,
+			   char raw_mode);
+extern char pckbd_unexpected_up(unsigned char keycode);
+extern void pckbd_leds(unsigned char leds);
+extern void pckbd_init_hw(void);
+extern unsigned char pckbd_sysrq_xlate[128];
+
+#define kbd_setkeycode			pckbd_setkeycode
+#define kbd_getkeycode			pckbd_getkeycode
+#define kbd_pretranslate		pckbd_pretranslate
+#define kbd_translate(sc, kcp, ufp, rm) ({ *ufp = sc & 0200; \
+		pckbd_translate(sc & 0x7f, kcp, rm);})
+
+#define kbd_unexpected_up		pckbd_unexpected_up
+#define kbd_leds			pckbd_leds
+#define kbd_init_hw()			\
+		do { if (machine_is_cats()) pckbd_init_hw(); } while (0)
+#define kbd_sysrq_xlate			pckbd_sysrq_xlate
+#define kbd_disable_irq()
+#define kbd_enable_irq()
+
+#define SYSRQ_KEY	0x54
+
+#else
+
+/* Dummy keyboard definitions */
 
 #define kbd_setkeycode(sc,kc)		(-EINVAL)
 #define kbd_getkeycode(sc)		(-EINVAL)
@@ -35,3 +67,6 @@
 #define kbd_disable_irq()
 #define kbd_enable_irq()
 
+#define SYSRQ_KEY	13
+
+#endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov