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>
This commit is contained in:
Paul Moy 2018-09-14 15:24:23 -06:00 committed by Martin Roth
parent b7b085dc65
commit 88900dce0a
1 changed files with 5 additions and 1 deletions

View File

@ -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");
}