Commit ebbaf9ab authored by Jeremy Kerr's avatar Jeremy Kerr Committed by Greg Kroah-Hartman

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: default avatarJeremy Kerr <jk@ozlabs.org>
Tested-by: default avatarEddie James <eajames@linux.vnet.ibm.com>
Tested-by: default avatarJoel Stanley <joel@jms.id.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c5f78b1f
...@@ -1680,7 +1680,7 @@ static void serial8250_enable_ms(struct uart_port *port) ...@@ -1680,7 +1680,7 @@ static void serial8250_enable_ms(struct uart_port *port)
serial8250_rpm_put(up); serial8250_rpm_put(up);
} }
static void serial8250_read_char(struct uart_8250_port *up, unsigned char lsr) void serial8250_read_char(struct uart_8250_port *up, unsigned char lsr)
{ {
struct uart_port *port = &up->port; struct uart_port *port = &up->port;
unsigned char ch; unsigned char ch;
...@@ -1740,6 +1740,7 @@ static void serial8250_read_char(struct uart_8250_port *up, unsigned char lsr) ...@@ -1740,6 +1740,7 @@ static void serial8250_read_char(struct uart_8250_port *up, unsigned char lsr)
uart_insert_char(port, lsr, UART_LSR_OE, ch, flag); uart_insert_char(port, lsr, UART_LSR_OE, ch, flag);
} }
EXPORT_SYMBOL_GPL(serial8250_read_char);
/* /*
* serial8250_rx_chars: processes according to the passed in LSR * serial8250_rx_chars: processes according to the passed in LSR
......
...@@ -163,6 +163,7 @@ extern void serial8250_do_set_mctrl(struct uart_port *port, unsigned int mctrl); ...@@ -163,6 +163,7 @@ extern void serial8250_do_set_mctrl(struct uart_port *port, unsigned int mctrl);
extern int fsl8250_handle_irq(struct uart_port *port); extern int fsl8250_handle_irq(struct uart_port *port);
int serial8250_handle_irq(struct uart_port *port, unsigned int iir); int serial8250_handle_irq(struct uart_port *port, unsigned int iir);
unsigned char serial8250_rx_chars(struct uart_8250_port *up, unsigned char lsr); unsigned char serial8250_rx_chars(struct uart_8250_port *up, unsigned char lsr);
void serial8250_read_char(struct uart_8250_port *up, unsigned char lsr);
void serial8250_tx_chars(struct uart_8250_port *up); void serial8250_tx_chars(struct uart_8250_port *up);
unsigned int serial8250_modem_status(struct uart_8250_port *up); unsigned int serial8250_modem_status(struct uart_8250_port *up);
void serial8250_init_port(struct uart_8250_port *up); void serial8250_init_port(struct uart_8250_port *up);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment