ec/lenovo/h8/h8: Always enable tp-smapi and thermal
Always enable tp-smapi and thermal managment. The devicetree already configures the correct values. This patch makes sure that invalid user-settings are ignored. The tp-smapi bit is required for the SMM handler. The thermal bit should be set to allow the EC to monitor thermal state of the platform. Change-Id: Ia5aa50e0b1148a7cc8e51480623368ee62edb849 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/19864 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
parent
6771645678
commit
a959a1456b
|
@ -209,21 +209,25 @@ static void h8_enable(struct device *dev)
|
||||||
{
|
{
|
||||||
struct ec_lenovo_h8_config *conf = dev->chip_info;
|
struct ec_lenovo_h8_config *conf = dev->chip_info;
|
||||||
u8 val;
|
u8 val;
|
||||||
u8 beepmask0, beepmask1, config1;
|
u8 beepmask0, beepmask1, reg8;
|
||||||
|
|
||||||
dev->ops = &h8_dev_ops;
|
dev->ops = &h8_dev_ops;
|
||||||
|
|
||||||
h8_log_ec_version();
|
h8_log_ec_version();
|
||||||
|
|
||||||
ec_write(H8_CONFIG0, conf->config0);
|
/* Always enable I/O range 0x1600-0x160f and thermal management */
|
||||||
config1 = conf->config1;
|
reg8 = conf->config0;
|
||||||
|
reg8 |= H8_CONFIG0_SMM_H8_ENABLE;
|
||||||
|
reg8 |= H8_CONFIG0_TC_ENABLE;
|
||||||
|
ec_write(H8_CONFIG0, reg8);
|
||||||
|
|
||||||
|
reg8 = conf->config1;
|
||||||
if (conf->has_keyboard_backlight) {
|
if (conf->has_keyboard_backlight) {
|
||||||
if (get_option(&val, "backlight") != CB_SUCCESS)
|
if (get_option(&val, "backlight") != CB_SUCCESS)
|
||||||
val = 0; /* Both backlights. */
|
val = 0; /* Both backlights. */
|
||||||
config1 = (config1 & 0xf3) | ((val & 0x3) << 2);
|
reg8 = (reg8 & 0xf3) | ((val & 0x3) << 2);
|
||||||
}
|
}
|
||||||
ec_write(H8_CONFIG1, config1);
|
ec_write(H8_CONFIG1, reg8);
|
||||||
ec_write(H8_CONFIG2, conf->config2);
|
ec_write(H8_CONFIG2, conf->config2);
|
||||||
ec_write(H8_CONFIG3, conf->config3);
|
ec_write(H8_CONFIG3, conf->config3);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue