ec/lenovo/h8/acpi/thermal: Don't hardcode limits
Add support for board specific critical and passive limits using GNVS table. Use default values if no board specific limit exists. * Add ACPI methods _TZP, _TSP and _PSV. * Update ACPI method _CRT to use board specific if available. Tested on Lenovo T500. Change-Id: If438a909f4415f50cd7a764fb5fba7ec29599606 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/21159 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
parent
959dfc1261
commit
9c7ce28b2f
|
@ -34,9 +34,28 @@ Scope(\_TZ)
|
|||
|
||||
ThermalZone(THM0)
|
||||
{
|
||||
/* Thermal zone polling frequency: 10 seconds */
|
||||
Name (_TZP, 100)
|
||||
|
||||
/* Thermal sampling period for passive cooling: 10 seconds */
|
||||
Name (_TSP, 100)
|
||||
|
||||
Method(_CRT, 0, NotSerialized) {
|
||||
Store (\TCRT, Local0)
|
||||
if (LGreater(Local0, Zero)) {
|
||||
Return (C2K(Local0))
|
||||
}
|
||||
Return (C2K(127))
|
||||
}
|
||||
|
||||
Method(_PSV, 0, NotSerialized) {
|
||||
Store (\TPSV, Local0)
|
||||
if (LGreater(Local0, Zero)) {
|
||||
Return (C2K(Local0))
|
||||
}
|
||||
Return (C2K(95))
|
||||
}
|
||||
|
||||
Method(_TMP) {
|
||||
#if defined (EC_LENOVO_H8_ME_WORKAROUND)
|
||||
/* Avoid tripping alarm if ME isn't booted at all yet */
|
||||
|
@ -51,6 +70,12 @@ Scope(\_TZ)
|
|||
|
||||
ThermalZone(THM1)
|
||||
{
|
||||
/* Thermal zone polling frequency: 10 seconds */
|
||||
Name (_TZP, 100)
|
||||
|
||||
/* Thermal sampling period for passive cooling: 10 seconds */
|
||||
Name (_TSP, 100)
|
||||
|
||||
Method(_CRT, 0, NotSerialized) {
|
||||
Return (C2K(99))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue