diff options
author | Hung-ying Tyan <tyanh@chromium.org> | 2013-08-26 16:13:40 +0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-08-27 23:21:00 +0000 |
commit | e294f8086692cf86785ecb5aede4bedff86600a9 (patch) | |
tree | 88881b902bae975b6e1fcbc527f069111aa87c32 /chip/stm32/i2c-stm32l.c | |
parent | 5d014fd2dd5e92ad35a4f2dd1b58e0b1baebb65e (diff) | |
download | chrome-ec-e294f8086692cf86785ecb5aede4bedff86600a9.tar.gz |
pit: i2c: dump after ADDR bit is cleared instead of before
Dumping before the ADDR bit is cleared also has the effect of clearing the ADDR
bit.
BUG=chrome-os-partner:22235
TEST=Manual test on peach pit.
Keep executing the "battery" command on the EC console while busy running
flashrom on the host to read back the EC. See that there's no error produced.
BRANCH=pit
Signed-off-by: Hung-ying Tyan <tyanh@chromium.org>
Change-Id: I10e88a8512f4e9eb90267ef1aca1df5dd214318d
Reviewed-on: https://chromium-review.googlesource.com/66930
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Commit-Queue: Hung-ying Tyan <tyanh@chromium.org>
Tested-by: Hung-ying Tyan <tyanh@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'chip/stm32/i2c-stm32l.c')
-rw-r--r-- | chip/stm32/i2c-stm32l.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chip/stm32/i2c-stm32l.c b/chip/stm32/i2c-stm32l.c index 0892dc28e7..6f09cc340b 100644 --- a/chip/stm32/i2c-stm32l.c +++ b/chip/stm32/i2c-stm32l.c @@ -108,7 +108,6 @@ static int send_start(int port, int slave_addr) /* Write slave address */ STM32_I2C_DR(port) = slave_addr & 0xff; - dump_i2c_reg(port, "wrote addr"); rv = wait_sr1(port, STM32_I2C_SR1_ADDR); if (rv) return rv; @@ -116,6 +115,8 @@ static int send_start(int port, int slave_addr) /* Read SR2 to clear ADDR bit */ rv = STM32_I2C_SR2(port); + dump_i2c_reg(port, "wrote addr"); + return EC_SUCCESS; } |