[coreboot-gerrit] Change in coreboot[master]: google/chromeec: Ensure \_SB.LID0 is present before using it
Martin Roth (Code Review)
gerrit at coreboot.org
Wed Mar 22 17:54:39 CET 2017
Martin Roth has submitted this change and it was merged. ( https://review.coreboot.org/18941 )
Change subject: google/chromeec: Ensure \_SB.LID0 is present before using it
......................................................................
google/chromeec: Ensure \_SB.LID0 is present before using it
Since we want to support devices that do not have a lid but still use
EC, we need to conditionally check if referencing \_SB.LID0 is valid.
BUG=b:35775024
Change-Id: I92433460ec870fb07f48e67a6dfc61e3c036a129
Signed-off-by: Furquan Shaikh <furquan at chromium.org>
Reviewed-on: https://review.coreboot.org/18941
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin at chromium.org>
Reviewed-by: Duncan Laurie <dlaurie at chromium.org>
---
M src/ec/google/chromeec/acpi/ec.asl
1 file changed, 9 insertions(+), 2 deletions(-)
Approvals:
Aaron Durbin: Looks good to me, approved
Duncan Laurie: Looks good to me, approved
build bot (Jenkins): Verified
diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl
index a40d0ac..67cee27 100644
--- a/src/ec/google/chromeec/acpi/ec.asl
+++ b/src/ec/google/chromeec/acpi/ec.asl
@@ -26,6 +26,9 @@
External (\_SB.DPTF.TCHG, DeviceObj)
#endif
External (\_SB.DPTF.TPET, MethodObj)
+#ifndef EC_ENABLE_LID_SWITCH
+External (\_SB.LID0, DeviceObj)
+#endif
Device (EC0)
{
@@ -169,7 +172,9 @@
#ifdef EC_ENABLE_LID_SWITCH
Notify (LID0, 0x80)
#else
- Notify (\_SB.LID0, 0x80)
+ If (CondRefOf (\_SB.LID0)) {
+ Notify (\_SB.LID0, 0x80)
+ }
#endif
}
@@ -181,7 +186,9 @@
#ifdef EC_ENABLE_LID_SWITCH
Notify (LID0, 0x80)
#else
- Notify (\_SB.LID0, 0x80)
+ If (CondRefOf (\_SB.LID0)) {
+ Notify (\_SB.LID0, 0x80)
+ }
#endif
}
--
To view, visit https://review.coreboot.org/18941
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I92433460ec870fb07f48e67a6dfc61e3c036a129
Gerrit-PatchSet: 5
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Furquan Shaikh <furquan at google.com>
Gerrit-Reviewer: Aaron Durbin <adurbin at chromium.org>
Gerrit-Reviewer: Duncan Laurie <dlaurie at chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan at google.com>
Gerrit-Reviewer: Martin Roth <martinroth at google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: Shelley Chen <shchen at google.com>
Gerrit-Reviewer: build bot (Jenkins)
More information about the coreboot-gerrit
mailing list