<p>Richard Spiegel has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/28572">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">soc/amd/stoneyridge/gpio.c: Create I2C slave reset code<br><br>AMD soc does not wait for I2C transaction to complete before executing a<br>reset. Because of this, it's possible for the reset to happen in the middle<br>of a transaction, resulting on a slave hang. There are 2 possible solutions:<br>If the slave has a reset pin connected to a GPIO pin, it can be used to<br>reset the slave, else the only solution is to bang SCL 9 times. Create code<br>that makes it easy to implement either solution.<br><br>BUG=b:114479395<br>TEST=Build and boot grunt.<br><br>Change-Id: I9a0bc00c55ecc8ec660c74794bee48302663e72b<br>Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com><br>---<br>M src/soc/amd/stoneyridge/gpio.c<br>1 file changed, 1 insertion(+), 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/72/28572/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/soc/amd/stoneyridge/gpio.c b/src/soc/amd/stoneyridge/gpio.c</span><br><span>index d846315..1da7ab4 100644</span><br><span>--- a/src/soc/amd/stoneyridge/gpio.c</span><br><span>+++ b/src/soc/amd/stoneyridge/gpio.c</span><br><span>@@ -349,7 +349,7 @@</span><br><span>         }</span><br><span> </span><br><span>        remain = 1; /* at least 1 pin needs to be toggled */</span><br><span style="color: hsl(0, 100%, 40%);">-    while(remain) {</span><br><span style="color: hsl(120, 100%, 40%);">+       while (remain) {</span><br><span>             for (i = 0; i < j; i++) {</span><br><span>                         if (control_table[i].count) {</span><br><span>                                reg32 = read32(control_table[i].ptr);</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/28572">change 28572</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/28572"/><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: I9a0bc00c55ecc8ec660c74794bee48302663e72b </div>
<div style="display:none"> Gerrit-Change-Number: 28572 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Richard Spiegel <richard.spiegel@silverbackltd.com> </div>