summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyoung Kim <kyoung.il.kim@intel.com>2015-11-25 12:08:50 -0800
committerchrome-bot <chrome-bot@chromium.org>2015-12-03 02:22:01 -0800
commit08daf923b0f88bb356e13589b87d96a8691ed556 (patch)
tree39af889d2caf985349bd507cadee04c6ded30df5
parentd1f1e7722dac34b29a3942919cba8150e9838866 (diff)
downloadchrome-ec-08daf923b0f88bb356e13589b87d96a8691ed556.tar.gz
Fan: Allow fan at max speed during the boot time.
When none of temp sensors' temp/fan speed profile is not set(zero), thermal control will set 0% duty over initial fan speed setting. This patch allows fan under EC control at inital max speed till host's DPTF sets proper fan speed. BRANCH=master BUG=none TEST=1. check if fan is running at max speed until ChromeOS UI comes up. 2. check if fan is running when system is in recovery mode. Change-Id: I1b3e69b003ba1045779e263b25ac35b103fe457e Signed-off-by: Kyoung Kim <kyoung.il.kim@intel.com> Reviewed-on: https://chromium-review.googlesource.com/314363 Commit-Ready: Kyoung Il Kim <kyoung.il.kim@intel.com> Tested-by: Kyoung Il Kim <kyoung.il.kim@intel.com> Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r--common/thermal.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/common/thermal.c b/common/thermal.c
index 066331275f..a2563f1785 100644
--- a/common/thermal.c
+++ b/common/thermal.c
@@ -147,6 +147,7 @@ static void thermal_control(void)
int num_sensors_read;
int fmax;
int dptf_tripped;
+ int temp_fan_configured;
/* Get ready to count things */
memset(count_over, 0, sizeof(count_over));
@@ -155,6 +156,7 @@ static void thermal_control(void)
num_sensors_read = 0;
fmax = 0;
dptf_tripped = 0;
+ temp_fan_configured = 0;
/* go through all the sensors */
for (i = 0; i < TEMP_SENSOR_COUNT; ++i) {
@@ -186,6 +188,8 @@ static void thermal_control(void)
t);
if (f > fmax)
fmax = f;
+
+ temp_fan_configured = 1;
}
/* and check the dptf thresholds */
@@ -251,15 +255,17 @@ static void thermal_control(void)
throttle_ap(THROTTLE_OFF, THROTTLE_SOFT, THROTTLE_SRC_THERMAL);
}
+ if (temp_fan_configured) {
#ifdef CONFIG_FANS
/* TODO(crosbug.com/p/23797): For now, we just treat all fans the
* same. It would be better if we could assign different thermal
* profiles to each fan - in case one fan cools the CPU while another
* cools the radios or battery.
*/
- for (i = 0; i < CONFIG_FANS; i++)
- fan_set_percent_needed(i, fmax);
+ for (i = 0; i < CONFIG_FANS; i++)
+ fan_set_percent_needed(i, fmax);
#endif
+ }
/* Don't forget to signal any DPTF thresholds */
if (dptf_tripped)