<p>Naresh Solanki has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/20646">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">intel/common/block/i2c: Fix clock programming of i2c<br><br>When configure i2c frequency to I2C_SPEED_FAST_PLUS, observed frequency<br>was I2C_SPEED_FAST.<br>This was due to incorrect register programming.<br><br>TEST= Build for Soraka, I2C frequency during firmware execution was<br>I2C_SPEED_FAST_PLUS when configured for I2C_SPEED_FAST_PLUS.<br><br>Change-Id: Ib0e08afe0e1b6d8c9961d5e3039b07ada9d30aa3<br>Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com><br>---<br>M src/soc/intel/common/block/i2c/lpss_i2c.c<br>1 file changed, 6 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/20646/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/soc/intel/common/block/i2c/lpss_i2c.c b/src/soc/intel/common/block/i2c/lpss_i2c.c<br>index 27c7b7f..5b188f8 100644<br>--- a/src/soc/intel/common/block/i2c/lpss_i2c.c<br>+++ b/src/soc/intel/common/block/i2c/lpss_i2c.c<br>@@ -407,12 +407,12 @@<br>       if (!config->scl_lcnt && !config->scl_hcnt && !config->sda_hold)<br>             return 0;<br> <br>- if (config->speed >= I2C_SPEED_FAST_PLUS) {<br>-            /* Fast-Plus and High speed */<br>+       if (config->speed >= I2C_SPEED_HIGH) {<br>+         /* High and Fast Ultra speed */<br>               hcnt_reg = &regs->hs_scl_hcnt;<br>                 lcnt_reg = &regs->hs_scl_lcnt;<br>         } else if (config->speed >= I2C_SPEED_FAST) {<br>-          /* Fast speed */<br>+             /* Fast and Fast-Plus speed */<br>                hcnt_reg = &regs->fs_scl_hcnt;<br>                 lcnt_reg = &regs->fs_scl_lcnt;<br>         } else {<br>@@ -590,11 +590,11 @@<br>       control = read32(&regs->control);<br>      control &= ~CONTROL_SPEED_MASK;<br> <br>-       if (speed >= I2C_SPEED_FAST_PLUS) {<br>-               /* High and Fast-Plus speed share config registers */<br>+        if (speed >= I2C_SPEED_HIGH) {<br>+            /* High and Fast-Ultra speed share config registers */<br>                control |= CONTROL_SPEED_HS;<br>  } else if (speed >= I2C_SPEED_FAST) {<br>-             /* Fast speed */<br>+             /* Fast speed and Fast-Plus */<br>                control |= CONTROL_SPEED_FS;<br>  } else {<br>              /* Standard speed */<br></pre><p>To view, visit <a href="https://review.coreboot.org/20646">change 20646</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/20646"/><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: Ib0e08afe0e1b6d8c9961d5e3039b07ada9d30aa3 </div>
<div style="display:none"> Gerrit-Change-Number: 20646 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Naresh Solanki <naresh.solanki@intel.com> </div>