patch-2.1.51 linux/arch/mips/sni/hw-access.c

Next file: linux/arch/mips/sni/setup.c
Previous file: linux/arch/mips/sgi/kernel/setup.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.50/linux/arch/mips/sni/hw-access.c linux/arch/mips/sni/hw-access.c
@@ -5,9 +5,12 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 1996 by Ralf Baechle
+ * Copyright (C) 1996, 1997 by Ralf Baechle
+ *
+ * $Id: hw-access.c,v 1.2 1997/08/08 18:13:27 miguel Exp $
  */
 #include <linux/delay.h>
+#include <linux/kbdcntrlr.h>
 #include <linux/kernel.h>
 #include <linux/linkage.h>
 #include <linux/types.h>
@@ -15,6 +18,7 @@
 #include <asm/bootinfo.h>
 #include <asm/cachectl.h>
 #include <asm/dma.h>
+#include <asm/keyboard.h>
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mc146818rtc.h>
@@ -157,3 +161,32 @@
 	rtc_read_data,
 	rtc_write_data
 };
+
+static unsigned char sni_read_input(void)
+{
+	return inb(KBD_DATA_REG);
+}
+
+static void sni_write_output(unsigned char val)
+{
+	outb(val, KBD_DATA_REG);
+}
+
+static void sni_write_command(unsigned char val)
+{
+	outb(val, KBD_CNTL_REG);
+}
+
+static unsigned char sni_read_status(void)
+{
+	return inb(KBD_STATUS_REG);
+}
+
+void sni_rm200_keyboard_setup(void)
+{
+	kbd_read_input = sni_read_input;
+	kbd_write_output = sni_write_output;
+	kbd_write_command = sni_write_command;
+	kbd_read_status = sni_read_status;
+	request_region(0x60, 16, "keyboard");
+}

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