summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorTim Wawrzynczak <twawrzynczak@chromium.org>2021-11-24 09:18:44 -0700
committerFelix Held <felix-coreboot@felixheld.de>2021-11-26 11:19:32 +0000
commit40713aaa4347ba0b3fac591b8f1f5b437c6b2ca4 (patch)
treef051eefe17e989c354580e492f8d7be7b965acb5 /src/drivers
parent02cef7a4a8e6bdb8648ad1a0dfa55bfedd05aca6 (diff)
dptf: Add support for one more temperature sensor
Some boards may use more than 4 temperature sensors for DPTF thermal control, so this patch adds support for one more temperature sensor. BUG=b:207585491 Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Change-Id: Ibf9666bade23b9bb4f740c6c4df6ecf5227cfb45 Reviewed-on: https://review.coreboot.org/c/coreboot/+/59632 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> 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>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/intel/dptf/dptf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/intel/dptf/dptf.c b/src/drivers/intel/dptf/dptf.c
index c6ead0f6ed..71a25b606e 100644
--- a/src/drivers/intel/dptf/dptf.c
+++ b/src/drivers/intel/dptf/dptf.c
@@ -192,7 +192,7 @@ static void write_generic_devices(const struct drivers_intel_dptf_config *config
get_STA_value(config, DPTF_CHARGER),
platform_info);
- for (i = 0, participant = DPTF_TEMP_SENSOR_0; i < 4; ++i, ++participant) {
+ for (i = 0, participant = DPTF_TEMP_SENSOR_0; i < DPTF_MAX_TSR; ++i, ++participant) {
snprintf(name, sizeof(name), "TSR%1d", i);
dptf_write_generic_participant(name, DPTF_GENERIC_PARTICIPANT_TYPE_TSR,
NULL, get_STA_value(config, participant),
@@ -449,7 +449,7 @@ static void write_options(const struct drivers_intel_dptf_config *config)
acpigen_pop_len(); /* Scope */
/* TSR options */
- 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) {
if (is_participant_used(config, p) && (config->options.tsr[i].hysteresis ||
config->options.tsr[i].desc)) {
dptf_write_scope(p);