Skip to content

Commit f5faf01

Browse files
ziuziakowskaAlexJones0
authored andcommitted
[ot] hw/opentitan: ot_i2c: update TX_THRESHOLD interrupt on target I2C recv
This interrupt should be cleared if the TX FIFO level falls below the threshold, but this is not checked on target mode I2C recv. Signed-off-by: Alice Ziuziakowska <[email protected]>
1 parent ed46779 commit f5faf01

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hw/opentitan/ot_i2c.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,10 @@ static uint8_t ot_i2c_target_recv(I2CSlave *target)
12201220
return 0;
12211221
}
12221222

1223+
/* pop FIFO and check threshold. */
12231224
data = fifo8_pop(&s->target_tx_fifo);
1225+
ot_i2c_irq_set_state(s, TX_THRESHOLD, ot_i2c_tx_threshold_intr(s));
1226+
12241227
trace_ot_i2c_target_recv(s->ot_id, fifo8_num_used(&s->target_tx_fifo),
12251228
data);
12261229
return data;

0 commit comments

Comments
 (0)