chromeec platforms: Update ACPI throttle handler call

Currently the throttle event handler method THRT is defined as an extern,
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: I6337c52edaf9350843848b31c5d87bbfca403930
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/26121
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
Martin Roth 2018-05-06 17:58:36 -05:00
parent 60e084b7d3
commit 6b1ceacb9b
2 changed files with 9 additions and 7 deletions

View File

@ -20,7 +20,6 @@
*/
// Mainboard specific throttle handler
External (\_TZ.THRT, MethodObj)
#ifdef DPTF_ENABLE_CHARGER
External (\_SB.DPTF.TCHG, DeviceObj)
#endif
@ -325,19 +324,19 @@ Device (EC0)
// Throttle Start
Method (_Q12, 0, NotSerialized)
{
#ifdef EC_ENABLE_THROTTLING_HANDLER
Store ("EC: THROTTLE START", Debug)
If (CondRefOf (\_TZ.THRT)) {
\_TZ.THRT (1)
}
\_TZ.THRT (1)
#endif
}
// Throttle Stop
Method (_Q13, 0, NotSerialized)
{
#ifdef EC_ENABLE_THROTTLING_HANDLER
Store ("EC: THROTTLE STOP", Debug)
If (CondRefOf (\_TZ.THRT)) {
\_TZ.THRT (0)
}
\_TZ.THRT (0)
#endif
}
#ifdef EC_ENABLE_PD_MCU_DEVICE

View File

@ -24,5 +24,8 @@
*/
#define EC_ENABLE_WAKE_PIN 0x69
/* Slippy variants have a throttle handler in thermal.asl */
#define EC_ENABLE_THROTTLING_HANDLER
/* ACPI code for EC functions */
#include <ec/google/chromeec/acpi/ec.asl>