[coreboot-gerrit] Change in coreboot[master]: ec: check to see if s0ix is enabled

Paul Moy (Code Review) gerrit at coreboot.org
Fri Sep 14 23:28:32 CEST 2018


Paul Moy has uploaded this change for review. ( https://review.coreboot.org/28610


Change subject: ec: check to see if s0ix is enabled
......................................................................

ec: check to see if s0ix is enabled

Before trying to set the s0ix lazy wake up mask in the EC, added
a check to make sure s0ix is enabled.

Change-Id: I78896ffe6312409c9f241b3b3224169c188bb265
Signed-off-by: Paul Moy <pmoy at chromium.org>
---
M src/ec/google/chromeec/ec.c
1 file changed, 5 insertions(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/28610/1

diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c
index 449eaf3..e094e9a 100644
--- a/src/ec/google/chromeec/ec.c
+++ b/src/ec/google/chromeec/ec.c
@@ -312,7 +312,11 @@
 		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))
+	/*
+	 * Only set the s0ix lazy wake mask if the mask is nonzero. A mask
+	 * of zero means that s0ix is not enabled on the platform.
+	 */
+	if (s0ix_mask && google_chromeec_set_s0ix_lazy_wake_mask(s0ix_mask))
 		printk(BIOS_DEBUG, "Error: Set S0iX LAZY WAKE mask failed\n");
 }
 

-- 
To view, visit https://review.coreboot.org/28610
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I78896ffe6312409c9f241b3b3224169c188bb265
Gerrit-Change-Number: 28610
Gerrit-PatchSet: 1
Gerrit-Owner: Paul Moy <pmoy at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180914/61d297ad/attachment.html>


More information about the coreboot-gerrit mailing list