patch_name:	kbc_option_2420.patch
patch_version:	0.1
author:		Randy Dunlap
description:	makes keyboard controller an option in Linux 2.4.20
product:	linux
product_versions: 2.4.20
changelog:
URL:		http://www.osdl.org/archive/rddunlap/patches/
requires:	Linux 2.4.20
conflicts:
diffstat:
 Documentation/Configure.help |    6 ++++++
 arch/i386/defconfig          |    2 ++
 drivers/char/Config.in       |    2 ++
 include/asm-i386/keyboard.h  |   12 ++++++++++++
 4 files changed, 22 insertions(+)


--- ./include/asm-i386/keyboard.h%KBC	Mon Dec  2 12:15:08 2002
+++ ./include/asm-i386/keyboard.h	Tue Dec  3 16:18:56 2002
@@ -13,12 +13,17 @@
 
 #ifdef __KERNEL__
 
+#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/ioport.h>
 #include <linux/kd.h>
 #include <linux/pm.h>
 #include <asm/io.h>
 
+#ifndef CONFIG_PSKEYBOARD
+#define kbd_controller_present()	0
+#endif
+
 #define KEYBOARD_IRQ			1
 #define DISABLE_KBD_DURING_INTERRUPTS	0
 
@@ -49,10 +54,17 @@
                                              "keyboard", NULL)
 
 /* How to access the keyboard macros on this platform.  */
+#ifdef CONFIG_PSKEYBOARD
 #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)
+#else
+#define kbd_read_input()	0
+#define kbd_read_status()	0
+#define kbd_write_output(val)
+#define kbd_write_command(val)
+#endif
 
 /* Some stoneage hardware needs delays after some operations.  */
 #define kbd_pause() do { } while(0)
--- ./drivers/char/Config.in%KBC	Thu Nov 28 15:53:12 2002
+++ ./drivers/char/Config.in	Tue Dec  3 14:30:01 2002
@@ -155,6 +155,8 @@
 
 source drivers/i2c/Config.in
 
+bool 'PS/2 keyboard support (Off = EXPERIMENTAL)' CONFIG_PSKEYBOARD $CONFIG_EXPERIMENTAL
+
 mainmenu_option next_comment
 comment 'Mice'
 tristate 'Bus Mouse Support' CONFIG_BUSMOUSE
--- ./arch/i386/defconfig%KBC	Thu Nov 28 15:53:09 2002
+++ ./arch/i386/defconfig	Tue Dec  3 14:37:50 2002
@@ -559,6 +559,8 @@
 #
 # CONFIG_I2C is not set
 
+CONFIG_PSKEYBOARD=y
+
 #
 # Mice
 #
--- ./Documentation/Configure.help%KBC	Thu Nov 28 15:53:08 2002
+++ ./Documentation/Configure.help	Tue Dec  3 14:36:37 2002
@@ -17679,6 +17679,12 @@
   it as a module, say M here and read <file:Documentation/modules.txt>.
   The module will be called i2c-proc.o.
 
+PS/2 keyboard support
+CONFIG_PSKEYBOARD
+  PS/2 keyboard support is optional and can be omitted on some systems,
+  for example, some IA32 systems which use IrDA keyboards.
+  If unsure, say Y.
+
 Bus Mouse Support
 CONFIG_BUSMOUSE
   Say Y here if your machine has a bus mouse as opposed to a serial
