Attention is currently required from: Patrick Rudolph. Marc Jones has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/52163 )
Change subject: soc/intel/common/block/smbus: Lock TCO base ......................................................................
soc/intel/common/block/smbus: Lock TCO base
Lock the TCO base when locking the TCO settings as indicated by the Intel documentation.
Change-Id: Ifdeae9c65e6694a36c9d1d609904a1daf181bdb1 Signed-off-by: Marc Jones marcjones@sysproconsulting.com --- M src/soc/intel/common/block/smbus/tco.c 1 file changed, 9 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/52163/1
diff --git a/src/soc/intel/common/block/smbus/tco.c b/src/soc/intel/common/block/smbus/tco.c index 8ec24b6..0ac7d1a 100644 --- a/src/soc/intel/common/block/smbus/tco.c +++ b/src/soc/intel/common/block/smbus/tco.c @@ -22,6 +22,7 @@ #define TCOBASE 0x50 #define TCOCTL 0x54 #define TCO_BASE_EN (1 << 8) +#define TCO_BASE_LOCK BIT(0)
/* Get base address of TCO I/O registers. */ static uint16_t tco_get_bar(void) @@ -49,12 +50,16 @@
void tco_lockdown(void) { - uint16_t tcocnt; + uint16_t reg;
/* TCO Lock down */ - tcocnt = tco_read_reg(TCO1_CNT); - tcocnt |= TCO_LOCK; - tco_write_reg(TCO1_CNT, tcocnt); + reg = tco_read_reg(TCO1_CNT); + reg |= TCO_LOCK; + tco_write_reg(TCO1_CNT, reg); + + reg = tco_read_reg(TCOCTL); + reg |= TCO_BASE_LOCK; + tco_write_reg(TCOCTL, reg); }
uint32_t tco_reset_status(void)