diff options
author | Vic Yang <victoryang@chromium.org> | 2012-05-03 19:48:51 +0800 |
---|---|---|
committer | Vic Yang <victoryang@chromium.org> | 2012-05-03 19:48:51 +0800 |
commit | 020d74242e3ee395dde59ea311eded37b4494839 (patch) | |
tree | f8905bc20f1b614b8ad53d3ed87d9e2c9ee65678 /common | |
parent | b5a8816283485c936d84f1fa13994fe3c8bb3a55 (diff) | |
download | chrome-ec-020d74242e3ee395dde59ea311eded37b4494839.tar.gz |
Assert PROCHOT when overheated and lower fan control threshold
We need to assert PROCHOT signal at/before 68 degree-C. Let's assert it
when CPU is at 68 degree-C. Also, we lower fan speed control threshold
to max fan speed at 65 degree-C.
Signed-off-by: Vic Yang <victoryang@chromium.org>
BUG=chrome-os-partner:8982
TEST=none
Change-Id: Iec0d05308b1310f89bc0a2edb1ad632c8ca96c87
Diffstat (limited to 'common')
-rw-r--r-- | common/thermal.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/common/thermal.c b/common/thermal.c index 82d547866c..5db4916b8d 100644 --- a/common/thermal.c +++ b/common/thermal.c @@ -30,11 +30,11 @@ extern const struct temp_sensor_t temp_sensors[TEMP_SENSOR_COUNT]; static struct thermal_config_t thermal_config[TEMP_SENSOR_TYPE_COUNT] = { /* TEMP_SENSOR_TYPE_CPU */ {THERMAL_CONFIG_WARNING_ON_FAIL, - {368, 383, 388, 328, 338, 348, 358, 368}}, + {341, 358, 368, 318, 323, 328, 333, 338}}, /* TEMP_SENSOR_TYPE_BOARD */ {THERMAL_CONFIG_NO_FLAG, {THERMAL_THRESHOLD_DISABLE_ALL}}, /* TEMP_SENSOR_TYPE_CASE */ - {THERMAL_CONFIG_NO_FLAG, {343, THERMAL_THRESHOLD_DISABLE, 358, + {THERMAL_CONFIG_NO_FLAG, {333, THERMAL_THRESHOLD_DISABLE, 348, THERMAL_THRESHOLD_DISABLE_ALL}}, }; @@ -100,6 +100,9 @@ static void smi_sensor_failure_warning(void) } +/* TODO: When we need different overheated action for different boards, + * move these action to board-specific file. (e.g. board_thermal.c) + */ static void overheated_action(void) { if (overheated[THRESHOLD_POWER_DOWN]) { @@ -109,11 +112,15 @@ static void overheated_action(void) if (overheated[THRESHOLD_CPU_DOWN]) x86_power_cpu_overheated(1); - else { + else x86_power_cpu_overheated(0); - if (overheated[THRESHOLD_WARNING]) - smi_overheated_warning(); + + if (overheated[THRESHOLD_WARNING]) { + smi_overheated_warning(); + gpio_set_level(GPIO_CPU_PROCHOTn, 0); } + else + gpio_set_level(GPIO_CPU_PROCHOTn, 1); if (fan_ctrl_on) { int i; |