<p>Werner Zeh has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/25652">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">intel/fsp_broadwell_de: Remove buggy code for SMBus clock gating<br><br>The pch_smbus_init() function contains code to enable clock gating for<br>the SMBus controller. Unfortunately this code is buggy and leads to a<br>hanging system hang which occurs as follows:<br>The clock gate register is mapped into RCBA space. After reading the<br>RCBA address from the LPC device config space no mask is applied to the<br>value (only bits 31..14 are valid while bit 0 is the enable bit). For<br>this reason the final address is off by one. The old microcodes at least<br>allowed this unaligned access to the RCBA space. With the latest<br>microcode this access leads to CPU hang.<br><br>Once this is fixed the next issue occurs: After setting the clock<br>gating bit for SMBus (bit 5) the SMBus controller disappears from the<br>PCI bus completely and hence no usage of it is possible anymore.<br><br>To fix this issue the clock gating code is completely removed as it was<br>intentionally meant to enable clock gating on the SMB_CLK line and not<br>the clock gating on the PCIe interface of the SMBus controller.<br><br>This issue is known already and was discussed on the mailinglist:<br>https://mail.coreboot.org/pipermail/coreboot/2018-January/085908.html<br><br>Change-Id: Icb86f4516f8a6e72552a44618737e682b0fdef33<br>Signed-off-by: Werner Zeh <werner.zeh@siemens.com><br>---<br>M src/soc/intel/fsp_broadwell_de/smbus.c<br>1 file changed, 0 insertions(+), 8 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/52/25652/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/soc/intel/fsp_broadwell_de/smbus.c b/src/soc/intel/fsp_broadwell_de/smbus.c</span><br><span>index 480e497..039f841 100644</span><br><span>--- a/src/soc/intel/fsp_broadwell_de/smbus.c</span><br><span>+++ b/src/soc/intel/fsp_broadwell_de/smbus.c</span><br><span>@@ -29,14 +29,6 @@</span><br><span> static void pch_smbus_init(device_t dev)</span><br><span> {</span><br><span>    struct resource *res;</span><br><span style="color: hsl(0, 100%, 40%);">-   uint32_t reg32;</span><br><span style="color: hsl(0, 100%, 40%);">- device_t lpc_dev = dev_find_slot(0, LPC_DEV_FUNC);</span><br><span style="color: hsl(0, 100%, 40%);">-      void *rcba = (void *)pci_read_config32(lpc_dev, 0xf0);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-  /* Enable clock gating */</span><br><span style="color: hsl(0, 100%, 40%);">-       reg32 =read32(rcba + 0x341c);</span><br><span style="color: hsl(0, 100%, 40%);">-   reg32 |= (1 << 5);</span><br><span style="color: hsl(0, 100%, 40%);">-        write32(rcba + 0x341c, reg32);</span><br><span> </span><br><span>   /* Set Receive Slave Address */</span><br><span>      res = find_resource(dev, PCI_BASE_ADDRESS_4);</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/25652">change 25652</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/25652"/><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: Icb86f4516f8a6e72552a44618737e682b0fdef33 </div>
<div style="display:none"> Gerrit-Change-Number: 25652 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Werner Zeh <werner.zeh@siemens.com> </div>