diff options
author | Todd Broch <tbroch@chromium.org> | 2018-03-26 15:13:39 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-03-26 23:33:38 -0700 |
commit | ce4392e123613a7c692930e961a2e2c7bde73074 (patch) | |
tree | aa254553192b2d9aac588b0561da3dbd024a93dd /common/i2c_master.c | |
parent | d1716c502e1bee26ed348c4b00b4deb73b30fdc1 (diff) | |
download | chrome-ec-ce4392e123613a7c692930e961a2e2c7bde73074.tar.gz |
i2c: expose port num during unwedge console output.
Signed-off-by: Todd Broch <tbroch@chromium.org>
BUG=b:72837836
TEST=manual,
on Nami, 'echo mem > /sys/power/state'
From EC console see,
[4823.162371 I2C4 unwedge failed, SCL is held low
Change-Id: Ic66c7fe00442fdcef90b3a0e4c10bcddc73e04c6
Reviewed-on: https://chromium-review.googlesource.com/981450
Commit-Ready: Todd Broch <tbroch@chromium.org>
Tested-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Diffstat (limited to 'common/i2c_master.c')
-rw-r--r-- | common/i2c_master.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/common/i2c_master.c b/common/i2c_master.c index 01cbfaad26..f9ac88ea45 100644 --- a/common/i2c_master.c +++ b/common/i2c_master.c @@ -451,7 +451,8 @@ int i2c_unwedge(int port) * If we get here, a slave is holding the clock * low and there is nothing we can do. */ - CPUTS("I2C unwedge failed, SCL is being held low"); + CPRINTS("I2C%d unwedge failed, " + "SCL is held low", port); ret = EC_ERROR_UNKNOWN; goto unwedge_done; } @@ -464,7 +465,7 @@ int i2c_unwedge(int port) if (i2c_raw_get_sda(port)) goto unwedge_done; - CPUTS("I2C unwedge called with SDA held low"); + CPRINTS("I2C%d unwedge called with SDA held low", port); /* Keep trying to unwedge the SDA line until we run out of attempts. */ for (i = 0; i < UNWEDGE_SDA_ATTEMPTS; i++) { @@ -499,11 +500,11 @@ int i2c_unwedge(int port) } if (!i2c_raw_get_sda(port)) { - CPUTS("I2C unwedge failed, SDA still low"); + CPRINTS("I2C%d unwedge failed, SDA still low", port); ret = EC_ERROR_UNKNOWN; } if (!i2c_raw_get_scl(port)) { - CPUTS("I2C unwedge failed, SCL still low"); + CPRINTS("I2C%d unwedge failed, SCL still low", port); ret = EC_ERROR_UNKNOWN; } |