[coreboot-gerrit] Change in coreboot[master]: intel/common/block/i2c: Fix clock programming of i2c
Naresh Solanki (Code Review)
gerrit at coreboot.org
Wed Jul 19 13:54:01 CEST 2017
Naresh Solanki has uploaded this change for review. ( https://review.coreboot.org/20646
Change subject: intel/common/block/i2c: Fix clock programming of i2c
......................................................................
intel/common/block/i2c: Fix clock programming of i2c
When configure i2c frequency to I2C_SPEED_FAST_PLUS, observed frequency
was I2C_SPEED_FAST.
This was due to incorrect register programming.
TEST= Build for Soraka, I2C frequency during firmware execution was
I2C_SPEED_FAST_PLUS when configured for I2C_SPEED_FAST_PLUS.
Change-Id: Ib0e08afe0e1b6d8c9961d5e3039b07ada9d30aa3
Signed-off-by: Naresh G Solanki <naresh.solanki at intel.com>
---
M src/soc/intel/common/block/i2c/lpss_i2c.c
1 file changed, 6 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/20646/1
diff --git a/src/soc/intel/common/block/i2c/lpss_i2c.c b/src/soc/intel/common/block/i2c/lpss_i2c.c
index 27c7b7f..5b188f8 100644
--- a/src/soc/intel/common/block/i2c/lpss_i2c.c
+++ b/src/soc/intel/common/block/i2c/lpss_i2c.c
@@ -407,12 +407,12 @@
if (!config->scl_lcnt && !config->scl_hcnt && !config->sda_hold)
return 0;
- if (config->speed >= I2C_SPEED_FAST_PLUS) {
- /* Fast-Plus and High speed */
+ if (config->speed >= I2C_SPEED_HIGH) {
+ /* High and Fast Ultra speed */
hcnt_reg = ®s->hs_scl_hcnt;
lcnt_reg = ®s->hs_scl_lcnt;
} else if (config->speed >= I2C_SPEED_FAST) {
- /* Fast speed */
+ /* Fast and Fast-Plus speed */
hcnt_reg = ®s->fs_scl_hcnt;
lcnt_reg = ®s->fs_scl_lcnt;
} else {
@@ -590,11 +590,11 @@
control = read32(®s->control);
control &= ~CONTROL_SPEED_MASK;
- if (speed >= I2C_SPEED_FAST_PLUS) {
- /* High and Fast-Plus speed share config registers */
+ if (speed >= I2C_SPEED_HIGH) {
+ /* High and Fast-Ultra speed share config registers */
control |= CONTROL_SPEED_HS;
} else if (speed >= I2C_SPEED_FAST) {
- /* Fast speed */
+ /* Fast speed and Fast-Plus */
control |= CONTROL_SPEED_FS;
} else {
/* Standard speed */
--
To view, visit https://review.coreboot.org/20646
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib0e08afe0e1b6d8c9961d5e3039b07ada9d30aa3
Gerrit-Change-Number: 20646
Gerrit-PatchSet: 1
Gerrit-Owner: Naresh Solanki <naresh.solanki at intel.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170719/ae17b2a6/attachment.html>
More information about the coreboot-gerrit
mailing list