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>
This commit is contained in:
Duncan Laurie 2019-02-28 16:38:01 +08:00 committed by Duncan Laurie
parent 5aa0e925bc
commit 3b29acaffa
1 changed files with 4 additions and 2 deletions

View File

@ -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)