summaryrefslogtreecommitdiff
path: root/src/ec
diff options
context:
space:
mode:
authorPaul Moy <pmoy@chromium.org>2018-09-14 15:24:23 -0600
committerMartin Roth <martinroth@google.com>2018-09-17 16:00:04 +0000
commit88900dce0afc9cd6616c380dcef9696d1bb1c31b (patch)
tree2763c28f834ea83c1e9fa710e7ab6f8f77fb113a /src/ec
parentb7b085dc656e3977b3f5a6c9b7079c9ee996d227 (diff)
downloadcoreboot-88900dce0afc9cd6616c380dcef9696d1bb1c31b.tar.xz
ec/google/chromeec: check to see if s0ix is enabled
Make sure S0Ix is supported before trying to set up the EC's lazy wake mask. Change-Id: I78896ffe6312409c9f241b3b3224169c188bb265 Signed-off-by: Paul Moy <pmoy@chromium.org> Reviewed-on: https://review.coreboot.org/28610 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/ec')
-rw-r--r--src/ec/google/chromeec/ec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c
index 449eaf307c..09550d57b3 100644
--- a/src/ec/google/chromeec/ec.c
+++ b/src/ec/google/chromeec/ec.c
@@ -312,7 +312,11 @@ static void google_chromeec_set_lazy_wake_masks(uint64_t s5_mask,
printk(BIOS_DEBUG, "Error: Set S5 LAZY WAKE mask failed\n");
if (google_chromeec_set_s3_lazy_wake_mask(s3_mask))
printk(BIOS_DEBUG, "Error: Set S3 LAZY WAKE mask failed\n");
- if (google_chromeec_set_s0ix_lazy_wake_mask(s0ix_mask))
+ /*
+ * Make sure S0Ix is supported before trying to set up the EC's
+ * S0Ix lazy wake mask.
+ */
+ if (s0ix_mask && google_chromeec_set_s0ix_lazy_wake_mask(s0ix_mask))
printk(BIOS_DEBUG, "Error: Set S0iX LAZY WAKE mask failed\n");
}