summaryrefslogtreecommitdiff
path: root/include/serial.h
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2017-08-16 17:37:16 +0200
committerBin Meng <bmeng.cn@gmail.com>2017-08-24 11:00:47 +0800
commit3ca7a06afb7cbc867b7861a8b9aada74e5bbb559 (patch)
tree725eb62e426a11719fdfaaaa080fe462ddeaea5e /include/serial.h
parent7fded0ce0ff68551ceb631f98d60db162e49f80c (diff)
serial: serial-uclass: Add generic serial RX buffer support
Pasting longer lines into the U-Boot console prompt sometimes leads to characters missing. One problem here is the small 16-byte FIFO of the legacy NS16550 UART, e.g. on x86 platforms. This patch now introduces a Kconfig option to enable RX buffer support for all DM based serial drivers. With this option enabled, I was able paste really long lines into the U-Boot console, without any characters missing. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include/serial.h')
-rw-r--r--include/serial.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/serial.h b/include/serial.h
index f4171964ae..d87f01082a 100644
--- a/include/serial.h
+++ b/include/serial.h
@@ -148,10 +148,18 @@ struct dm_serial_ops {
/**
* struct serial_dev_priv - information about a device used by the uclass
*
- * @sdev: stdio device attached to this uart
+ * @sdev: stdio device attached to this uart
+ *
+ * @buf: Pointer to the RX buffer
+ * @rd_ptr: Read pointer in the RX buffer
+ * @wr_ptr: Write pointer in the RX buffer
*/
struct serial_dev_priv {
struct stdio_dev *sdev;
+
+ char *buf;
+ int rd_ptr;
+ int wr_ptr;
};
/* Access the serial operations for a device */