| 1 |
|
| 2 |
|
| 3 |
#include <console/console.h> |
| 4 |
#include <intelblocks/cfg.h> |
| 5 |
#include <intelblocks/thermal.h> |
| 6 |
|
| 7 |
|
| 8 |
uint8_t get_thermal_trip_temp(void) |
| 9 |
{ |
| 10 |
const struct soc_intel_common_config *common_config; |
| 11 |
common_config = chip_get_common_soc_structure(); |
| 12 |
|
| 13 |
return common_config->pch_thermal_trip; |
| 14 |
} |
| 15 |
|
| 16 |
|
| 17 |
uint32_t pch_get_ltt_value(void) |
| 18 |
{ |
| 19 |
uint8_t thermal_config; |
| 20 |
|
| 21 |
thermal_config = get_thermal_trip_temp(); |
| 22 |
if (!thermal_config) |
| 23 |
thermal_config = DEFAULT_TRIP_TEMP; |
| 24 |
|
| 25 |
if (thermal_config > MAX_TRIP_TEMP) |
| 26 |
die("Input PCH temp trip is higher than allowed range!"); |
| 27 |
|
| 28 |
return GET_LTT_VALUE(thermal_config); |
| 29 |
} |