ec/google/chromeec: Support 5 temperature sensors
Some boards with the chrome EC will need to support more than 4 temperature sensors, so modify the number of TSRs supported when generating the ACPI code. Note that the EC memory map already has support for up to 16 TSRs, so no change is required on the EC side. BUG=b:207585491 TEST=with previous patch and some test data in brya0 overridetree.cb, dump the SSDT and verify that all of the existing Methods for TSR0-TSR3 are also added for TSR4, as well as all Notify, etc. Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Change-Id: Id002230bc872b0f818b0bf2b87987298189c973d Reviewed-on: https://review.coreboot.org/c/coreboot/+/59633 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
40713aaa43
commit
9234d9231b
|
@ -265,7 +265,7 @@ static void write_dppm_methods(const struct device *ec)
|
|||
|
||||
/* Local0 = ToInteger(Arg0) */
|
||||
acpigen_write_to_integer(ARG0_OP, LOCAL0_OP);
|
||||
for (p = DPTF_TEMP_SENSOR_0, i = 0; p <= DPTF_TEMP_SENSOR_3; ++p, ++i) {
|
||||
for (p = DPTF_TEMP_SENSOR_0, i = 0; p <= DPTF_TEMP_SENSOR_4; ++p, ++i) {
|
||||
snprintf(name, sizeof(name), "^TSR%1d", i);
|
||||
acpigen_write_if_lequal_op_int(LOCAL0_OP, i);
|
||||
acpigen_notify(name, THERMAL_EVENT);
|
||||
|
@ -277,7 +277,7 @@ static void write_dppm_methods(const struct device *ec)
|
|||
|
||||
/* TPET */
|
||||
acpigen_write_method("TPET", 0);
|
||||
for (p = DPTF_TEMP_SENSOR_0, i = 0; p <= DPTF_TEMP_SENSOR_3; ++p, ++i) {
|
||||
for (p = DPTF_TEMP_SENSOR_0, i = 0; p <= DPTF_TEMP_SENSOR_4; ++p, ++i) {
|
||||
snprintf(name, sizeof(name), "^TSR%1d", i);
|
||||
acpigen_notify(name, TRIP_POINTS_CHANGED_EVENT);
|
||||
}
|
||||
|
@ -355,6 +355,6 @@ void ec_fill_dptf_helpers(const struct device *ec)
|
|||
write_charger_methods(ec);
|
||||
write_fan_methods(ec);
|
||||
|
||||
for (p = DPTF_TEMP_SENSOR_0, i = 0; p <= DPTF_TEMP_SENSOR_3; ++p, ++i)
|
||||
for (p = DPTF_TEMP_SENSOR_0, i = 0; p <= DPTF_TEMP_SENSOR_4; ++p, ++i)
|
||||
write_thermal_methods(ec, p, i);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue