<p>Furquan Shaikh has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/22080">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">soc/intel/common/block/pmc: Add new function pmc_fill_pm_reg_info<br><br>This change creates a new function pmc_fill_pm_reg_info that fills<br>chipset_power_state structure with all the PM register<br>information. On the other hand, already existing pmc_fill_power_state<br>calls into pmc_fill_pm_reg_info and then checks and returns previous<br>sleep state information. This allows caller to get all the PM register<br>information when previous sleep state is not relevant.<br><br>BUG=b:67874513<br><br>Change-Id: Idc91e4aef5379549355aceb685f7afafa6a220c5<br>Signed-off-by: Furquan Shaikh <furquan@chromium.org><br>---<br>M src/soc/intel/common/block/include/intelblocks/pmclib.h<br>M src/soc/intel/common/block/pmc/pmclib.c<br>2 files changed, 13 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/22080/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/soc/intel/common/block/include/intelblocks/pmclib.h b/src/soc/intel/common/block/include/intelblocks/pmclib.h<br>index 89c3cdc..f2301a9 100644<br>--- a/src/soc/intel/common/block/include/intelblocks/pmclib.h<br>+++ b/src/soc/intel/common/block/include/intelblocks/pmclib.h<br>@@ -148,6 +148,12 @@<br> struct chipset_power_state *pmc_get_power_state(void);<br> <br> /*<br>+ * Reads and prints ACPI specific PM registers. This function does not check the<br>+ * previous sleep state.<br>+ */<br>+void pmc_fill_pm_reg_info(struct chipset_power_state *ps);<br>+<br>+/*<br>  * Reads and prints ACPI specific PM registers which are common across<br>  * chipsets. Returns the previous sleep state which is one of ACPI_SX<br>  * values. Additionally, it also disables all GPEs after GPE_EN<br>diff --git a/src/soc/intel/common/block/pmc/pmclib.c b/src/soc/intel/common/block/pmc/pmclib.c<br>index 7bddb47..83de926 100644<br>--- a/src/soc/intel/common/block/pmc/pmclib.c<br>+++ b/src/soc/intel/common/block/pmc/pmclib.c<br>@@ -386,8 +386,7 @@<br>        }<br> }<br> <br>-/* Reads and prints ACPI specific PM registers */<br>-int pmc_fill_power_state(struct chipset_power_state *ps)<br>+void pmc_fill_pm_reg_info(struct chipset_power_state *ps)<br> {<br>       int i;<br> <br>@@ -406,6 +405,12 @@<br>       }<br> <br>  soc_fill_power_state(ps);<br>+}<br>+<br>+/* Reads and prints ACPI specific PM registers */<br>+int pmc_fill_power_state(struct chipset_power_state *ps)<br>+{<br>+  pmc_fill_pm_reg_info(ps);<br> <br>  ps->prev_sleep_state = pmc_prev_sleep_state(ps);<br>   printk(BIOS_DEBUG, "prev_sleep_state %d\n", ps->prev_sleep_state);<br></pre><p>To view, visit <a href="https://review.coreboot.org/22080">change 22080</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/22080"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Idc91e4aef5379549355aceb685f7afafa6a220c5 </div>
<div style="display:none"> Gerrit-Change-Number: 22080 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Furquan Shaikh <furquan@google.com> </div>