summaryrefslogtreecommitdiff
path: root/chip/ish
diff options
context:
space:
mode:
Diffstat (limited to 'chip/ish')
-rw-r--r--chip/ish/i2c.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/chip/ish/i2c.c b/chip/ish/i2c.c
index f6c0cf3d0b..07da8638d2 100644
--- a/chip/ish/i2c.c
+++ b/chip/ish/i2c.c
@@ -404,8 +404,9 @@ int chip_i2c_xfer(int port, int slave_addr, const uint8_t *out, int out_size,
/* do not disable device before master is idle */
expire_ts = __hw_clock_source_read() + I2C_TSC_TIMEOUT;
- while (i2c_mmio_read(ctx->base, IC_STATUS) &
- BIT(IC_STATUS_MASTER_ACTIVITY)) {
+ while ((i2c_mmio_read(ctx->base, IC_STATUS) &
+ (BIT(IC_STATUS_MASTER_ACTIVITY) | BIT(IC_STATUS_TFE))) !=
+ BIT(IC_STATUS_TFE)) {
if (__hw_clock_source_read() >= expire_ts) {
ctx->error_flag = 1;