Skip to content

Commit ca371d6

Browse files
VenkatKotakondahenrikbrixandersen
authored andcommitted
drivers: espi: Clear virtual wire interrupt before calling handler
Clearing virtual wire interrupt after calling handler may cause next interrupt miss if the same virtual wire changes due to action in handler. As the interrupt source is read from register, it can be cleared before calling handler to avoid next interrupt miss due to action/delay in the callback handler. Signed-off-by: Venkataramana Kotakonda <[email protected]>
1 parent 79d5857 commit ca371d6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/espi/espi_mchp_xec.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,6 +1365,7 @@ static void espi_xec_vw_isr(const struct device *dev)
13651365
uint32_t girq_result;
13661366

13671367
girq_result = MCHP_GIRQ_RESULT(config->vw_girq_ids[0]);
1368+
MCHP_GIRQ_SRC(config->vw_girq_ids[0]) = girq_result;
13681369

13691370
for (int i = 0; i < m2s_vwires_isr_cnt; i++) {
13701371
struct espi_isr entry = m2s_vwires_isr[i];
@@ -1375,8 +1376,6 @@ static void espi_xec_vw_isr(const struct device *dev)
13751376
}
13761377
}
13771378
}
1378-
1379-
REG32(MCHP_GIRQ_SRC_ADDR(config->vw_girq_ids[0])) = girq_result;
13801379
}
13811380

13821381
#if DT_INST_PROP_HAS_IDX(0, vw_girqs, 1)

0 commit comments

Comments
 (0)