coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <console/console.h>
#include <delay.h>
#include <stddef.h>
#include <superio/hwm5_conf.h>
#include "env_ctrl.h"
#include "env_ctrl_chip.h"
Go to the source code of this file.
Functions | |
static void | extemp_force_idle_status (const u16 base) |
static void | enable_peci (const u16 base) |
static void | enable_tmpin (const u16 base, const u8 tmpin, const struct ite_ec_thermal_config *const conf) |
static void | fan_smartconfig (const u16 base, const u8 fan, const enum ite_ec_fan_mode mode, const struct ite_ec_fan_smartconfig *const conf) |
static void | enable_fan (const u16 base, const u8 fan, const struct ite_ec_fan_config *const conf) |
static void | enable_beeps (const u16 base, const struct ite_ec_config *const conf) |
void | ite_ec_init (const u16 base, const struct ite_ec_config *const conf) |
|
static |
Definition at line 250 of file env_ctrl.c.
References base, ite_ec_config::fan_beep, ITE_EC_BEEP_ENABLE, ITE_EC_BEEP_FREQ_DIV_OF_FAN, ITE_EC_BEEP_FREQ_DIV_OF_TMPIN, ITE_EC_BEEP_FREQ_DIV_OF_VIN, ITE_EC_BEEP_FREQ_DIVISOR, ITE_EC_BEEP_ON_FAN_LIMIT, ITE_EC_BEEP_ON_TMP_LIMIT, ITE_EC_BEEP_ON_VIN_LIMIT, ITE_EC_BEEP_TONE_DIVISOR, pnp_read_hwm5_index(), pnp_write_hwm5_index(), ite_ec_config::tmpin_beep, and ite_ec_config::vin_beep.
Referenced by ite_ec_init().
|
static |
Definition at line 190 of file env_ctrl.c.
References base, CONFIG, FAN_IGNORE, FAN_MODE_OFF, FAN_MODE_ON, FAN_SMART_SOFTWARE, fan_smartconfig(), ITE_EC_ADC_TEMP_EXTRA_CHANNEL_ENABLE, ITE_EC_FAN_CTL_MODE, ITE_EC_FAN_CTL_ON, ITE_EC_FAN_MAIN_CTL, ITE_EC_FAN_MAIN_CTL_SMART, ITE_EC_FAN_MAIN_CTL_TAC_EN, ITE_EC_FAN_PWM_CLOCK_MASK, ITE_EC_FAN_PWM_DEFAULT_CLOCK, ITE_EC_FAN_SEC_CTL, ITE_EC_FAN_SEC_CTL_TAC_EN, ITE_EC_FAN_TAC_16BIT_ENABLE, ITE_EC_FAN_TAC_COUNTER_ENABLE, ite_ec_fan_config::mode, pnp_read_hwm5_index(), pnp_write_hwm5_index(), and ite_ec_fan_config::smart.
Referenced by ite_ec_init().
Definition at line 41 of file env_ctrl.c.
References base, ITE_EC_EXTEMP_ADDRESS, ITE_EC_EXTEMP_COMMAND, ITE_EC_EXTEMP_CONTROL, ITE_EC_EXTEMP_CTRL_AUTO_4HZ, ITE_EC_EXTEMP_CTRL_AUTO_START, ITE_EC_EXTEMP_READ_LENGTH, ITE_EC_EXTEMP_WRITE_LENGTH, ITE_EC_INTERFACE_SEL_PECI, ITE_EC_INTERFACE_SELECT, ITE_EC_INTERFACE_SPEED_TOLERANCE, PECI_CLIENT_ADDRESS, PECI_GETTEMP_COMMAND, PECI_GETTEMP_READ_LENGTH, PECI_GETTEMP_WRITE_LENGTH, and pnp_write_hwm5_index().
Referenced by enable_tmpin().
|
static |
Definition at line 60 of file env_ctrl.c.
References base, BIOS_WARNING, CONFIG, enable_peci(), ITE_EC_ADC_TEMP_CHANNEL_ENABLE, ITE_EC_ADC_TEMP_DIODE_MODE, ITE_EC_ADC_TEMP_EXT_REPORTS_TO, ITE_EC_ADC_TEMP_EXT_REPORTS_TO_MASK, ITE_EC_ADC_TEMP_EXTRA_CHANNEL_ENABLE, ITE_EC_ADC_TEMP_EXTRA_TMPIN3_EXT, ITE_EC_ADC_TEMP_RESISTOR_MODE, ITE_EC_BEEP_ENABLE, ITE_EC_CONFIGURATION, ITE_EC_CONFIGURATION_START, ITE_EC_HIGH_TEMP_LIMIT, ITE_EC_LOW_TEMP_LIMIT, ITE_EC_TEMP_ADJUST, ITE_EC_TEMP_ADJUST_WRITE_ENABLE, ite_ec_thermal_config::max, ite_ec_thermal_config::min, ite_ec_thermal_config::mode, ite_ec_thermal_config::offset, pnp_read_hwm5_index(), pnp_write_hwm5_index(), printk, THERMAL_DIODE, THERMAL_PECI, and THERMAL_RESISTOR.
Referenced by ite_ec_init().
Definition at line 11 of file env_ctrl.c.
References base, ITE_EC_EXTEMP_CONTROL, ITE_EC_EXTEMP_CTRL_AUTO_4HZ, ITE_EC_EXTEMP_CTRL_AUTO_START, ITE_EC_EXTEMP_STATUS, ITE_EC_EXTEMP_STATUS_HOST_BUSY, mdelay(), pnp_read_hwm5_index(), and pnp_write_hwm5_index().
Referenced by ite_ec_init().
|
static |
Definition at line 132 of file env_ctrl.c.
References base, ite_ec_fan_smartconfig::clsd_loop, CONFIG, FAN_SMART_SOFTWARE, ite_ec_fan_smartconfig::full_lmt, ITE_EC_FAN_CTL_AUTO_SMOOTHING_EN, ITE_EC_FAN_CTL_DELTA_TEMP, ITE_EC_FAN_CTL_DELTA_TEMP_INTRVL, ITE_EC_FAN_CTL_FULL_AT_THRML_LMT, ITE_EC_FAN_CTL_PWM_AUTO, ITE_EC_FAN_CTL_PWM_CONTROL, ITE_EC_FAN_CTL_PWM_DUTY, ITE_EC_FAN_CTL_PWM_MODE_AUTOMATIC, ITE_EC_FAN_CTL_PWM_MODE_SOFTWARE, ITE_EC_FAN_CTL_PWM_SLOPE_BIT6, ITE_EC_FAN_CTL_PWM_SLOPE_LOWER, ITE_EC_FAN_CTL_PWM_START, ITE_EC_FAN_CTL_PWM_START_DUTY, ITE_EC_FAN_CTL_PWM_START_RPM, ITE_EC_FAN_CTL_TEMP_LIMIT_FULL, ITE_EC_FAN_CTL_TEMP_LIMIT_OFF, ITE_EC_FAN_CTL_TEMP_LIMIT_START, ITE_EC_FAN_CTL_TEMPIN, ITE_EC_FAN_PWM_CLSD_LOOP, pnp_write_hwm5_index(), ite_ec_fan_smartconfig::pwm_start, ite_ec_fan_smartconfig::rpm_start, ite_ec_fan_smartconfig::slope, ite_ec_fan_smartconfig::smoothing, ite_ec_fan_smartconfig::tmp_delta, ite_ec_fan_smartconfig::tmp_full, ite_ec_fan_smartconfig::tmp_off, ite_ec_fan_smartconfig::tmp_start, and ite_ec_fan_smartconfig::tmpin.
Referenced by enable_fan().
void ite_ec_init | ( | const u16 | base, |
const struct ite_ec_config *const | conf | ||
) |
Definition at line 274 of file env_ctrl.c.
References base, enable_beeps(), enable_fan(), enable_tmpin(), extemp_force_idle_status(), ite_ec_config::fan, ITE_EC_ADC_VOLTAGE_CHANNEL_ENABLE, ITE_EC_FAN_CNT, ITE_EC_FAN_CTL_MODE, ITE_EC_FAN_CTL_POLARITY_HIGH, ITE_EC_FAN_PWM_CLOCK_MASK, ITE_EC_FAN_PWM_DEFAULT_CLOCK, ITE_EC_INTERFACE_CLOCK_24MHZ, ITE_EC_INTERFACE_SELECT, ITE_EC_INTERFACE_SMB_ENABLE, ITE_EC_TMPIN_CNT, ite_ec_thermal_config::mode, pnp_read_hwm5_index(), pnp_write_hwm5_index(), ite_ec_config::smbus_24mhz, ite_ec_config::smbus_en, THERMAL_PECI, ite_ec_config::tmpin, and ite_ec_config::vin_mask.
Referenced by init(), it8613e_init(), it8623e_init(), it8720f_init(), it8728f_init(), it8783ef_init(), and it8786e_init().