[PATCH 151] M68k keyboard

From: Geert Uytterhoeven
Date: Mon Mar 22 2004 - 05:08:15 EST


M68k: Add missing definitions for pc_keyb.c, which is used on Mac if the input
core is enabled (from Joshua Thompson, Ray Knight, and David D. Kilzer), and
fix up a resulting conflict with the Q40/Q60 keyboard driver.

--- linux-2.4.26-pre5/include/asm-m68k/keyboard.h 2003-08-26 12:22:41.000000000 +0200
+++ linux-m68k-2.4.26-pre5/include/asm-m68k/keyboard.h 2004-02-09 20:27:38.000000000 +0100
@@ -117,6 +117,11 @@
#define kbd_request_region()
#define kbd_request_irq(handler)

+/* How to access the keyboard macros on this platform. */
+#define kbd_read_input() in_8(KBD_DATA_REG)
+#define kbd_read_status() in_8(KBD_STATUS_REG)
+#define kbd_write_output(val) out_8(KBD_DATA_REG, val)
+#define kbd_write_command(val) out_8(KBD_CNTL_REG, val)
extern unsigned int SYSRQ_KEY;

#endif /* !CONFIG_TEKXP */
--- linux-2.4.26-pre5/drivers/char/q40_keyb.c 2002-09-13 10:16:02.000000000 +0200
+++ linux-m68k-2.4.26-pre5/drivers/char/q40_keyb.c 2004-02-27 10:09:39.000000000 +0100
@@ -400,7 +400,7 @@
#define KBD_NO_DATA (-1) /* No data */
#define KBD_BAD_DATA (-2) /* Parity or other error */

-static int __init kbd_read_input(void)
+static int __init q40kbd_read_input(void)
{
int retval = KBD_NO_DATA;
unsigned char status;
@@ -421,7 +421,7 @@
int maxread = 100; /* Random number */

do {
- if (kbd_read_input() == KBD_NO_DATA)
+ if (q40kbd_read_input() == KBD_NO_DATA)
break;
} while (--maxread);
}

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/