kbd: wait longer for self-test on keyboard reset
authorMathias Krause <mathias.krause@secunet.com>
Wed, 14 Dec 2011 07:40:48 +0000 (08:40 +0100)
committerPatrick Georgi <patrick@georgi-clan.de>
Wed, 21 Dec 2011 15:25:20 +0000 (16:25 +0100)
commit1c80cf04fe6ffd9508e9d142b6bff03fd7006f95
treeb45f755b48a8f073c9c37cdc7a8d963680131651
parentf154c01802992dd98227c069937f63373ef35f42
kbd: wait longer for self-test on keyboard reset

Some keyboards take pretty long to respond to a reset command, some even
delay the ACK to the command. To make the keyboard driver more robust,
increase the timeout for this special command. Also do an interface test
after the self-test to ensure the keyboard is functioning properly.

Another point is to reenable the keyboard *after* the scancode was set,
not before. We also set the system bit when enabling the keyboard
because this seems to be what older operating systems do expect.

One of the problematic keyboards, which will work with this patch
applied, is the DELL RT7D20. Without the patch an overly optimistic
operating system, read Linux 2.4, will not recognise the keyboard
because coreboot didn't fully initialize it.

Change-Id: I28c8e05bdde61f71b7de084c96bc2447c1b9575e
Signed-off-by: Mathias Krause <mathias.krause@secunet.com>
Reviewed-on: http://review.coreboot.org/486
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
src/pc80/keyboard.c