Duncan Laurie merged this change.

View Change

Approvals: build bot (Jenkins): Verified Paul Menzel: Looks good to me, but someone else must approve Furquan Shaikh: Looks good to me, approved
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>
---
M payloads/libpayload/drivers/i8042/i8042.c
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/payloads/libpayload/drivers/i8042/i8042.c b/payloads/libpayload/drivers/i8042/i8042.c
index 69740d9..4cdd0be 100644
--- a/payloads/libpayload/drivers/i8042/i8042.c
+++ b/payloads/libpayload/drivers/i8042/i8042.c
@@ -229,8 +229,10 @@
}

/* 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)

To view, visit change 31658. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2ebdecc66933bd33d320b17aa4608caf4aaf54aa
Gerrit-Change-Number: 31658
Gerrit-PatchSet: 3
Gerrit-Owner: Duncan Laurie <dlaurie@chromium.org>
Gerrit-Reviewer: Duncan Laurie <dlaurie@chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan@google.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged