From 3b29acaffa2d26ecd6747b299660da959c624917 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Thu, 28 Feb 2019 16:38:01 +0800 Subject: 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 Reviewed-on: https://review.coreboot.org/c/31658 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Furquan Shaikh --- payloads/libpayload/drivers/i8042/i8042.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'payloads') 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) -- cgit v1.2.3