superio/ite/common: Add temperature limits
Add devicetree options to set temperature limits that are used to alarm user when temperature exceeds defined values. Audio alerts by superio are not implemented yet, but since limits are visible to userland, some software might use them as is. For instance, lm-sensors displays "ALERT" when temperature exceeds limits. Change-Id: I56e041fb78f518d6a9640dc2b3985459991242b9 Signed-off-by: Vagiz Tarkhanov <rakkin@autistici.org> Reviewed-on: https://review.coreboot.org/21844 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
committed by
Martin Roth
parent
17c5771530
commit
cc9c0cbc7e
@ -129,6 +129,12 @@ static void enable_tmpin(const u16 base, const u8 tmpin,
|
||||
ite_ec_write(base, ITE_EC_TEMP_ADJUST[tmpin-1], conf->offset);
|
||||
}
|
||||
|
||||
/* Set temperature limits */
|
||||
u8 max = conf->max;
|
||||
ite_ec_write(base, ITE_EC_HIGH_TEMP_LIMIT(tmpin),
|
||||
max ? max : 127);
|
||||
ite_ec_write(base, ITE_EC_LOW_TEMP_LIMIT(tmpin), conf->min);
|
||||
|
||||
/* Enable the startup of monitoring operation */
|
||||
reg = ite_ec_read(base, ITE_EC_CONFIGURATION);
|
||||
reg |= ITE_EC_CONFIGURATION_START;
|
||||
|
Reference in New Issue
Block a user