From a7a40a5b10b7a4ea140af7cdb7f3e6d8df5a8f01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kope=C4=87?= Date: Tue, 26 Jul 2022 13:10:36 +0200 Subject: superio/ite/common/early_serial.c: ite_kill_watchdog: set timeout to 0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set the watchdog timeout to 0 in ite_kill_watchdog, as in some ITE models it is set to non-zero by default, activating the watchdog despite us setting the control register to 0. Based on: - "ITE IT8786E-I Preliminary Specification V0.4.1 (For D Version)" - Linux it87_wdt driver Change-Id: I1e78e2acc96e9dd0f283c5c674d3277d26cdee26 Signed-off-by: Michał Kopeć Reviewed-on: https://review.coreboot.org/c/coreboot/+/66189 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held --- src/superio/ite/common/early_serial.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/superio/ite/common/early_serial.c b/src/superio/ite/common/early_serial.c index 6b05a382e7f7..5ff403f497d6 100644 --- a/src/superio/ite/common/early_serial.c +++ b/src/superio/ite/common/early_serial.c @@ -7,12 +7,14 @@ #include "ite.h" /* Global configuration registers. */ -#define ITE_CONFIG_REG_CC 0x02 /* Configure Control (write-only). */ -#define ITE_CONFIG_REG_LDN 0x07 /* Logical Device Number. */ -#define ITE_CONFIG_REG_CLOCKSEL 0x23 /* Clock Selection. */ -#define ITE_CONFIG_REG_SWSUSP 0x24 /* Software Suspend, Flash I/F. */ -#define ITE_CONFIG_REG_MFC 0x2a /* multi function pin */ -#define ITE_CONFIG_REG_WATCHDOG 0x72 /* watchdog config */ +#define ITE_CONFIG_REG_CC 0x02 /* Configure Control (write-only). */ +#define ITE_CONFIG_REG_LDN 0x07 /* Logical Device Number. */ +#define ITE_CONFIG_REG_CLOCKSEL 0x23 /* Clock Selection. */ +#define ITE_CONFIG_REG_SWSUSP 0x24 /* Software Suspend, Flash I/F. */ +#define ITE_CONFIG_REG_MFC 0x2a /* multi function pin */ +#define ITE_CONFIG_REG_WATCHDOG 0x72 /* watchdog config */ +#define ITE_CONFIG_REG_WDT_TIMEOUT_LSB 0x73 /* watchdog timeout (LSB) */ +#define ITE_CONFIG_REG_WDT_TIMEOUT_MSB 0x74 /* watchdog timeout (MSB) */ /* Helper procedure */ static void ite_sio_write(pnp_devfn_t dev, u8 reg, u8 value) @@ -130,5 +132,7 @@ void ite_kill_watchdog(pnp_devfn_t dev) { pnp_enter_conf_state(dev); ite_sio_write(dev, ITE_CONFIG_REG_WATCHDOG, 0x00); + ite_sio_write(dev, ITE_CONFIG_REG_WDT_TIMEOUT_LSB, 0x00); + ite_sio_write(dev, ITE_CONFIG_REG_WDT_TIMEOUT_MSB, 0x00); pnp_exit_conf_state(dev); } -- cgit v1.2.3