intel bd82x6x/lynxpoint systems: Update ACPI thermal zone handler

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.

This also requires moving the thermal handler, which now includes
the define to before the gnvs asl file.

TEST=Build before and after, make sure correct code is included.

Change-Id: I7af4a346496c1352ec20bda8acb338b5d277d99b
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/26123
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Martin Roth 2018-05-06 18:13:19 -05:00
parent e36a00af71
commit a50b1f9dd0
29 changed files with 55 additions and 29 deletions

View File

@ -17,6 +17,7 @@
// Thermal Zone
#define HAVE_THERMALZONE
Scope (\_TZ)
{
ThermalZone (THRM)

View File

@ -26,6 +26,9 @@ DefinitionBlock(
// Some generic macros
#include <soc/intel/broadwell/acpi/platform.asl>
// Thermal handler
#include "acpi/thermal.asl"
// global NVS and variables
#include <soc/intel/broadwell/acpi/globalnvs.asl>
@ -43,9 +46,6 @@ DefinitionBlock(
}
}
// Thermal handler
#include "acpi/thermal.asl"
// Chrome OS specific
#include <vendorcode/google/chromeos/acpi/chromeos.asl>

View File

@ -17,6 +17,7 @@
// Thermal Zone
#define HAVE_THERMALZONE
Scope (\_TZ)
{
ThermalZone (THRM)

View File

@ -26,6 +26,9 @@ DefinitionBlock(
// Some generic macros
#include "acpi/platform.asl"
// Thermal handler
#include "acpi/thermal.asl"
// global NVS and variables
#include <southbridge/intel/lynxpoint/acpi/globalnvs.asl>
@ -45,9 +48,6 @@ DefinitionBlock(
// Mainboard devices
#include "acpi/mainboard.asl"
// Thermal handler
#include "acpi/thermal.asl"
// Chrome OS specific
#include <vendorcode/google/chromeos/acpi/chromeos.asl>

View File

@ -15,6 +15,7 @@
// Thermal Zone
#define HAVE_THERMALZONE
Scope (\_TZ)
{
ThermalZone (THRM)

View File

@ -29,14 +29,15 @@ DefinitionBlock(
#include "acpi/platform.asl"
#include "acpi/mainboard.asl"
// Thermal handler
#include "acpi/thermal.asl"
// global NVS and variables
#include <southbridge/intel/bd82x6x/acpi/globalnvs.asl>
// General Purpose Events
//#include "acpi/gpe.asl"
#include "acpi/thermal.asl"
#include <cpu/intel/model_206ax/acpi/cpu.asl>
Scope (\_SB) {

View File

@ -26,6 +26,9 @@ DefinitionBlock(
// Some generic macros
#include "acpi/platform.asl"
// Thermal handler
#include <variant/acpi/thermal.asl>
// global NVS and variables
#include <soc/intel/broadwell/acpi/globalnvs.asl>
@ -43,9 +46,6 @@ DefinitionBlock(
}
}
// Thermal handler
#include <variant/acpi/thermal.asl>
// Chrome OS specific
#include <vendorcode/google/chromeos/acpi/chromeos.asl>

View File

@ -17,6 +17,7 @@
// Thermal Zone
#define HAVE_THERMALZONE
Scope (\_TZ)
{
ThermalZone (THRM)

View File

@ -17,6 +17,7 @@
// Thermal Zone
#define HAVE_THERMALZONE
Scope (\_TZ)
{
ThermalZone (THRM)

View File

@ -17,6 +17,7 @@
// Thermal Zone
#define HAVE_THERMALZONE
Scope (\_TZ)
{
ThermalZone (THRM)

View File

@ -17,6 +17,7 @@
// Thermal Zone
#define HAVE_THERMALZONE
Scope (\_TZ)
{
ThermalZone (THRM)

View File

@ -15,6 +15,7 @@
// Thermal Zone
#define HAVE_THERMALZONE
Scope (\_TZ)
{
ThermalZone (CRIT)

View File

@ -29,13 +29,15 @@ DefinitionBlock(
#include "acpi/platform.asl"
#include "acpi/mainboard.asl"
// Thermal handler
#include "acpi/thermal.asl"
// global NVS and variables
#include <southbridge/intel/bd82x6x/acpi/globalnvs.asl>
// General Purpose Events
//#include "acpi/gpe.asl"
#include "acpi/thermal.asl"
#include <cpu/intel/model_206ax/acpi/cpu.asl>

View File

@ -15,6 +15,7 @@
// Thermal Zone
#define HAVE_THERMALZONE
Scope (\_TZ)
{
ThermalZone (THRM)

View File

@ -28,14 +28,15 @@ DefinitionBlock(
// Some generic macros
#include "acpi/platform.asl"
// Thermal handler
#include "acpi/thermal.asl"
// global NVS and variables
#include <southbridge/intel/bd82x6x/acpi/globalnvs.asl>
// General Purpose Events
//#include "acpi/gpe.asl"
#include "acpi/thermal.asl"
#include <cpu/intel/model_206ax/acpi/cpu.asl>
Scope (\_SB) {

View File

@ -15,6 +15,7 @@
// Thermal Zone
#define HAVE_THERMALZONE
Scope (\_TZ)
{
// Handler for throttle requests on this platform

View File

@ -26,6 +26,9 @@ DefinitionBlock(
// Some generic macros
#include "acpi/platform.asl"
// Thermal handler
#include "acpi/thermal.asl"
// global NVS and variables
#include <southbridge/intel/lynxpoint/acpi/globalnvs.asl>
@ -56,9 +59,6 @@ DefinitionBlock(
// Mainboard specific
#include "acpi/mainboard.asl"
// Thermal handler
#include "acpi/thermal.asl"
// Chrome OS specific
#include <vendorcode/google/chromeos/acpi/chromeos.asl>

View File

@ -15,6 +15,7 @@
// Thermal Zone
#define HAVE_THERMALZONE
Scope (\_TZ)
{
ThermalZone (THRM)

View File

@ -29,14 +29,15 @@ DefinitionBlock(
#include "acpi/platform.asl"
#include "acpi/mainboard.asl"
// Thermal handeler
#include "acpi/thermal.asl"
// global NVS and variables
#include <southbridge/intel/bd82x6x/acpi/globalnvs.asl>
// General Purpose Events
//#include "acpi/gpe.asl"
#include "acpi/thermal.asl"
#include <cpu/intel/model_206ax/acpi/cpu.asl>
Scope (\_SB) {

View File

@ -15,6 +15,7 @@
// Thermal Zone
#define HAVE_THERMALZONE
Scope (\_TZ)
{
ThermalZone (THRM)

View File

@ -28,14 +28,15 @@ DefinitionBlock(
// Some generic macros
#include "acpi/platform.asl"
// Thermal handler
#include "acpi/thermal.asl"
// global NVS and variables
#include <southbridge/intel/bd82x6x/acpi/globalnvs.asl>
// General Purpose Events
//#include "acpi/gpe.asl"
#include "acpi/thermal.asl"
#include "../../../cpu/intel/model_206ax/acpi/cpu.asl"
Scope (\_SB) {

View File

@ -16,6 +16,7 @@
// Thermal Zone
#define HAVE_THERMALZONE
Scope (\_TZ)
{
ThermalZone (THRM)

View File

@ -29,14 +29,15 @@ DefinitionBlock(
#include "acpi/platform.asl"
#include "acpi/mainboard.asl"
// Thermal Handler
#include "acpi/thermal.asl"
// global NVS and variables
#include <southbridge/intel/bd82x6x/acpi/globalnvs.asl>
// General Purpose Events
//#include "acpi/gpe.asl"
#include "acpi/thermal.asl"
#include <cpu/intel/model_206ax/acpi/cpu.asl>
Scope (\_SB) {

View File

@ -15,6 +15,7 @@
// Thermal Zone
#define HAVE_THERMALZONE
Scope (\_TZ)
{
// Convert from Degrees C to 1/10 Kelvin for ACPI

View File

@ -28,11 +28,12 @@ DefinitionBlock(
#include "acpi/platform.asl"
#include "acpi/mainboard.asl"
// Thermal handler
#include "acpi/thermal.asl"
// global NVS and variables
#include <southbridge/intel/bd82x6x/acpi/globalnvs.asl>
#include "acpi/thermal.asl"
#include "acpi/alsd.asl"
#include <cpu/intel/model_206ax/acpi/cpu.asl>

View File

@ -15,6 +15,7 @@
// Thermal Zone
#define HAVE_THERMALZONE
Scope (\_TZ)
{
ThermalZone (THRM)

View File

@ -28,6 +28,9 @@ DefinitionBlock(
// Some generic macros
#include "acpi/platform.asl"
// Thermal handler
#include "acpi/thermal.asl"
// global NVS and variables
#include <southbridge/intel/bd82x6x/acpi/globalnvs.asl>
@ -36,8 +39,6 @@ DefinitionBlock(
#include <cpu/intel/model_206ax/acpi/cpu.asl>
#include "acpi/thermal.asl"
Scope (\_SB) {
Device (PCI0)
{

View File

@ -233,15 +233,16 @@ Method (XHCD)
{
Store (Zero, \XHCI)
}
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)) {

View File

@ -216,15 +216,16 @@ Method (S3GD)
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)) {