aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2018-03-26 23:48:25 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-23 04:16:50 -0400
commitebbaf9ab9ebd69f42b286c7a67cc84571c3d947a (patch)
tree188d96c0710790f69f68f79cf09c30bb9c1a720e
parentc5f78b1fe4e5baf4c4ca30377c2d7e06e2e391ec (diff)
serial/8250: export serial8250_read_char
Currently, we export serial8250_rx_chars, which does a whole bunch of reads from the 8250 data register, without any form of flow control between reads. An upcoming change to the aspeed vuart driver implements more fine-grained flow control in the interrupt handler, requiring character-at-a-time control over the rx path. This change exports serial8250_read_char to allow this. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Tested-by: Eddie James <eajames@linux.vnet.ibm.com> Tested-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/8250/8250_port.c3
-rw-r--r--include/linux/serial_8250.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 95833cbc4338..8fbd5fbeb318 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -1680,7 +1680,7 @@ static void serial8250_enable_ms(struct uart_port *port)
1680 serial8250_rpm_put(up); 1680 serial8250_rpm_put(up);
1681} 1681}
1682 1682
1683static void serial8250_read_char(struct uart_8250_port *up, unsigned char lsr) 1683void serial8250_read_char(struct uart_8250_port *up, unsigned char lsr)
1684{ 1684{
1685 struct uart_port *port = &up->port; 1685 struct uart_port *port = &up->port;
1686 unsigned char ch; 1686 unsigned char ch;
@@ -1740,6 +1740,7 @@ static void serial8250_read_char(struct uart_8250_port *up, unsigned char lsr)
1740 1740
1741 uart_insert_char(port, lsr, UART_LSR_OE, ch, flag); 1741 uart_insert_char(port, lsr, UART_LSR_OE, ch, flag);
1742} 1742}
1743EXPORT_SYMBOL_GPL(serial8250_read_char);
1743 1744
1744/* 1745/*
1745 * serial8250_rx_chars: processes according to the passed in LSR 1746 * serial8250_rx_chars: processes according to the passed in LSR
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index a27ef5f56431..76b9db71e489 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -163,6 +163,7 @@ extern void serial8250_do_set_mctrl(struct uart_port *port, unsigned int mctrl);
163extern int fsl8250_handle_irq(struct uart_port *port); 163extern int fsl8250_handle_irq(struct uart_port *port);
164int serial8250_handle_irq(struct uart_port *port, unsigned int iir); 164int serial8250_handle_irq(struct uart_port *port, unsigned int iir);
165unsigned char serial8250_rx_chars(struct uart_8250_port *up, unsigned char lsr); 165unsigned char serial8250_rx_chars(struct uart_8250_port *up, unsigned char lsr);
166void serial8250_read_char(struct uart_8250_port *up, unsigned char lsr);
166void serial8250_tx_chars(struct uart_8250_port *up); 167void serial8250_tx_chars(struct uart_8250_port *up);
167unsigned int serial8250_modem_status(struct uart_8250_port *up); 168unsigned int serial8250_modem_status(struct uart_8250_port *up);
168void serial8250_init_port(struct uart_8250_port *up); 169void serial8250_init_port(struct uart_8250_port *up);