Skip to content

Commit 087cb96

Browse files
maass-hamburgkartben
authored andcommitted
drivers: serial: litex: remove redundant rx pending
flushing rx pending already happens in uart_litex_fifo_read, which should be called by the callback, so don't do it again, also it can lead to the drop of chars, as flushing removes the current entry in the fifo. Signed-off-by: Fin Maaß <[email protected]>
1 parent 060e05e commit 087cb96

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

drivers/serial/uart_litex.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,19 +267,13 @@ static void uart_litex_irq_callback_set(const struct device *dev,
267267

268268
static void uart_litex_irq_handler(const struct device *dev)
269269
{
270-
const struct uart_litex_device_config *config = dev->config;
271270
struct uart_litex_data *data = dev->data;
272271
unsigned int key = irq_lock();
273272

274273
if (data->callback) {
275274
data->callback(dev, data->cb_data);
276275
}
277276

278-
/* Clear RX events, TX events still needed to enqueue the next transfer */
279-
if ((litex_read8(config->ev_pending_addr) & UART_EV_RX) > 0) {
280-
litex_write8(UART_EV_RX, config->ev_pending_addr);
281-
}
282-
283277
irq_unlock(key);
284278
}
285279
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */

0 commit comments

Comments
 (0)