summaryrefslogtreecommitdiff
path: root/src/soc/intel/icelake
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/icelake')
-rw-r--r--src/soc/intel/icelake/Makefile.inc1
-rw-r--r--src/soc/intel/icelake/pmc.c17
-rw-r--r--src/soc/intel/icelake/pmutil.c17
3 files changed, 17 insertions, 18 deletions
diff --git a/src/soc/intel/icelake/Makefile.inc b/src/soc/intel/icelake/Makefile.inc
index a48dbbb0b4..68308cf95f 100644
--- a/src/soc/intel/icelake/Makefile.inc
+++ b/src/soc/intel/icelake/Makefile.inc
@@ -44,7 +44,6 @@ ramstage-y += me.c
smm-y += gpio.c
smm-y += p2sb.c
-smm-y += pmc.c
smm-y += pmutil.c
smm-y += smihandler.c
smm-y += uart.c
diff --git a/src/soc/intel/icelake/pmc.c b/src/soc/intel/icelake/pmc.c
index 5bd4438946..ee40fee5f2 100644
--- a/src/soc/intel/icelake/pmc.c
+++ b/src/soc/intel/icelake/pmc.c
@@ -11,23 +11,6 @@
#include <soc/pm.h>
#include <soc/soc_chip.h>
-/*
- * Set which power state system will be after reapplying
- * the power (from G3 State)
- */
-void pmc_soc_set_afterg3_en(const bool on)
-{
- uint8_t reg8;
- uint8_t *const pmcbase = pmc_mmio_regs();
-
- reg8 = read8(pmcbase + GEN_PMCON_A);
- if (on)
- reg8 &= ~SLEEP_AFTER_POWER_FAIL;
- else
- reg8 |= SLEEP_AFTER_POWER_FAIL;
- write8(pmcbase + GEN_PMCON_A, reg8);
-}
-
static void config_deep_sX(uint32_t offset, uint32_t mask, int sx, int enable)
{
uint32_t reg;
diff --git a/src/soc/intel/icelake/pmutil.c b/src/soc/intel/icelake/pmutil.c
index 894894f95b..108b919d78 100644
--- a/src/soc/intel/icelake/pmutil.c
+++ b/src/soc/intel/icelake/pmutil.c
@@ -259,3 +259,20 @@ uint16_t get_pmbase(void)
{
return (uint16_t) ACPI_BASE_ADDRESS;
}
+
+/*
+ * Set which power state system will be after reapplying
+ * the power (from G3 State)
+ */
+void pmc_soc_set_afterg3_en(const bool on)
+{
+ uint8_t reg8;
+ uint8_t *const pmcbase = pmc_mmio_regs();
+
+ reg8 = read8(pmcbase + GEN_PMCON_A);
+ if (on)
+ reg8 &= ~SLEEP_AFTER_POWER_FAIL;
+ else
+ reg8 |= SLEEP_AFTER_POWER_FAIL;
+ write8(pmcbase + GEN_PMCON_A, reg8);
+}