From 664d585882a8c2404ab1977486c60ae12e985938 Mon Sep 17 00:00:00 2001 From: Andrey Petrov Date: Sun, 15 May 2016 22:12:35 -0700 Subject: soc/intel/apollolake: Remove hardcode for TCO watchdog timer Change-Id: Ie528b0ee3d447dcb819ccb7c0f832885da0f4257 Signed-off-by: Andrey Petrov Reviewed-on: https://review.coreboot.org/14820 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Paul Menzel --- src/soc/intel/apollolake/include/soc/pm.h | 1 + src/soc/intel/apollolake/romstage.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/soc') diff --git a/src/soc/intel/apollolake/include/soc/pm.h b/src/soc/intel/apollolake/include/soc/pm.h index fe7a4230e9..6b12886c07 100644 --- a/src/soc/intel/apollolake/include/soc/pm.h +++ b/src/soc/intel/apollolake/include/soc/pm.h @@ -89,6 +89,7 @@ #define TCO_STS 0x64 #define TCO_TIMEOUT (1 << 3) #define TCO1_CNT 0x68 +#define TCO_TMR_HLT (1 << 11) #define GPE0_REG_MAX 4 #define GPE0_REG_SIZE 32 diff --git a/src/soc/intel/apollolake/romstage.c b/src/soc/intel/apollolake/romstage.c index da537996dc..cfef483d67 100644 --- a/src/soc/intel/apollolake/romstage.c +++ b/src/soc/intel/apollolake/romstage.c @@ -94,9 +94,9 @@ static void disable_watchdog(void) uint32_t reg; /* Stop TCO timer */ - reg = inl(ACPI_PMIO_BASE + 0x68); - reg |= 1 << 11; - outl(reg, ACPI_PMIO_BASE + 0x68); + reg = inl(ACPI_PMIO_BASE + TCO1_CNT); + reg |= TCO_TMR_HLT; + outl(reg, ACPI_PMIO_BASE + TCO1_CNT); } static void migrate_power_state(int is_recovery) -- cgit v1.2.3