libpayload/i8042/keyboard: Log errors during initialization
Add error messages for all failed commands in keyboard_init(). Change-Id: Ie42ccbc4d850912c83e00376b27f192d5b652057 Signed-off-by: Furquan Shaikh <furquan@google.com> Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33446 Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
3bf4e28fb8
commit
7c369c1e45
|
@ -319,25 +319,33 @@ void keyboard_init(void)
|
|||
|
||||
/* Set scancode set 1 */
|
||||
ret = keyboard_cmd(I8042_KBCMD_SET_SCANCODE);
|
||||
if (!ret && !CONFIG(LP_PC_KEYBOARD_IGNORE_INIT_FAILURE))
|
||||
if (!ret && !CONFIG(LP_PC_KEYBOARD_IGNORE_INIT_FAILURE)) {
|
||||
printf("ERROR: Keyboard set scancode failed!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
ret = keyboard_cmd(I8042_SCANCODE_SET_1);
|
||||
if (!ret && !CONFIG(LP_PC_KEYBOARD_IGNORE_INIT_FAILURE))
|
||||
if (!ret && !CONFIG(LP_PC_KEYBOARD_IGNORE_INIT_FAILURE)) {
|
||||
printf("ERROR: Keyboard scancode set#1 failed!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set default parameters.
|
||||
* Fix for broken QEMU ps/2 make scancodes.
|
||||
*/
|
||||
ret = keyboard_cmd(0xf6);
|
||||
if (!ret)
|
||||
if (!ret) {
|
||||
printf("ERROR: Keyboard set default params failed!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Enable scanning */
|
||||
ret = keyboard_cmd(I8042_KBCMD_EN);
|
||||
if (!ret && !CONFIG(LP_PC_KEYBOARD_IGNORE_INIT_FAILURE))
|
||||
if (!ret && !CONFIG(LP_PC_KEYBOARD_IGNORE_INIT_FAILURE)) {
|
||||
printf("ERROR: Keyboard enable scanning failed!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
console_add_input_driver(&cons);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue