serial: 8250: Use hrtimers for rs485 delays

Previously the timers where based on the classic timers, giving a too
coarse resolution on systems with configs of less than 1000 HZ.

This patch changes the rs485 timers to hrtimers.

Signed-off-by: Rafael Gago Castano <rgc@hms.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Rafael Gago 2017-07-31 10:46:43 +02:00 committed by Greg Kroah-Hartman
parent a6845e1e1b
commit 6e0a5de213
2 changed files with 44 additions and 26 deletions

View file

@ -80,9 +80,10 @@ struct uart_8250_ops {
};
struct uart_8250_em485 {
struct timer_list start_tx_timer; /* "rs485 start tx" timer */
struct timer_list stop_tx_timer; /* "rs485 stop tx" timer */
struct timer_list *active_timer; /* pointer to active timer */
struct hrtimer start_tx_timer; /* "rs485 start tx" timer */
struct hrtimer stop_tx_timer; /* "rs485 stop tx" timer */
struct hrtimer *active_timer; /* pointer to active timer */
struct uart_8250_port *port; /* for hrtimer callbacks */
};
/*