diff options
author | Duncan Laurie <dlaurie@google.com> | 2019-02-28 16:38:01 +0800 |
---|---|---|
committer | Duncan Laurie <dlaurie@chromium.org> | 2019-03-02 06:17:49 +0000 |
commit | 3b29acaffa2d26ecd6747b299660da959c624917 (patch) | |
tree | c649c666efbec7cac3b02a0b083d707efa00765f /payloads/libpayload | |
parent | 5aa0e925bc6ff359f1b7e82413fb035c5293bb1e (diff) |
libpayload: i8042: Only test PS/2 AUX port when enabled
If a PS/2 AUX device is not present then the AUX test command
during i8042_probe() will time out and add ~500ms to the boot time.
In order to avoid this only test the PS/2 AUX port if
CONFIG_LP_PC_MOUSE is enabled.
BUG=b:126633269
TEST=boot on device without AUX port and check that this command
does not get executed, saving ~500ms at boot.
Change-Id: I2ebdecc66933bd33d320b17aa4608caf4aaf54aa
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/31658
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'payloads/libpayload')
-rw-r--r-- | payloads/libpayload/drivers/i8042/i8042.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/payloads/libpayload/drivers/i8042/i8042.c b/payloads/libpayload/drivers/i8042/i8042.c index 69740d9f44..4cdd0be7ad 100644 --- a/payloads/libpayload/drivers/i8042/i8042.c +++ b/payloads/libpayload/drivers/i8042/i8042.c @@ -229,8 +229,10 @@ u8 i8042_probe(void) } /* Test secondary port */ - if (i8042_cmd_with_response(I8042_CMD_AUX_TEST) == 0) - aux_fifo = fifo_init(4 * 32); + if (IS_ENABLED(CONFIG_LP_PC_MOUSE)) { + if (i8042_cmd_with_response(I8042_CMD_AUX_TEST) == 0) + aux_fifo = fifo_init(4 * 32); + } /* Test first PS/2 port */ if (i8042_cmd_with_response(I8042_CMD_KB_TEST) == 0) |