From: Jeremy Kerr <jk@ozlabs.org>
To: linux-aspeed@lists.ozlabs.org
Subject: [PATCH 3/5] serial/8250: export serial8250_read_char
Date: Wed, 21 Mar 2018 10:52:39 +0800 [thread overview]
Message-ID: <20180321025241.19785-4-jk@ozlabs.org> (raw)
In-Reply-To: <20180321025241.19785-1-jk@ozlabs.org>
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>
---
drivers/tty/serial/8250/8250_port.c | 3 ++-
include/linux/serial_8250.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index a5fe0e66c607..ea435406936c 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -1650,7 +1650,7 @@ static void serial8250_enable_ms(struct uart_port *port)
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;
unsigned char ch;
@@ -1710,6 +1710,7 @@ static void serial8250_read_char(struct uart_8250_port *up, unsigned char lsr)
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
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index 61fbb440449c..4639a3608614 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -162,6 +162,7 @@ extern void serial8250_do_set_mctrl(struct uart_port *port, unsigned int mctrl);
extern int fsl8250_handle_irq(struct uart_port *port);
int serial8250_handle_irq(struct uart_port *port, unsigned int iir);
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);
unsigned int serial8250_modem_status(struct uart_8250_port *up);
void serial8250_init_port(struct uart_8250_port *up);
--
2.14.1
next prev parent reply other threads:[~2018-03-21 2:52 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-21 2:52 [PATCH 0/5] serial: implement flow control for ASPEED VUART driver Jeremy Kerr
2018-03-21 2:52 ` [PATCH 1/5] serial: Introduce UPSTAT_SYNC_FIFO for synchronised FIFOs Jeremy Kerr
2018-03-23 15:33 ` Greg Kroah-Hartman
2018-03-27 1:38 ` Jeremy Kerr
2018-03-23 15:50 ` Eddie James
2018-03-21 2:52 ` [PATCH 2/5] serial: expose buf_overrun count through proc interface Jeremy Kerr
2018-03-23 15:29 ` Greg Kroah-Hartman
2018-03-27 1:44 ` Jeremy Kerr
2018-03-23 15:50 ` Eddie James
2018-03-21 2:52 ` Jeremy Kerr [this message]
2018-03-23 15:51 ` [PATCH 3/5] serial/8250: export serial8250_read_char Eddie James
2018-03-21 2:52 ` [PATCH 4/5] serial/aspeed-vuart: Implement rx throttling Jeremy Kerr
2018-03-23 15:51 ` Eddie James
2018-03-21 2:52 ` [PATCH 5/5] serial/aspeed-vuart: Implement quick throttle mechanism Jeremy Kerr
2018-03-21 3:26 ` Joel Stanley
2018-03-21 3:32 ` Jeremy Kerr
2018-03-21 3:57 ` Jeremy Kerr
2018-03-21 4:36 ` [PATCH v2 " Jeremy Kerr
2018-03-23 15:51 ` [PATCH " Eddie James
2018-03-23 15:51 ` [PATCH 0/5] serial: implement flow control for ASPEED VUART driver Greg Kroah-Hartman
2018-03-27 3:38 ` Jeremy Kerr
2018-03-27 3:48 ` [PATCH v2 0/4] " Jeremy Kerr
2018-03-27 3:48 ` [PATCH v2 1/4] serial: Introduce UPSTAT_SYNC_FIFO for synchronised FIFOs Jeremy Kerr
2018-03-27 3:48 ` [PATCH v2 2/4] serial/8250: export serial8250_read_char Jeremy Kerr
2018-03-27 3:48 ` [PATCH v2 3/4] serial/aspeed-vuart: Implement rx throttling Jeremy Kerr
2018-03-27 3:48 ` [PATCH v2 4/4] serial/aspeed-vuart: Implement quick throttle mechanism Jeremy Kerr
2018-03-27 6:52 ` [PATCH v2 0/4] serial: implement flow control for ASPEED VUART driver Joel Stanley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180321025241.19785-4-jk@ozlabs.org \
--to=jk@ozlabs.org \
--cc=linux-aspeed@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).