@@ -36,7 +36,6 @@ struct uart_litex_device_config {
36
36
37
37
struct uart_litex_data {
38
38
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
39
- struct k_timer timer ;
40
39
uart_irq_callback_user_data_t callback ;
41
40
void * cb_data ;
42
41
#endif
@@ -94,20 +93,10 @@ static int uart_litex_poll_in(const struct device *dev, unsigned char *c)
94
93
static void uart_litex_irq_tx_enable (const struct device * dev )
95
94
{
96
95
const struct uart_litex_device_config * config = dev -> config ;
97
- struct uart_litex_data * data = dev -> data ;
98
96
99
97
uint8_t enable = litex_read8 (config -> ev_enable_addr );
100
98
101
99
litex_write8 (enable | UART_EV_TX , config -> ev_enable_addr );
102
-
103
- if (!litex_read8 (config -> txfull_addr )) {
104
- /*
105
- * TX done event already generated an edge interrupt. Generate a
106
- * soft interrupt and have it call the callback function in
107
- * timer isr context.
108
- */
109
- k_timer_start (& data -> timer , K_NO_WAIT , K_NO_WAIT );
110
- }
111
100
}
112
101
113
102
/**
@@ -298,13 +287,6 @@ static void uart_litex_irq_handler(const struct device *dev)
298
287
299
288
irq_unlock (key );
300
289
}
301
-
302
- static void uart_litex_tx_soft_isr (struct k_timer * timer )
303
- {
304
- const struct device * dev = k_timer_user_data_get (timer );
305
-
306
- uart_litex_irq_handler (dev );
307
- }
308
290
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
309
291
310
292
static DEVICE_API (uart , uart_litex_driver_api ) = {
@@ -335,11 +317,6 @@ static int uart_litex_init(const struct device *dev)
335
317
litex_write8 (UART_EV_TX | UART_EV_RX , config -> ev_pending_addr );
336
318
337
319
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
338
- struct uart_litex_data * data = dev -> data ;
339
-
340
- k_timer_init (& data -> timer , & uart_litex_tx_soft_isr , NULL );
341
- k_timer_user_data_set (& data -> timer , (void * )dev );
342
-
343
320
config -> config_func (dev );
344
321
#endif
345
322
0 commit comments