From b24a1a93d5fc02f65fa9017ec04bbceaa058d1cc Mon Sep 17 00:00:00 2001 From: Alice Ziuziakowska Date: Tue, 7 Oct 2025 09:43:57 +0100 Subject: [PATCH] [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 --- hw/opentitan/ot_i2c.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/opentitan/ot_i2c.c b/hw/opentitan/ot_i2c.c index 1f927612b6579..cff3a2dd4cce8 100644 --- a/hw/opentitan/ot_i2c.c +++ b/hw/opentitan/ot_i2c.c @@ -1220,7 +1220,10 @@ static uint8_t ot_i2c_target_recv(I2CSlave *target) return 0; } + /* pop FIFO and check threshold. */ data = fifo8_pop(&s->target_tx_fifo); + ot_i2c_irq_set_state(s, TX_THRESHOLD, ot_i2c_tx_threshold_intr(s)); + trace_ot_i2c_target_recv(s->ot_id, fifo8_num_used(&s->target_tx_fifo), data); return data;