summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
authorEric Lai <ericr_lai@compal.corp-partner.google.com>2019-12-13 17:37:45 +0800
committerPatrick Georgi <pgeorgi@google.com>2019-12-20 17:43:17 +0000
commitb2f3698781f8a77e4d08cdde841d8a0785c3592b (patch)
treedc091185ecdbf9eabd5982ce7af627bbeed812a8 /payloads
parentfedaac84da5bcfd035e0e348150db8cf3d800726 (diff)
downloadcoreboot-b2f3698781f8a77e4d08cdde841d8a0785c3592b.tar.xz
libpayload/drivers/i8042: add error messages to i8042_probe
Print error message before error return for better debugging. Signed-off-by: Eric Lai <ericr_lai@compal.corp-partner.google.com> Change-Id: I52039dcab72c6295dfb6b887a7000a6d2bd050ee Reviewed-on: https://review.coreboot.org/c/coreboot/+/37689 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Mathew King <mathewk@chromium.org>
Diffstat (limited to 'payloads')
-rw-r--r--payloads/libpayload/drivers/i8042/i8042.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/payloads/libpayload/drivers/i8042/i8042.c b/payloads/libpayload/drivers/i8042/i8042.c
index e97fab8429..ee9f5fd405 100644
--- a/payloads/libpayload/drivers/i8042/i8042.c
+++ b/payloads/libpayload/drivers/i8042/i8042.c
@@ -197,23 +197,29 @@ u8 i8042_probe(void)
/* If 0x64 returns 0xff, then we have no keyboard
* controller */
- if (read_status() == 0xFF)
+ if (read_status() == 0xFF) {
+ printf("ERROR: No keyboard controller found!\n");
return 0;
+ }
- if (!i8042_wait_cmd_rdy())
+ if (!i8042_wait_cmd_rdy()) {
+ printf("ERROR: i8042_wait_cmd_rdy failed!\n");
return 0;
+ }
kbc_init = 1;
/* Disable first device */
if (i8042_cmd(I8042_CMD_DIS_KB) != 0) {
kbc_init = 0;
+ printf("ERROR: i8042_cmd I8042_CMD_DIS_KB failed!\n");
return 0;
}
/* Disable second device */
if (i8042_cmd(I8042_CMD_DIS_AUX) != 0) {
kbc_init = 0;
+ printf("ERROR: i8042_cmd I8042_CMD_DIS_AUX failed!\n");
return 0;
}
@@ -225,6 +231,7 @@ u8 i8042_probe(void)
if (i8042_cmd_with_response(I8042_CMD_SELF_TEST)
!= I8042_SELF_TEST_RSP) {
kbc_init = 0;
+ printf("ERROR: i8042_cmd I8042_CMD_SELF_TEST failed!\n");
return 0;
}