diff options
author | Daniel Thompson <daniel.thompson@linaro.org> | 2018-01-01 13:05:19 +0000 |
---|---|---|
committer | Daniel Thompson <daniel.thompson@linaro.org> | 2018-01-01 13:05:19 +0000 |
commit | 8dc8adfab78a11d577c6e982dfd88e1c2f27d03d (patch) | |
tree | a1a8edae53f049c32d7ead507888111ac1ffd634 /drivers/tty | |
parent | f1005945c613077fe682e55396a4a8c1d32c784b (diff) |
serial: 8250: Implement the "polled" request_irq() interface
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/8250/8250_port.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c index f0cc04f62b67..6754f5d8a863 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -2121,6 +2121,21 @@ static void serial8250_put_poll_char(struct uart_port *port, serial8250_rpm_put(up); } +static int serial8250_get_poll_irq(struct uart_port *port) +{ + unsigned int ier; + struct uart_8250_port *up = up_to_u8250p(port); + + serial8250_rpm_get(up); + + ier = serial_port_in(port, UART_IER); + ier |= UART_IER_RLSI | UART_IER_RDI; + serial_port_out(port, UART_IER, ier); + + serial8250_rpm_put(up); + return port->irq; +} + #endif /* CONFIG_CONSOLE_POLL */ int serial8250_do_startup(struct uart_port *port) @@ -3124,6 +3139,7 @@ static const struct uart_ops serial8250_pops = { #ifdef CONFIG_CONSOLE_POLL .poll_get_char = serial8250_get_poll_char, .poll_put_char = serial8250_put_poll_char, + .poll_get_irq = serial8250_get_poll_irq, #endif }; |