Skip to content

Commit cf3701c

Browse files
maass-hamburghenrikbrixandersen
authored andcommitted
drivers: serial: litex: only clear rx pending if needed
only clear rx pending if needed Signed-off-by: Fin Maaß <[email protected]>
1 parent b97a0b1 commit cf3701c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/serial/uart_litex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ static void uart_litex_irq_handler(const struct device *dev)
281281
}
282282

283283
/* Clear RX events, TX events still needed to enqueue the next transfer */
284-
if (litex_read8(config->rxempty_addr)) {
284+
if ((litex_read8(config->ev_pending_addr) & UART_EV_RX) > 0) {
285285
litex_write8(UART_EV_RX, config->ev_pending_addr);
286286
}
287287

0 commit comments

Comments
 (0)