summaryrefslogtreecommitdiffstats
path: root/include/asm-ppc/keyboard.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-07-24 01:55:37 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-07-24 01:55:37 +0000
commite940c15ebb25269923db9a8a912727046cfffa77 (patch)
tree0e4bbd46c2d69a129bfc30bd4e1f8dce132ba64b /include/asm-ppc/keyboard.h
parent79fa43ce85955f44a4b6fd7b5134743f12c225b0 (diff)
Cleanup the architecture specifics of keyboard and PS/2 mouse drivers.
Diffstat (limited to 'include/asm-ppc/keyboard.h')
-rw-r--r--include/asm-ppc/keyboard.h33
1 files changed, 29 insertions, 4 deletions
diff --git a/include/asm-ppc/keyboard.h b/include/asm-ppc/keyboard.h
index 418476b2d..9ac4139b9 100644
--- a/include/asm-ppc/keyboard.h
+++ b/include/asm-ppc/keyboard.h
@@ -2,6 +2,8 @@
* linux/include/asm-ppc/keyboard.h
*
* Created 3 Nov 1996 by Geert Uytterhoeven
+ *
+ * $Id: keyboard.h,v 1.3 1997/07/22 23:18:19 ralf Exp $
*/
/*
@@ -13,6 +15,8 @@
#ifdef __KERNEL__
+#include <asm/io.h>
+
#define KEYBOARD_IRQ 1
#define DISABLE_KBD_DURING_INTERRUPTS 0
@@ -33,12 +37,33 @@ extern void pckbd_init_hw(void);
#define kbd_leds pckbd_leds
#define kbd_init_hw pckbd_init_hw
+/* How to access the keyboard macros on this platform. */
+#define kbd_read_input() inb(KBD_DATA_REG)
+#define kbd_read_status() inb(KBD_STATUS_REG)
+#define kbd_write_output(val) outb(val, KBD_DATA_REG)
+#define kbd_write_command(val) outb(val, KBD_CNTL_REG)
+
+/* Some stoneage hardware needs delays after some operations. */
+#define kbd_pause() do { } while(0)
+
#define INIT_KBD
-extern __inline__ void keyboard_setup()
-{
- request_region(0x60,16,"keyboard");
-}
+#define keyboard_setup() \
+ request_region(0x60, 16, "keyboard")
+
+/*
+ * Machine specific bits for the PS/2 driver
+ *
+ * FIXME: does any PPC machine use the PS/2 driver at all? If so,
+ * this should work, if not it's dead code ...
+ */
+
+#define AUX_IRQ 12
+
+#define ps2_request_irq() \
+ request_irq(AUX_IRQ, aux_interrupt, 0, "PS/2 Mouse", NULL)
+
+#define ps2_free_irq(inode) free_irq(AUX_IRQ, NULL)
#endif /* __KERNEL__ */