src: Conditionally include TEVT
ACPI method TEVT is reported as unused by iASL (20190509) when ChromeEC support is not enabled. The message is “Method Argument is never used (Arg0)” on Method (TEVT, 1, NotSerialized), which indicates the TEVT method is empty. The solution is to only enable the TEVT code in mainboard or SoC when an EC is used that uses this event. The TEVT code in the EC is only enabled if the mainboard or SoC code implements TEVT. The TEVT method will be removed from the ASL code when the EC does not support TEVT. BUG=N/A TEST=Tested on facebook monolith. Change-Id: I8d2e14407ae2338e58797cdc7eb7d0cadf3cc26e Signed-off-by: Wim Vervoorn <wvervoorn@eltan.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37560 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
This commit is contained in:
parent
50a4454892
commit
9cb88a70f7
|
@ -2,3 +2,9 @@ config EC_ACPI
|
|||
bool
|
||||
help
|
||||
ACPI Embedded Controller interface. Mostly found in laptops.
|
||||
|
||||
config EC_SUPPORTS_DPTF_TEVT
|
||||
bool
|
||||
help
|
||||
The EC ASL code supports calling of TEVT method when provided by
|
||||
SoC or mainboard.
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
config EC_GOOGLE_CHROMEEC
|
||||
bool
|
||||
select EC_SUPPORTS_DPTF_TEVT
|
||||
help
|
||||
Google's Chrome EC
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ config EC_GOOGLE_WILCO
|
|||
default n
|
||||
select EC_GOOGLE_COMMON_MEC
|
||||
select EC_ACPI
|
||||
select EC_SUPPORTS_DPTF_TEVT
|
||||
help
|
||||
Google Wilco Embedded Controller interface.
|
||||
|
||||
|
|
|
@ -115,8 +115,10 @@ Method (PATX, 0, Serialized)
|
|||
/* Handle bits that are set */
|
||||
While (FindSetRightBit (Local1, Local2))
|
||||
{
|
||||
#ifdef HAVE_THERM_EVENT_HANDLER
|
||||
/* DPTF will Notify sensor devices */
|
||||
\_SB.DPTF.TEVT (Local2)
|
||||
#endif
|
||||
|
||||
/* Clear current sensor number */
|
||||
Local1 &= ~(1 << (Local2 - 1))
|
||||
|
|
|
@ -15,8 +15,6 @@
|
|||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#define HAVE_THERM_EVENT_HANDLER
|
||||
|
||||
/* Include Variant DPTF */
|
||||
#include <variant/acpi/dptf.asl>
|
||||
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
/* Thermal Threshold Event Handler */
|
||||
#define HAVE_THERM_EVENT_HANDLER
|
||||
|
||||
#if CONFIG(EC_SUPPORTS_DPTF_TEVT)
|
||||
Method (TEVT, 1, NotSerialized)
|
||||
{
|
||||
Store (ToInteger (Arg0), Local0)
|
||||
|
@ -36,6 +38,7 @@ Method (TEVT, 1, NotSerialized)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Thermal device initialization - Disable Aux Trip Points */
|
||||
Method (TINI)
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
|
||||
/* Thermal Threshold Event Handler */
|
||||
#define HAVE_THERM_EVENT_HANDLER
|
||||
|
||||
#if CONFIG(EC_SUPPORTS_DPTF_TEVT)
|
||||
Method (TEVT, 1, NotSerialized)
|
||||
{
|
||||
Store (ToInteger (Arg0), Local0)
|
||||
|
@ -34,6 +36,7 @@ Method (TEVT, 1, NotSerialized)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Thermal device initialization - Disable Aux Trip Points */
|
||||
Method (TINI)
|
||||
|
|
|
@ -15,7 +15,9 @@
|
|||
*/
|
||||
|
||||
/* Thermal Threshold Event Handler */
|
||||
#ifdef HAVE_THERM_EVENT_HANDLER
|
||||
#define HAVE_THERM_EVENT_HANDLER
|
||||
|
||||
#if CONFIG(EC_SUPPORTS_DPTF_TEVT)
|
||||
Method (TEVT, 1, NotSerialized)
|
||||
{
|
||||
Store (ToInteger (Arg0), Local0)
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
/* Thermal Threshold Event Handler */
|
||||
#define HAVE_THERM_EVENT_HANDLER
|
||||
|
||||
#if CONFIG(EC_SUPPORTS_DPTF_TEVT)
|
||||
Method (TEVT, 1, NotSerialized)
|
||||
{
|
||||
Store (ToInteger (Arg0), Local0)
|
||||
|
@ -41,6 +43,7 @@ Method (TEVT, 1, NotSerialized)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Thermal device initialization - Disable Aux Trip Points */
|
||||
Method (TINI)
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
/* Thermal Threshold Event Handler */
|
||||
#define HAVE_THERM_EVENT_HANDLER
|
||||
|
||||
#if CONFIG(EC_SUPPORTS_DPTF_TEVT)
|
||||
Method (TEVT, 1, NotSerialized)
|
||||
{
|
||||
|
||||
|
@ -40,6 +42,7 @@ Method (TEVT, 1, NotSerialized)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Thermal device initialization - Disable Aux Trip Points */
|
||||
Method (TINI)
|
||||
|
|
Loading…
Reference in New Issue