[coreboot-gerrit] Change in coreboot[master]: chromeec platforms: Update ACPI thermal zone handler call

Martin Roth (Code Review) gerrit at coreboot.org
Mon May 7 01:16:34 CEST 2018


Martin Roth has uploaded this change for review. ( https://review.coreboot.org/26123


Change subject: chromeec platforms: Update ACPI thermal zone handler call
......................................................................

chromeec platforms: Update ACPI thermal zone handler call

Currently the throttle event handler method THRM is defined as an
extern on the intel bd82x6x and lynxpoint chipsets, then defined
again in the platform with thermal event handling.  In newer versions
of IASL, this generates an error, as the method is defined in two
places.  Simply removing the extern causes the call to it to fail on
platforms where it isn't actually defined, so add a preprocessor define
where it's implemented, and only call the method on those platforms.

Change-Id: I7af4a346496c1352ec20bda8acb338b5d277d99b
Signed-off-by: Martin Roth <martinroth at google.com>
---
M src/mainboard/google/auron/acpi/thermal.asl
M src/mainboard/google/beltino/acpi/thermal.asl
M src/mainboard/google/butterfly/acpi/thermal.asl
M src/mainboard/google/jecht/variants/guado/include/variant/acpi/thermal.asl
M src/mainboard/google/jecht/variants/jecht/include/variant/acpi/thermal.asl
M src/mainboard/google/jecht/variants/rikku/include/variant/acpi/thermal.asl
M src/mainboard/google/jecht/variants/tidus/include/variant/acpi/thermal.asl
M src/mainboard/google/link/acpi/thermal.asl
M src/mainboard/google/parrot/acpi/thermal.asl
M src/mainboard/google/slippy/acpi/thermal.asl
M src/mainboard/google/stout/acpi/thermal.asl
M src/mainboard/intel/emeraldlake2/acpi/thermal.asl
M src/mainboard/kontron/ktqm77/acpi/thermal.asl
M src/mainboard/roda/rv11/acpi/thermal.asl
M src/mainboard/samsung/lumpy/acpi/thermal.asl
M src/southbridge/intel/bd82x6x/acpi/globalnvs.asl
M src/southbridge/intel/lynxpoint/acpi/globalnvs.asl
17 files changed, 20 insertions(+), 4 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/26123/1

diff --git a/src/mainboard/google/auron/acpi/thermal.asl b/src/mainboard/google/auron/acpi/thermal.asl
index 8fc6217..16d1d45 100644
--- a/src/mainboard/google/auron/acpi/thermal.asl
+++ b/src/mainboard/google/auron/acpi/thermal.asl
@@ -17,6 +17,7 @@
 
 // Thermal Zone
 
+#define HAVE_THERMALZONE
 Scope (\_TZ)
 {
 	ThermalZone (THRM)
diff --git a/src/mainboard/google/beltino/acpi/thermal.asl b/src/mainboard/google/beltino/acpi/thermal.asl
index af36a5c..1d4eca3 100644
--- a/src/mainboard/google/beltino/acpi/thermal.asl
+++ b/src/mainboard/google/beltino/acpi/thermal.asl
@@ -17,6 +17,7 @@
 
 // Thermal Zone
 
+#define HAVE_THERMALZONE
 Scope (\_TZ)
 {
 	ThermalZone (THRM)
diff --git a/src/mainboard/google/butterfly/acpi/thermal.asl b/src/mainboard/google/butterfly/acpi/thermal.asl
index f6158ba..2faa7de 100644
--- a/src/mainboard/google/butterfly/acpi/thermal.asl
+++ b/src/mainboard/google/butterfly/acpi/thermal.asl
@@ -15,6 +15,7 @@
 
 // Thermal Zone
 
+#define HAVE_THERMALZONE
 Scope (\_TZ)
 {
 	ThermalZone (THRM)
diff --git a/src/mainboard/google/jecht/variants/guado/include/variant/acpi/thermal.asl b/src/mainboard/google/jecht/variants/guado/include/variant/acpi/thermal.asl
index 1cd1b9b..d09b491 100644
--- a/src/mainboard/google/jecht/variants/guado/include/variant/acpi/thermal.asl
+++ b/src/mainboard/google/jecht/variants/guado/include/variant/acpi/thermal.asl
@@ -17,6 +17,7 @@
 
 // Thermal Zone
 
+#define HAVE_THERMALZONE
 Scope (\_TZ)
 {
 	ThermalZone (THRM)
diff --git a/src/mainboard/google/jecht/variants/jecht/include/variant/acpi/thermal.asl b/src/mainboard/google/jecht/variants/jecht/include/variant/acpi/thermal.asl
index 1cd1b9b..d09b491 100644
--- a/src/mainboard/google/jecht/variants/jecht/include/variant/acpi/thermal.asl
+++ b/src/mainboard/google/jecht/variants/jecht/include/variant/acpi/thermal.asl
@@ -17,6 +17,7 @@
 
 // Thermal Zone
 
+#define HAVE_THERMALZONE
 Scope (\_TZ)
 {
 	ThermalZone (THRM)
diff --git a/src/mainboard/google/jecht/variants/rikku/include/variant/acpi/thermal.asl b/src/mainboard/google/jecht/variants/rikku/include/variant/acpi/thermal.asl
index 151ac51..7bf7155 100644
--- a/src/mainboard/google/jecht/variants/rikku/include/variant/acpi/thermal.asl
+++ b/src/mainboard/google/jecht/variants/rikku/include/variant/acpi/thermal.asl
@@ -17,6 +17,7 @@
 
 // Thermal Zone
 
+#define HAVE_THERMALZONE
 Scope (\_TZ)
 {
 	ThermalZone (THRM)
diff --git a/src/mainboard/google/jecht/variants/tidus/include/variant/acpi/thermal.asl b/src/mainboard/google/jecht/variants/tidus/include/variant/acpi/thermal.asl
index 78e7bf7..177d75e 100644
--- a/src/mainboard/google/jecht/variants/tidus/include/variant/acpi/thermal.asl
+++ b/src/mainboard/google/jecht/variants/tidus/include/variant/acpi/thermal.asl
@@ -17,6 +17,7 @@
 
 // Thermal Zone
 
+#define HAVE_THERMALZONE
 Scope (\_TZ)
 {
 	ThermalZone (THRM)
diff --git a/src/mainboard/google/link/acpi/thermal.asl b/src/mainboard/google/link/acpi/thermal.asl
index 9163493..e0d25e7 100644
--- a/src/mainboard/google/link/acpi/thermal.asl
+++ b/src/mainboard/google/link/acpi/thermal.asl
@@ -15,6 +15,7 @@
 
 // Thermal Zone
 
+#define HAVE_THERMALZONE
 Scope (\_TZ)
 {
 	ThermalZone (CRIT)
diff --git a/src/mainboard/google/parrot/acpi/thermal.asl b/src/mainboard/google/parrot/acpi/thermal.asl
index 98aa52d..38fe15f 100644
--- a/src/mainboard/google/parrot/acpi/thermal.asl
+++ b/src/mainboard/google/parrot/acpi/thermal.asl
@@ -15,6 +15,7 @@
 
 // Thermal Zone
 
+#define HAVE_THERMALZONE
 Scope (\_TZ)
 {
 	ThermalZone (THRM)
diff --git a/src/mainboard/google/slippy/acpi/thermal.asl b/src/mainboard/google/slippy/acpi/thermal.asl
index 1b96944..d6f1c6d 100644
--- a/src/mainboard/google/slippy/acpi/thermal.asl
+++ b/src/mainboard/google/slippy/acpi/thermal.asl
@@ -15,6 +15,7 @@
 
 // Thermal Zone
 
+#define HAVE_THERMALZONE
 #define HAVE_THROTTLING_HANDLER
 Scope (\_TZ)
 {
diff --git a/src/mainboard/google/stout/acpi/thermal.asl b/src/mainboard/google/stout/acpi/thermal.asl
index 01f6229..335f018 100644
--- a/src/mainboard/google/stout/acpi/thermal.asl
+++ b/src/mainboard/google/stout/acpi/thermal.asl
@@ -15,6 +15,7 @@
 
 // Thermal Zone
 
+#define HAVE_THERMALZONE
 Scope (\_TZ)
 {
 	ThermalZone (THRM)
diff --git a/src/mainboard/intel/emeraldlake2/acpi/thermal.asl b/src/mainboard/intel/emeraldlake2/acpi/thermal.asl
index 448cb97..b3d3824 100644
--- a/src/mainboard/intel/emeraldlake2/acpi/thermal.asl
+++ b/src/mainboard/intel/emeraldlake2/acpi/thermal.asl
@@ -15,6 +15,7 @@
 
 // Thermal Zone
 
+#define HAVE_THERMALZONE
 Scope (\_TZ)
 {
 	ThermalZone (THRM)
diff --git a/src/mainboard/kontron/ktqm77/acpi/thermal.asl b/src/mainboard/kontron/ktqm77/acpi/thermal.asl
index 0bdef14..9c1407e 100644
--- a/src/mainboard/kontron/ktqm77/acpi/thermal.asl
+++ b/src/mainboard/kontron/ktqm77/acpi/thermal.asl
@@ -16,6 +16,7 @@
 
 // Thermal Zone
 
+#define HAVE_THERMALZONE
 Scope (\_TZ)
 {
 	ThermalZone (THRM)
diff --git a/src/mainboard/roda/rv11/acpi/thermal.asl b/src/mainboard/roda/rv11/acpi/thermal.asl
index b87fc4f..a1d28e4 100644
--- a/src/mainboard/roda/rv11/acpi/thermal.asl
+++ b/src/mainboard/roda/rv11/acpi/thermal.asl
@@ -15,6 +15,7 @@
 
 // Thermal Zone
 
+#define HAVE_THERMALZONE
 Scope (\_TZ)
 {
 	// Convert from Degrees C to 1/10 Kelvin for ACPI
diff --git a/src/mainboard/samsung/lumpy/acpi/thermal.asl b/src/mainboard/samsung/lumpy/acpi/thermal.asl
index c61a3b6..10a74f3 100644
--- a/src/mainboard/samsung/lumpy/acpi/thermal.asl
+++ b/src/mainboard/samsung/lumpy/acpi/thermal.asl
@@ -15,6 +15,7 @@
 
 // Thermal Zone
 
+#define HAVE_THERMALZONE
 Scope (\_TZ)
 {
 	ThermalZone (THRM)
diff --git a/src/southbridge/intel/bd82x6x/acpi/globalnvs.asl b/src/southbridge/intel/bd82x6x/acpi/globalnvs.asl
index 2a3227d..0c58c68 100644
--- a/src/southbridge/intel/bd82x6x/acpi/globalnvs.asl
+++ b/src/southbridge/intel/bd82x6x/acpi/globalnvs.asl
@@ -233,16 +233,16 @@
 {
 	Store (Zero, \XHCI)
 }
-External (\_TZ.THRM)
-External (\_TZ.SKIN)
 
+External (\_TZ.SKIN)
 Method (TZUP)
 {
+#ifdef HAVE_THERMALZONE
 	/* Update Primary Thermal Zone */
 	If (CondRefOf (\_TZ.THRM)) {
 		Notify (\_TZ.THRM, 0x81)
 	}
-
+#endif
 	/* Update Secondary Thermal Zone */
 	If (CondRefOf (\_TZ.SKIN)) {
 		Notify (\_TZ.SKIN, 0x81)
diff --git a/src/southbridge/intel/lynxpoint/acpi/globalnvs.asl b/src/southbridge/intel/lynxpoint/acpi/globalnvs.asl
index 468c755..ba9f850 100644
--- a/src/southbridge/intel/lynxpoint/acpi/globalnvs.asl
+++ b/src/southbridge/intel/lynxpoint/acpi/globalnvs.asl
@@ -216,15 +216,16 @@
 	Store (Zero, \S33G)
 }
 
-External (\_TZ.THRM)
 External (\_TZ.SKIN)
 
 Method (TZUP)
 {
+#ifdef HAVE_THERMALZONE
 	/* Update Primary Thermal Zone */
 	If (CondRefOf (\_TZ.THRM)) {
 		Notify (\_TZ.THRM, 0x81)
 	}
+#endif
 
 	/* Update Secondary Thermal Zone */
 	If (CondRefOf (\_TZ.SKIN)) {

-- 
To view, visit https://review.coreboot.org/26123
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: I7af4a346496c1352ec20bda8acb338b5d277d99b
Gerrit-Change-Number: 26123
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180506/c798ec06/attachment-0001.html>


More information about the coreboot-gerrit mailing list