[coreboot-gerrit] Change in coreboot[master]: soc/intel/common/block/pmc: Add new function pmc_fill_pm_reg_info

Furquan Shaikh (Code Review) gerrit at coreboot.org
Wed Oct 18 01:11:41 CEST 2017


Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/22080


Change subject: soc/intel/common/block/pmc: Add new function pmc_fill_pm_reg_info
......................................................................

soc/intel/common/block/pmc: Add new function pmc_fill_pm_reg_info

This change creates a new function pmc_fill_pm_reg_info that fills
chipset_power_state structure with all the PM register
information. On the other hand, already existing pmc_fill_power_state
calls into pmc_fill_pm_reg_info and then checks and returns previous
sleep state information. This allows caller to get all the PM register
information when previous sleep state is not relevant.

BUG=b:67874513

Change-Id: Idc91e4aef5379549355aceb685f7afafa6a220c5
Signed-off-by: Furquan Shaikh <furquan at chromium.org>
---
M src/soc/intel/common/block/include/intelblocks/pmclib.h
M src/soc/intel/common/block/pmc/pmclib.c
2 files changed, 13 insertions(+), 2 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/22080/1

diff --git a/src/soc/intel/common/block/include/intelblocks/pmclib.h b/src/soc/intel/common/block/include/intelblocks/pmclib.h
index 89c3cdc..f2301a9 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 @@
 struct chipset_power_state *pmc_get_power_state(void);
 
 /*
+ * Reads 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 7bddb47..83de926 100644
--- a/src/soc/intel/common/block/pmc/pmclib.c
+++ b/src/soc/intel/common/block/pmc/pmclib.c
@@ -386,8 +386,7 @@
 	}
 }
 
-/* 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;
 
@@ -406,6 +405,12 @@
 	}
 
 	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);

-- 
To view, visit https://review.coreboot.org/22080
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc91e4aef5379549355aceb685f7afafa6a220c5
Gerrit-Change-Number: 22080
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171017/0057fdbd/attachment-0001.html>


More information about the coreboot-gerrit mailing list