summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/common/block/include/intelblocks/pmclib.h6
-rw-r--r--src/soc/intel/common/block/pmc/pmclib.c11
2 files changed, 15 insertions, 2 deletions
diff --git a/src/soc/intel/common/block/include/intelblocks/pmclib.h b/src/soc/intel/common/block/include/intelblocks/pmclib.h
index 89c3cdcd5d..7c10926e48 100644
--- a/src/soc/intel/common/block/include/intelblocks/pmclib.h
+++ b/src/soc/intel/common/block/include/intelblocks/pmclib.h
@@ -148,6 +148,12 @@ void pmc_fixup_power_state(void);
struct chipset_power_state *pmc_get_power_state(void);
/*
+ * Reads, fills(chipset_power_state) and prints ACPI specific PM registers. This
+ * function does not check the previous sleep state.
+ */
+void pmc_fill_pm_reg_info(struct chipset_power_state *ps);
+
+/*
* Reads and prints ACPI specific PM registers which are common across
* chipsets. Returns the previous sleep state which is one of ACPI_SX
* values. Additionally, it also disables all GPEs after GPE_EN
diff --git a/src/soc/intel/common/block/pmc/pmclib.c b/src/soc/intel/common/block/pmc/pmclib.c
index 7bddb4700c..c2a6bef86e 100644
--- a/src/soc/intel/common/block/pmc/pmclib.c
+++ b/src/soc/intel/common/block/pmc/pmclib.c
@@ -386,11 +386,12 @@ void pmc_fixup_power_state(void)
}
}
-/* Reads and prints ACPI specific PM registers */
-int pmc_fill_power_state(struct chipset_power_state *ps)
+void pmc_fill_pm_reg_info(struct chipset_power_state *ps)
{
int i;
+ memset(ps, 0, sizeof(*ps));
+
ps->pm1_sts = inw(ACPI_BASE_ADDRESS + PM1_STS);
ps->pm1_en = inw(ACPI_BASE_ADDRESS + PM1_EN);
ps->pm1_cnt = inl(ACPI_BASE_ADDRESS + PM1_CNT);
@@ -406,6 +407,12 @@ int pmc_fill_power_state(struct chipset_power_state *ps)
}
soc_fill_power_state(ps);
+}
+
+/* Reads and prints ACPI specific PM registers */
+int pmc_fill_power_state(struct chipset_power_state *ps)
+{
+ pmc_fill_pm_reg_info(ps);
ps->prev_sleep_state = pmc_prev_sleep_state(ps);
printk(BIOS_DEBUG, "prev_sleep_state %d\n", ps->prev_sleep_state);