diff options
author | Won Chung <wonchung@google.com> | 2022-01-25 22:22:31 +0000 |
---|---|---|
committer | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2022-01-28 03:05:59 +0000 |
commit | f6bd2788b82d5d3ade1cf5f619d422696be8cf32 (patch) | |
tree | 466dd5b9ed1df53cc5f1dbdc39e564d9bf8be919 /src | |
parent | a3f8eda8a6fecde92e02d6cbfc24b044c77cca7e (diff) |
ec/google/chromeec: Consider custom_pld when checking USB port number
Currently only PLD group is used to check USB port number. In the
future, we want to use custom PLD fields, so custom PLD should also be
considered when checking USB port number.
BUG=b:216376040
TEST=emerge-brya coreboot & SSDT dump in Brya test device
Signed-off-by: Won Chung <wonchung@google.com>
Change-Id: Id8076a2a952de61a6f38fbdecd76e991487bf696
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61387
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/ec/google/chromeec/ec_acpi.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ec/google/chromeec/ec_acpi.c b/src/ec/google/chromeec/ec_acpi.c index 9343d6d4f4..e344df098b 100644 --- a/src/ec/google/chromeec/ec_acpi.c +++ b/src/ec/google/chromeec/ec_acpi.c @@ -60,7 +60,12 @@ static void get_usb_port_references(int port_number, struct device **usb2_port, * Check for a matching port number (the 'token' field in 'group'). Note that * 'port_number' is 0-based, whereas the 'token' field is 1-based. */ - if (config->group.token != (port_number + 1)) + int group_token; + if (config->use_custom_pld) + group_token = config->custom_pld.group.token; + else + group_token = config->group.token; + if (group_token != (port_number + 1)) continue; switch (port->path.usb.port_type) { |