summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Wawrzynczak <twawrzynczak@chromium.org>2021-11-24 09:19:56 -0700
committerFelix Held <felix-coreboot@felixheld.de>2021-11-26 11:19:52 +0000
commit9234d9231b177c80281805301d4c67c8ca4d02bb (patch)
tree797e9b771e74e039ca0c9da504099e8851d3dd28 /src
parent40713aaa4347ba0b3fac591b8f1f5b437c6b2ca4 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/ec/google/chromeec/ec_dptf_helpers.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ec/google/chromeec/ec_dptf_helpers.c b/src/ec/google/chromeec/ec_dptf_helpers.c
index 631f16ebce..94b13fb5d1 100644
--- a/src/ec/google/chromeec/ec_dptf_helpers.c
+++ b/src/ec/google/chromeec/ec_dptf_helpers.c
@@ -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);
}