summaryrefslogtreecommitdiff
path: root/src/soc/intel/cannonlake/bootblock
diff options
context:
space:
mode:
authorSubrata Banik <subrata.banik@intel.com>2018-05-07 17:13:40 +0530
committerSubrata Banik <subrata.banik@intel.com>2018-06-28 08:35:29 +0000
commit7837c203d615fce03c6d89d99ba9a746619e49d4 (patch)
treeba3626a10a35bd99108228611b18e7f76b7abd02 /src/soc/intel/cannonlake/bootblock
parent210b351df3cc070f103feb01a40be9811af87906 (diff)
soc/intel/common/block: Move p2sb common functions into block/p2sb
This patch cleans soc/intel/{apollolake/cannonlake/skylake} by moving common soc code into common/block/p2sb. BUG=b:78109109 BRANCH=none TEST=Build and boot KBL/CNL/APL platform. Change-Id: Ie9fd933d155b3fcd0d616b41cdf042cefe2c649a Signed-off-by: Subrata Banik <subrata.banik@intel.com> Reviewed-on: https://review.coreboot.org/26132 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/soc/intel/cannonlake/bootblock')
-rw-r--r--src/soc/intel/cannonlake/bootblock/pch.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/src/soc/intel/cannonlake/bootblock/pch.c b/src/soc/intel/cannonlake/bootblock/pch.c
index dc70a4f6c7..eb67012781 100644
--- a/src/soc/intel/cannonlake/bootblock/pch.c
+++ b/src/soc/intel/cannonlake/bootblock/pch.c
@@ -18,9 +18,10 @@
#include <intelblocks/fast_spi.h>
#include <intelblocks/gspi.h>
#include <intelblocks/lpc_lib.h>
+#include <intelblocks/p2sb.h>
#include <intelblocks/pcr.h>
-#include <intelblocks/rtc.h>
#include <intelblocks/pmclib.h>
+#include <intelblocks/rtc.h>
#include <intelblocks/smbus.h>
#include <soc/bootblock.h>
#include <soc/iomap.h>
@@ -50,25 +51,6 @@
#define PCR_DMI_LPCIOD 0x2770
#define PCR_DMI_LPCIOE 0x2774
-static void enable_p2sbbar(void)
-{
- pci_devfn_t dev = PCH_DEV_P2SB;
-
- /* Enable PCR Base address in PCH */
- pci_write_config32(dev, PCI_BASE_ADDRESS_0, CONFIG_PCR_BASE_ADDRESS);
-
- /* Enable P2SB MSE */
- pci_write_config8(dev, PCI_COMMAND,
- PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY);
- /*
- * Enable decoding for HPET memory address range.
- * HPTC_OFFSET(0x60) bit 7, when set the P2SB will decode
- * the High Performance Timer memory address range
- * selected by bits 1:0
- */
- pci_write_config8(dev, HPTC_OFFSET, HPTC_ADDR_ENABLE_BIT);
-}
-
static void soc_config_pwrmbase(void)
{
uint32_t reg32;
@@ -96,7 +78,8 @@ void bootblock_pch_early_init(void)
{
fast_spi_early_init(SPI_BASE_ADDRESS);
gspi_early_bar_init();
- enable_p2sbbar();
+ p2sb_enable_bar();
+ p2sb_configure_hpet();
/*
* Enabling PWRM Base for accessing
* Global Reset Cause Register.