summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers/i8042
diff options
context:
space:
mode:
authorPatrick Rudolph <siro@das-labor.org>2018-01-16 18:59:54 +0100
committerPatrick Georgi <pgeorgi@google.com>2019-05-29 20:32:44 +0000
commita95a6bf646aee936d841f458812f2ced3a29e6f7 (patch)
tree75fb56b1b2e94c191b04216ec10e682275fea418 /payloads/libpayload/drivers/i8042
parente39db681dfd7c4127f1ac0e360e0930e72ef3ee3 (diff)
libpayload/drivers/i8402/kbd: Fix qemu
Reset keyboard controller to fix qemu make scan codes. Change-Id: I5f8ad2d4be4b9e89d9af3a62726259e77f0403c1 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/23584 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'payloads/libpayload/drivers/i8042')
-rw-r--r--payloads/libpayload/drivers/i8042/keyboard.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/i8042/keyboard.c b/payloads/libpayload/drivers/i8042/keyboard.c
index fea9e718dd..12255fb7f8 100644
--- a/payloads/libpayload/drivers/i8042/keyboard.c
+++ b/payloads/libpayload/drivers/i8042/keyboard.c
@@ -333,6 +333,14 @@ void keyboard_init(void)
if (!ret && !CONFIG(LP_PC_KEYBOARD_IGNORE_INIT_FAILURE))
return;
+ /*
+ * Set default parameters.
+ * Fix for broken QEMU ps/2 make scancodes.
+ */
+ ret = keyboard_cmd(0xf6);
+ if (!ret)
+ return;
+
/* Enable scanning */
ret = keyboard_cmd(I8042_KBCMD_EN);
if (!ret && !CONFIG(LP_PC_KEYBOARD_IGNORE_INIT_FAILURE))