lkml.org 
[lkml]   [2002]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Re: pc_keyb.c #define kbd_controller_present()

Hi,

Nat Ersoz wrote a couple of weeks back about systems that he has
without PS/2 (or AT) keyboards attached, and he mentioned a possible
solution. I have done a minimal implementation of that solution
for 2.4.20. Nat has tested it on a system with an IR keyboard and is
ready to ship it. :) I have tested it on a system with a USB
keyboard. Both of these systems have a PS/2 keyboard controller
on them but no PS/2 keyboard attached.

I know that 2.5 has a different solution for this, but this is
now available for 2.4 for anyone who needs it.
This introduces CONFIG_PSKEYBOARD for i386, which defaults to Yes/ON,
so you'll need to disablel this option to use/test it, and it's
marked Experimental, so you'll need to enable Experimental also.

This eliminates some keyboard timeouts and messages such as:
| keyboard: Timeout - AT keyboard not present?(ed)
| keyboard: Timeout - AT keyboard not present?(f4)
| "pc_keyb: controller jammed 0xFF"
and it makes booting faster on systems that were experiencing
such keyboard timeouts.

Comments?

--
~Randy


On 4 Dec 2002, Nat Ersoz wrote:

| That worked for me. Thanks for taking the initiative on this! I used it
| to patch both the 2.4.19 and 2.4.20 kernels without errors. This looks
| good to me. Ship it!
|
| Nat


--- ./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
\
 
 \ /
  Last update: 2005-03-22 13:31    [W:0.025 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site