From 88900dce0afc9cd6616c380dcef9696d1bb1c31b Mon Sep 17 00:00:00 2001 From: Paul Moy Date: Fri, 14 Sep 2018 15:24:23 -0600 Subject: 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 Reviewed-on: https://review.coreboot.org/28610 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/ec/google/chromeec/ec.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/ec/google') 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"); } -- cgit v1.2.3