diff options
author | Kapil Porwal <kapilporwal@google.com> | 2023-07-10 11:31:59 +0000 |
---|---|---|
committer | Subrata Banik <subratabanik@google.com> | 2023-07-15 12:47:44 +0000 |
commit | 1d85464df80eaefeef06df9a74018ed93f67e19d (patch) | |
tree | 929e47620237c000d3c9810bc7d36325338284d5 /src/ec | |
parent | 9a127bf2d1f7dcb6e4dcc749e228989e46443fe4 (diff) |
ec/google/chromeec: Call `wait_for_dp_hpd` only in AP mode entry
Wait for DP/HPD flags only in AP initiated mode entry
BUG=b:247670186
TEST=Verify display over TCSS and its impact on boot time for
google/rex
Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Change-Id: I5137c346fbf1edabc60a53e0978e32f54885c330
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76369
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/ec')
-rw-r--r-- | src/ec/google/chromeec/ec.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c index ef82867e8b..a3b1fe3045 100644 --- a/src/ec/google/chromeec/ec.c +++ b/src/ec/google/chromeec/ec.c @@ -1388,6 +1388,16 @@ int google_chromeec_wait_for_dp_hpd(int port, long timeout_ms) uint8_t mux_flags; struct stopwatch sw; + if (!google_chromeec_check_feature(EC_FEATURE_TYPEC_REQUIRE_AP_MODE_ENTRY)) { + google_chromeec_usb_get_pd_mux_info(port, &mux_flags); + if (!(mux_flags & USB_PD_MUX_HPD_LVL) || !(mux_flags & USB_PD_MUX_DP_ENABLED)) { + printk(BIOS_WARNING, "DP/HPD not ready. Abort.\n"); + return -1; + } + + return 0; + } + stopwatch_init_msecs_expire(&sw, timeout_ms); do { google_chromeec_usb_get_pd_mux_info(port, &mux_flags); |