summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
Diffstat (limited to 'payloads')
-rw-r--r--payloads/libpayload/Kconfig4
-rw-r--r--payloads/libpayload/drivers/i8042/keyboard.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/payloads/libpayload/Kconfig b/payloads/libpayload/Kconfig
index a79269f8f0..fd967c1a52 100644
--- a/payloads/libpayload/Kconfig
+++ b/payloads/libpayload/Kconfig
@@ -344,6 +344,10 @@ config PC_KEYBOARD
default y if ARCH_X86 # uses IO
default n
+config PC_KEYBOARD_IGNORE_INIT_FAILURE
+ bool "Ignore keyboard failures during init and always add input device"
+ default n
+
config PC_KEYBOARD_LAYOUT_US
bool "English (US) keyboard layout"
depends on PC_KEYBOARD
diff --git a/payloads/libpayload/drivers/i8042/keyboard.c b/payloads/libpayload/drivers/i8042/keyboard.c
index 062aec2bf0..a0d5b63e13 100644
--- a/payloads/libpayload/drivers/i8042/keyboard.c
+++ b/payloads/libpayload/drivers/i8042/keyboard.c
@@ -309,16 +309,16 @@ void keyboard_init(void)
/* Set scancode set 1 */
ret = keyboard_cmd(I8042_KBCMD_SET_SCANCODE);
- if (!ret)
+ if (!ret && !IS_ENABLED(CONFIG_LP_PC_KEYBOARD_IGNORE_INIT_FAILURE))
return;
ret = keyboard_cmd(I8042_SCANCODE_SET_1);
- if (!ret)
+ if (!ret && !IS_ENABLED(CONFIG_LP_PC_KEYBOARD_IGNORE_INIT_FAILURE))
return;
/* Enable scanning */
ret = keyboard_cmd(I8042_KBCMD_EN);
- if (!ret)
+ if (!ret && !IS_ENABLED(CONFIG_LP_PC_KEYBOARD_IGNORE_INIT_FAILURE))
return;
console_add_input_driver(&cons);