diff options
author | Gerrit <chrome-bot@google.com> | 2012-05-04 04:55:44 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2012-05-04 04:55:44 -0700 |
commit | 0ad2f9226f9146f2360168eefdf86e09513f91b0 (patch) | |
tree | d6ec313a224df3f4c2b127500be02e6883a9c62e | |
parent | 763eb6197eb9efd0861ae3a461e3b3a76677dded (diff) | |
parent | 020d74242e3ee395dde59ea311eded37b4494839 (diff) | |
download | chrome-ec-0ad2f9226f9146f2360168eefdf86e09513f91b0.tar.gz |
Merge "Assert PROCHOT when overheated and lower fan control threshold"
-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; |