<p>Furquan Shaikh has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/29005">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">soc/intel/cannonlake: Set PCIEXPWAK_DIS if WAKE# pin is not enabled<br><br>This change sets PCIEXPWAK_DIS in PM1_EN register if WAKE# pin is not<br>enabled on the platform. This is required to prevent unnecessary wakes<br>if the WAKE# pin remains not connected on the platform. Function to<br>set PCIEXPWAK_DIS gets called in normal boot path (BS_PAYLOAD_LOAD) as<br>well as S3 resume path (BS_OS_RESUME).<br><br>Change-Id: I4ab3bbba1da79dbf1790c99c611195cffbda1511<br>Signed-off-by: Furquan Shaikh <furquan@google.com><br>---<br>M src/soc/intel/cannonlake/pmc.c<br>1 file changed, 25 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/05/29005/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/soc/intel/cannonlake/pmc.c b/src/soc/intel/cannonlake/pmc.c</span><br><span>index ecd47e0..02b91cd 100644</span><br><span>--- a/src/soc/intel/cannonlake/pmc.c</span><br><span>+++ b/src/soc/intel/cannonlake/pmc.c</span><br><span>@@ -160,3 +160,28 @@</span><br><span> * allocate resources.</span><br><span> */</span><br><span> BOOT_STATE_INIT_ENTRY(BS_DEV_INIT_CHIPS, BS_ON_EXIT, pmc_init, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * Check if WAKE# pin is enabled based on DSX_EN_WAKE_PIN setting in</span><br><span style="color: hsl(120, 100%, 40%);">+ * deep_sx_config. If WAKE# pin is not enabled, then PCI Express Wake Disable</span><br><span style="color: hsl(120, 100%, 40%);">+ * bit needs to be set in PM1_EN to avoid unnecessary wakes caused by WAKE#</span><br><span style="color: hsl(120, 100%, 40%);">+ * pin.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+static void pm1_handle_wake_pin(void *unused)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+       struct device *dev = SA_DEV_ROOT;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   if (!dev || !dev->chip_info)</span><br><span style="color: hsl(120, 100%, 40%);">+               return;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     const config_t *conf = dev->chip_info;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   /* If WAKE# pin is enabled, bail out early. */</span><br><span style="color: hsl(120, 100%, 40%);">+        if (conf->deep_sx_config & DSX_EN_WAKE_PIN)</span><br><span style="color: hsl(120, 100%, 40%);">+            return;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     pmc_update_pm1_enable(PCIEXPWAK_DIS);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_LOAD, BS_ON_EXIT, pm1_handle_wake_pin, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+BOOT_STATE_INIT_ENTRY(BS_OS_RESUME, BS_ON_EXIT, pm1_handle_wake_pin, NULL);</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/29005">change 29005</a>. To unsubscribe, or for help writing mail filters, 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/29005"/><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: I4ab3bbba1da79dbf1790c99c611195cffbda1511 </div>
<div style="display:none"> Gerrit-Change-Number: 29005 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Furquan Shaikh <furquan@google.com> </div>