summaryrefslogtreecommitdiff
path: root/src/soc/intel/icelake/finalize.c
diff options
context:
space:
mode:
authorSubrata Banik <subrata.banik@intel.com>2018-05-17 18:40:32 +0530
committerPatrick Georgi <pgeorgi@google.com>2019-01-10 12:18:34 +0000
commit7bc4dc5648c6ff37a847e99d7acee11e3e72a79d (patch)
treec7137be28a68c96d3711c77ef7bbd9d288d6569f /src/soc/intel/icelake/finalize.c
parente7184b0ad07b0d3fe3e2f58bacd5e10e3cd88a79 (diff)
soc/intel/common/block: Move tco common functions into block/smbus
This patch cleans soc/intel/{apl/cnl/icl/skl} by moving common soc code into common/block/smbus. BUG=b:78109109 BRANCH=NONE TEST=Build and boot KBL/CNL/APL/ICL platform. Change-Id: I34b33922cafee9f31702587e0f9c03b64f0781b8 Signed-off-by: Subrata Banik <subrata.banik@intel.com> Signed-off-by: Maulik V Vaghela <maulik.v.vaghela@intel.com> Reviewed-on: https://review.coreboot.org/c/26166 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/soc/intel/icelake/finalize.c')
-rw-r--r--src/soc/intel/icelake/finalize.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/soc/intel/icelake/finalize.c b/src/soc/intel/icelake/finalize.c
index fb78350709..a9c9ea12c3 100644
--- a/src/soc/intel/icelake/finalize.c
+++ b/src/soc/intel/icelake/finalize.c
@@ -22,6 +22,7 @@
#include <device/pci.h>
#include <intelblocks/lpc_lib.h>
#include <intelblocks/pcr.h>
+#include <intelblocks/tco.h>
#include <reg_script.h>
#include <spi-generic.h>
#include <soc/p2sb.h>
@@ -54,16 +55,12 @@ static void pch_finalize(void)
{
struct device *dev;
uint32_t reg32;
- uint16_t tcobase, tcocnt;
uint8_t *pmcbase;
config_t *config;
uint8_t reg8;
/* TCO Lock down */
- tcobase = smbus_tco_regs();
- tcocnt = inw(tcobase + TCO1_CNT);
- tcocnt |= TCO_LOCK;
- outw(tcocnt, tcobase + TCO1_CNT);
+ tco_lockdown();
/*
* Disable ACPI PM timer based on dt policy