diff options
author | Jett Rink <jettrink@chromium.org> | 2018-05-15 17:42:32 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-05-16 16:43:04 -0700 |
commit | 0b6be8f7b56d8104a4f8ff09996437205c6efca9 (patch) | |
tree | 4e06c15faf414b07fec6992b1abd778eb582d818 /util | |
parent | 86734119fcba3909f02ab294ae3b2b31540c17a7 (diff) | |
download | chrome-ec-0b6be8f7b56d8104a4f8ff09996437205c6efca9.tar.gz |
bip: unwedge SDA line after flashing ITE
When we exit DBGR mode on the ITE after flashing, it wedges the
SDA line, which prevents us from using dut-control cold_reset.
We do not need to exit DBGR mode since we will perform a cold reset
after we finish flashing.
BRANCH=none
BUG=b:79592483
TEST=flash bip multiple times and EC resets after flashing automatically
Change-Id: Iafbad7a88a528ec7385596fd7c674b151f276166
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1060588
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/iteflash.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/util/iteflash.c b/util/iteflash.c index 2778583142..849cd5cc49 100644 --- a/util/iteflash.c +++ b/util/iteflash.c @@ -320,27 +320,6 @@ static int dbgr_reset(struct ftdi_context *ftdi) return 0; } -static int exit_dbgr_mode(struct ftdi_context *ftdi) -{ - uint8_t val; - int ret = 0; - - /* We have to exit dbgr mode so that EC won't hold I2C bus. */ - ret |= i2c_write_byte(ftdi, 0x2f, 0x1c); - ret |= i2c_write_byte(ftdi, 0x2e, 0x08); - ret |= i2c_read_byte(ftdi, 0x30, &val); - ret |= i2c_write_byte(ftdi, 0x30, (val | (1 << 4))); - /* - * NOTE: - * We won't be able to send any commands to EC - * if we have exit dbgr mode. - * We do a cold reset for EC after flashing. - */ - printf("=== EXIT DBGR MODE %s ===\n", (ret < 0) ? "FAILED" : "DONE"); - - return 0; -} - /* Enter follow mode and FSCE# high level */ static int spi_flash_follow_mode(struct ftdi_context *ftdi, char *desc) { @@ -1117,8 +1096,10 @@ int main(int argc, char **argv) ret = 0; terminate: - /* Exit DBGR mode */ - exit_dbgr_mode(hnd); + /* + * Do not exit DBGR because it wedges the I2C SDA line and we cannot + * perform a cold reset of the EC. + */ /* Close the FTDI USB handle */ ftdi_usb_close(hnd); |