From 307320c23f2c1907ff6cf6fa87608d1155aba05f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Mon, 21 Nov 2022 17:27:07 +0200 Subject: sb,soc/intel: Address TCO SECOND_TO_STS name collision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Later soc/intel/common/smbus addresses TCO2_STS as a separate 16-bit register, while baytrail and braswell assumes 32-bit wide TCO1_STS to extend as TCO2_STS. In src/soc/intel/denverton_ns: #define TCO2_STS_SECOND_TO 0x02 In soc/intel/baytrail,braswell: #define SECOND_TO_STS (1 << 17) Elsewehere #define SECOND_TO_STS (1 << 1) It's expected that we remove the first (1 << 17) case and only access TCO2_STS as a separate 16-bit register. For now, use unique names to avoid confusion. Change-Id: I07cc46a9d600b2bf2f23588b26891268e9ce4de0 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/70044 Tested-by: build bot (Jenkins) Reviewed-by: Elyes Haouas Reviewed-by: Angel Pons Reviewed-by: Subrata Banik --- src/soc/intel/baytrail/elog.c | 2 +- src/soc/intel/baytrail/include/soc/pm.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/soc/intel/baytrail') diff --git a/src/soc/intel/baytrail/elog.c b/src/soc/intel/baytrail/elog.c index f732fabc0f..ecdbfca709 100644 --- a/src/soc/intel/baytrail/elog.c +++ b/src/soc/intel/baytrail/elog.c @@ -22,7 +22,7 @@ static void log_power_and_resets(const struct chipset_power_state *ps) if (ps->gen_pmcon1 & RPS) elog_add_event(ELOG_TYPE_RTC_RESET); - if (ps->tco_sts & SECOND_TO_STS) + if (ps->tco_sts & TCO1_32_STS_SECOND_TO_STS) elog_add_event(ELOG_TYPE_TCO_RESET); if (ps->pm1_sts & PRBTNOR_STS) diff --git a/src/soc/intel/baytrail/include/soc/pm.h b/src/soc/intel/baytrail/include/soc/pm.h index 1db5038673..515410594b 100644 --- a/src/soc/intel/baytrail/include/soc/pm.h +++ b/src/soc/intel/baytrail/include/soc/pm.h @@ -226,7 +226,7 @@ #if CONFIG(TCO_SPACE_NOT_YET_SPLIT) #define TCO_RLD 0x60 #define TCO_STS 0x64 -# define SECOND_TO_STS (1 << 17) +# define TCO1_32_STS_SECOND_TO_STS (1 << 17) # define TCO_TIMEOUT (1 << 3) #define TCO1_CNT 0x68 # define TCO_LOCK (1 << 12) -- cgit v1.2.3