diff options
author | Tim Wawrzynczak <twawrzynczak@google.com> | 2019-12-25 19:14:30 +1100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-12-27 08:58:47 +0000 |
commit | 0d9fb55ae2e9e7d83bcfbcec70e5e3e1f58a62ca (patch) | |
tree | 7d114a459b90b7ead8ada023b61a90758ce6181b /src/ec/google/chromeec | |
parent | f07d7dc2fdd71b3f8b5fd9cbde57068a98a9e602 (diff) | |
download | coreboot-0d9fb55ae2e9e7d83bcfbcec70e5e3e1f58a62ca.tar.xz |
ec/google: Fix wedging AP on early ec sw sync
If the EC doesn't support the EARLY_EC_SYNC we don't properly set power
limits to reasonable defaults and can wedge the AP by browning out at
the end of vboot.
BRANCH=none
BUG=b:146165519
TEST=./util/abuild/abuild -p none -t google/hatch -x -a
Change-Id: I4e683e5a1c5b453b3742a12a519cad9069e8b7f7
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37930
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/ec/google/chromeec')
-rw-r--r-- | src/ec/google/chromeec/ec.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c index 5dff16252b..de43eb5b74 100644 --- a/src/ec/google/chromeec/ec.c +++ b/src/ec/google/chromeec/ec.c @@ -757,12 +757,17 @@ int google_chromeec_read_limit_power_request(int *limit_power) .cmd_data_out = &resp, .cmd_dev_index = 0, }; + int rv; - if (google_chromeec_command(&cmd)) - return -1; + rv = google_chromeec_command(&cmd); + if (rv == -EC_RES_INVALID_PARAM || rv == -EC_RES_INVALID_COMMAND) { + printk(BIOS_INFO, "PARAM_LIMIT_POWER not supported by EC.\n"); + *limit_power = 0; + return 0; + } *limit_power = resp.get_param.value; - return 0; + return rv; } int google_chromeec_get_protocol_info( |