summaryrefslogtreecommitdiffstats
path: root/src/soc/intel/jasperlake
diff options
context:
space:
mode:
authorSubrata Banik <subratabanik@google.com>2022-02-18 00:44:15 +0530
committerFelix Held <felix-coreboot@felixheld.de>2022-03-29 13:56:04 +0000
commitaf27ac26b34216f4a188ee1738825177d469cf48 (patch)
treecf6f519b0f7379aaa6b6b058d400d951496b9c1e /src/soc/intel/jasperlake
parentd58580e0032f855b290815ed412a9d77c66f759e (diff)
downloadcoreboot-af27ac26b34216f4a188ee1738825177d469cf48.tar.gz
coreboot-af27ac26b34216f4a188ee1738825177d469cf48.tar.bz2
coreboot-af27ac26b34216f4a188ee1738825177d469cf48.zip
soc/intel: Move `pmc_clear_pmcon_sts()` into IA common code
This patch moves `pmc_clear_pmcon_sts` function into common code and remove SoC specific instances. Accessing PMC GEN_PMCON_A register differs between different Intel chipsets. Typically, there are two possible ways to perform GEN_PMCON_A register programming (like `pmc_clear_pmcon_sts()`) as: 1. Using PCI configuration space when GEN_PMCON_A is a PCI configuration register. 2. Using MMIO access when GEN_PMCON_A is a memory mapped register. SoC users to select `SOC_INTEL_MEM_MAPPED_PM_CONFIGURATION` Kconfig to perform GEN_PMCON_A register programming using PMC MMIO. BUG=b:211954778 TEST=Able to build brya. Signed-off-by: Subrata Banik <subratabanik@google.com> Change-Id: I8d15f421c128630f928a1b6a7e2840056d68d7b1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62064 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jeff Daly <jeffd@silicom-usa.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Diffstat (limited to 'src/soc/intel/jasperlake')
-rw-r--r--src/soc/intel/jasperlake/Kconfig1
-rw-r--r--src/soc/intel/jasperlake/include/soc/pm.h3
-rw-r--r--src/soc/intel/jasperlake/pmutil.c14
3 files changed, 1 insertions, 17 deletions
diff --git a/src/soc/intel/jasperlake/Kconfig b/src/soc/intel/jasperlake/Kconfig
index 48b735e8d17f..e0e0c7b60b85 100644
--- a/src/soc/intel/jasperlake/Kconfig
+++ b/src/soc/intel/jasperlake/Kconfig
@@ -60,6 +60,7 @@ config CPU_SPECIFIC_OPTIONS
select SOC_INTEL_COMMON_PCH_BASE
select SOC_INTEL_COMMON_RESET
select SOC_INTEL_CSE_SET_EOP
+ select SOC_INTEL_MEM_MAPPED_PM_CONFIGURATION
select SSE2
select SUPPORT_CPU_UCODE_IN_CBFS
select TSC_MONOTONIC_TIMER
diff --git a/src/soc/intel/jasperlake/include/soc/pm.h b/src/soc/intel/jasperlake/include/soc/pm.h
index 11d6663b74fe..eea875bf3955 100644
--- a/src/soc/intel/jasperlake/include/soc/pm.h
+++ b/src/soc/intel/jasperlake/include/soc/pm.h
@@ -155,9 +155,6 @@ uint16_t smbus_tco_regs(void);
/* Set the DISB after DRAM init */
void pmc_set_disb(void);
-/* Clear PMCON status bits */
-void pmc_clear_pmcon_sts(void);
-
/* STM Support */
uint16_t get_pmbase(void);
#endif /* !defined(__ACPI__) */
diff --git a/src/soc/intel/jasperlake/pmutil.c b/src/soc/intel/jasperlake/pmutil.c
index d9ecb6332d32..fb1aecd7fc58 100644
--- a/src/soc/intel/jasperlake/pmutil.c
+++ b/src/soc/intel/jasperlake/pmutil.c
@@ -126,20 +126,6 @@ void pmc_set_disb(void)
write8(addr, disb_val);
}
-void pmc_clear_pmcon_sts(void)
-{
- uint32_t reg_val;
- uint8_t *addr;
- addr = pmc_mmio_regs();
-
- reg_val = read32(addr + GEN_PMCON_A);
- /* Clear SUS_PWR_FLR, GBL_RST_STS, HOST_RST_STS, PWR_FLR bits
- * while retaining MS4V write-1-to-clear bit */
- reg_val &= ~(MS4V);
-
- write32((addr + GEN_PMCON_A), reg_val);
-}
-
/*
* PMC controller gets hidden from PCI bus
* during FSP-Silicon init call. Hence PWRMBASE