aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/common/lpss_i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/common/lpss_i2c.c')
-rw-r--r--src/soc/intel/common/lpss_i2c.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/soc/intel/common/lpss_i2c.c b/src/soc/intel/common/lpss_i2c.c
index 76c3d14d70..01747926d0 100644
--- a/src/soc/intel/common/lpss_i2c.c
+++ b/src/soc/intel/common/lpss_i2c.c
@@ -265,6 +265,11 @@ int platform_i2c_transfer(unsigned bus, struct i2c_seg *segments, int count)
/* Process each segment */
while (count--) {
+ if (CONFIG_SOC_INTEL_COMMON_LPSS_I2C_DEBUG)
+ printk(BIOS_DEBUG, "i2c %u:%02x %s %d bytes : ",
+ bus, segments->chip, segments->read ? "R" : "W",
+ segments->len);
+
/* Set target slave address */
write32(&regs->target_addr, segments->chip);
@@ -283,6 +288,14 @@ int platform_i2c_transfer(unsigned bus, struct i2c_seg *segments, int count)
goto out;
}
}
+
+ if (CONFIG_SOC_INTEL_COMMON_LPSS_I2C_DEBUG) {
+ int j;
+ for (j = 0; j < segments->len; j++)
+ printk(BIOS_DEBUG, "%02x ", segments->buf[j]);
+ printk(BIOS_DEBUG, "\n");
+ }
+
segments++;
}