<p>Furquan Shaikh has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/20851">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">soc/intel/common: Allow SoC to enable UART resources<br><br>This changed provides a callback pch_uart_enable_resources that allows<br>SoC to enable UART controller if necessary. This is required to<br>workaround the issue where Linux kernel hangs on resume if serial<br>console is disabled in coreboot but enabled in kernel.<br><br>BUG=b:64030366<br><br>Change-Id: Id21447b090d8ed8c44b3b464f49ea12de58fbee2<br>Signed-off-by: Furquan Shaikh <furquan@chromium.org><br>---<br>M src/soc/intel/common/block/include/intelblocks/uart.h<br>M src/soc/intel/common/block/uart/uart.c<br>2 files changed, 13 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/51/20851/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/soc/intel/common/block/include/intelblocks/uart.h b/src/soc/intel/common/block/include/intelblocks/uart.h<br>index b46edd7..133ef75 100644<br>--- a/src/soc/intel/common/block/include/intelblocks/uart.h<br>+++ b/src/soc/intel/common/block/include/intelblocks/uart.h<br>@@ -23,5 +23,6 @@<br>                uint32_t clk_m_val, uint32_t clk_n_val);<br> <br> void pch_uart_read_resources(struct device *dev);<br>+void pch_uart_enable_resources(struct device *dev);<br> <br> #endif       /* SOC_INTEL_COMMON_BLOCK_UART_H */<br>diff --git a/src/soc/intel/common/block/uart/uart.c b/src/soc/intel/common/block/uart/uart.c<br>index 632fb95..c6e4011 100644<br>--- a/src/soc/intel/common/block/uart/uart.c<br>+++ b/src/soc/intel/common/block/uart/uart.c<br>@@ -43,10 +43,21 @@<br>     pci_dev_read_resources(dev);<br> }<br> <br>+__attribute__((weak)) void pch_uart_enable_resources(struct device *dev)<br>+{<br>+   /* Default weak implementation - does nothing. */<br>+}<br>+<br>+static void uart_common_enable_resources(struct device *dev)<br>+{<br>+  pci_dev_enable_resources(dev);<br>+       pch_uart_enable_resources(dev);<br>+}<br>+<br> static struct device_operations device_ops = {<br>       .read_resources         = &pch_uart_read_resources,<br>       .set_resources          = &pci_dev_set_resources,<br>-        .enable_resources               = &pci_dev_enable_resources,<br>+     .enable_resources               = &uart_common_enable_resources,<br> };<br> <br> static const unsigned short pci_device_ids[] = {<br></pre><p>To view, visit <a href="https://review.coreboot.org/20851">change 20851</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/20851"/><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: Id21447b090d8ed8c44b3b464f49ea12de58fbee2 </div>
<div style="display:none"> Gerrit-Change-Number: 20851 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Furquan Shaikh <furquan@google.com> </div>