<p>Shaunak Saha has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21755">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">soc/intel/common/block: Move power button SMI functions to common PMC block<br><br>This patch moves the functions update_pm1_enable and read_pm1_enable<br>to common block PMC. We rename the functions to pmc_update_pm1_enable and<br>pmc_read_pm1_enable to keep semantics consistent.<br><br>Change-Id: I9a73a6348fc22367ee2e68bf2c31823ebfefc525<br>Signed-off-by: Shaunak Saha <shaunak.saha@intel.com><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, 22 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/55/21755/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 4093599..fe0a765 100644<br>--- a/src/soc/intel/common/block/include/intelblocks/pmclib.h<br>+++ b/src/soc/intel/common/block/include/intelblocks/pmclib.h<br>@@ -42,6 +42,11 @@<br>  */<br> int soc_prev_sleep_state(const struct chipset_power_state *ps,<br>                                         int prev_sleep_state);<br>+<br>+/* PM1 */<br>+void pmc_update_pm1_enable(uint16_t events);<br>+uint16_t pmc_read_pm1_enable(void);<br>+<br> /*<br>  * Function to print, clear, and return SMI status bits in SMI_STS<br>  * register. This function internally calls pmc_reset_smi_status with<br>diff --git a/src/soc/intel/common/block/pmc/pmclib.c b/src/soc/intel/common/block/pmc/pmclib.c<br>index e741332..78b43e4 100644<br>--- a/src/soc/intel/common/block/pmc/pmclib.c<br>+++ b/src/soc/intel/common/block/pmc/pmclib.c<br>@@ -72,6 +72,23 @@<br>      return smi_sts;<br> }<br> <br>+/*<br>+ * Update supplied events in PM1_EN register. This does not disable any already<br>+ * set events.<br>+ */<br>+void pmc_update_pm1_enable(u16 events)<br>+{<br>+    u16 pm1_en = pmc_read_pm1_enable();<br>+  pm1_en |= events;<br>+    pmc_enable_pm1(pm1_en);<br>+}<br>+<br>+/* Read events set in PM1_EN register. */<br>+uint16_t pmc_read_pm1_enable(void)<br>+{<br>+  return inw(ACPI_BASE_ADDRESS + PM1_EN);<br>+}<br>+<br> uint32_t pmc_clear_smi_status(void)<br> {<br>      uint32_t sts = pmc_reset_smi_status();<br></pre><p>To view, visit <a href="https://review.coreboot.org/21755">change 21755</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/21755"/><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: I9a73a6348fc22367ee2e68bf2c31823ebfefc525 </div>
<div style="display:none"> Gerrit-Change-Number: 21755 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Shaunak Saha <shaunak.saha@intel.com> </div>