chromeec platforms: Update ACPI thermal event handler call

Currently the thermal event handler method TEVT is defined as an extern,
then defined again in platforms 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: I64dcd2918d14f75ad3c356b321250bfa9d92c8a5
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/25916
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Martin Roth 2018-04-29 22:41:58 -05:00
parent 3dc02ff637
commit 15f232df08
6 changed files with 8 additions and 4 deletions

View File

@ -21,7 +21,6 @@
// Mainboard specific throttle handler
External (\_TZ.THRT, MethodObj)
External (\_SB.DPTF.TEVT, MethodObj)
#ifdef DPTF_ENABLE_CHARGER
External (\_SB.DPTF.TCHG, DeviceObj)
#endif
@ -481,9 +480,9 @@ Device (EC0)
/* When sensor ID returns 0xFF then no more events */
While (LNotEqual (Local0, EC_TEMP_SENSOR_NOT_PRESENT))
{
If (CondRefOf (\_SB.DPTF.TEVT)) {
\_SB.DPTF.TEVT (Local0)
}
#ifdef HAVE_THERM_EVENT_HANDLER
\_SB.DPTF.TEVT (Local0)
#endif
/* Keep reaading sensor ID for event */
Store (^PATI, Local0)

View File

@ -15,6 +15,7 @@
*/
/* Thermal Threshold Event Handler */
#define HAVE_THERM_EVENT_HANDLER
Method (TEVT, 1, NotSerialized)
{
Store (ToInteger (Arg0), Local0)

View File

@ -13,6 +13,7 @@
*/
/* Thermal Threshold Event Handler */
#define HAVE_THERM_EVENT_HANDLER
Method (TEVT, 1, NotSerialized)
{
Store (ToInteger (Arg0), Local0)

View File

@ -13,6 +13,7 @@
*/
/* Thermal Threshold Event Handler */
#define HAVE_THERM_EVENT_HANDLER
Method (TEVT, 1, NotSerialized)
{
Store (ToInteger (Arg0), Local0)

View File

@ -15,6 +15,7 @@
*/
/* Thermal Threshold Event Handler */
#define HAVE_THERM_EVENT_HANDLER
Method (TEVT, 1, NotSerialized)
{
Store (ToInteger (Arg0), Local0)

View File

@ -15,6 +15,7 @@
*/
/* Thermal Threshold Event Handler */
#define HAVE_THERM_EVENT_HANDLER
Method (TEVT, 1, NotSerialized)
{