summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/drivers')
-rw-r--r--payloads/libpayload/drivers/i8042/keyboard.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/payloads/libpayload/drivers/i8042/keyboard.c b/payloads/libpayload/drivers/i8042/keyboard.c
index 46afdc03f0..9da3902168 100644
--- a/payloads/libpayload/drivers/i8042/keyboard.c
+++ b/payloads/libpayload/drivers/i8042/keyboard.c
@@ -374,11 +374,13 @@ void keyboard_init(void)
if (!i8042_probe() || !i8042_has_ps2())
return;
- keyboard_drain_input();
-
/* Enable first PS/2 port */
i8042_cmd(I8042_CMD_EN_KB);
+ /* Disable scanning */
+ keyboard_cmd(I8042_KBCMD_DEFAULT_DIS);
+ keyboard_drain_input();
+
i8042_set_kbd_translation(false);
if (set_scancode_set(2))
@@ -404,10 +406,9 @@ void keyboard_disconnect(void)
if (!i8042_has_ps2())
return;
- keyboard_drain_input();
-
/* Disable scanning */
keyboard_cmd(I8042_KBCMD_DEFAULT_DIS);
+ keyboard_drain_input();
/* Send keyboard disconnect command */
i8042_cmd(I8042_CMD_DIS_KB);