diff options
author | Marek Maslanka <mmaslanka@google.com> | 2024-01-17 14:57:36 +0000 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-01-30 13:28:39 +0000 |
commit | 06798cd53f832d5551748d892921df3132b8e659 (patch) | |
tree | 1ec70bd0fa4b179db036202ab538233f25b157ea /src/soc/intel/apollolake | |
parent | 33387eb23dc63a7382b1cb0f86c2c4ae510df153 (diff) |
soc/intel: Unify the definition of TCO registers
Move the definition of the TCO registers used in most boards to a
separate file and use it consistently. Do not unify TCO for older
incompatible platforms.
BUG=b:314260167
TEST=none
Change-Id: Id64a635d106cea879ab08aa7beca101de14b1ee6
Signed-off-by: Marek Maslanka <mmaslanka@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80005
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Jakub Czapiga <czapiga@google.com>
Diffstat (limited to 'src/soc/intel/apollolake')
-rw-r--r-- | src/soc/intel/apollolake/elog.c | 2 | ||||
-rw-r--r-- | src/soc/intel/apollolake/include/soc/smbus.h | 14 |
2 files changed, 2 insertions, 14 deletions
diff --git a/src/soc/intel/apollolake/elog.c b/src/soc/intel/apollolake/elog.c index f500b93e6d..e5e00dd410 100644 --- a/src/soc/intel/apollolake/elog.c +++ b/src/soc/intel/apollolake/elog.c @@ -76,7 +76,7 @@ static void pch_log_power_and_resets(const struct chipset_power_state *ps) /* TCO Timeout */ if (ps->prev_sleep_state != ACPI_S3 && - ps->tco1_sts & TCO_TIMEOUT) + ps->tco1_sts & TCO1_STS_TIMEOUT) elog_add_event(ELOG_TYPE_TCO_RESET); /* Power Button Override */ diff --git a/src/soc/intel/apollolake/include/soc/smbus.h b/src/soc/intel/apollolake/include/soc/smbus.h index a87211a6be..067879b004 100644 --- a/src/soc/intel/apollolake/include/soc/smbus.h +++ b/src/soc/intel/apollolake/include/soc/smbus.h @@ -3,19 +3,7 @@ #ifndef _SOC_APOLLOLAKE_SMBUS_H_ #define _SOC_APOLLOLAKE_SMBUS_H_ -/* TCO registers and fields live behind TCOBASE I/O bar in SMBus device. */ -#define TCO1_STS 0x04 -#define TCO_TIMEOUT (1 << 3) -#define TCO2_STS 0x06 -#define TCO2_STS_SECOND_TO (1 << 1) -#define TCO_INTRD_DET (1 << 0) -#define TCO1_CNT 0x08 -#define TCO_LOCK (1 << 12) -#define TCO_TMR_HLT (1 << 11) -#define TCO2_CNT 0x0A -#define TCO_INTRD_SEL_MASK (3 << 1) -#define TCO_INTRD_SEL_SMI (1 << 2) -#define TCO_INTRD_SEL_INT (1 << 1) +#include <soc/intel/common/tco.h> #define SMBUS_SLAVE_ADDR 0x24 |