]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
serial: nsl16550: add hw flow control support
authorKaricheri, Muralidharan <m-karicheri2@ti.com>
Wed, 9 Apr 2014 19:38:46 +0000 (15:38 -0400)
committerTom Rini <trini@ti.com>
Mon, 12 May 2014 19:19:45 +0000 (15:19 -0400)
keystone serial hw support hw flow control. This patch
enables hw flow control for keystone EVMs as an optional
feature based on CONFIG_SERIAL_HW_FLOW_CONTROL.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
README
drivers/serial/ns16550.c
include/ns16550.h

diff --git a/README b/README
index 80a1bfaad2a5093fa05d3ac3341a97216f5820ee..61c2caca3168188d29c12ed61910c9edcac58b94 100644 (file)
--- a/README
+++ b/README
@@ -751,6 +751,10 @@ The following options need to be configured:
                boot loader that has already initialized the UART.  Define this
                variable to flush the UART at init time.
 
+               CONFIG_SERIAL_HW_FLOW_CONTROL
+
+               Define this variable to enable hw flow control in serial driver.
+               Current user of this option is drivers/serial/nsl16550.c driver
 
 - Console Interface:
                Depending on board, define exactly one serial port
index 8a1345494336d56d6c0700f79e5851043b8fbf83..f26979dbe15e4ecf510b746dc4c92e58447ee2d5 100644 (file)
 #if defined(CONFIG_K2HK_EVM)
 #define UART_REG_VAL_PWREMU_MGMT_UART_DISABLE   0
 #define UART_REG_VAL_PWREMU_MGMT_UART_ENABLE ((1 << 14) | (1 << 13) | (1 << 0))
+#undef UART_MCRVAL
+#ifdef CONFIG_SERIAL_HW_FLOW_CONTROL
+#define UART_MCRVAL             (UART_MCR_RTS | UART_MCR_AFE)
+#else
+#define UART_MCRVAL             (UART_MCR_RTS)
+#endif
 #endif
 
 #ifndef CONFIG_SYS_NS16550_IER
index 51cb5b4a66d86029674feca1cdf395d493ec56ae..17f829f6f9b016da61a9d1770b5737e1894a8955 100644 (file)
@@ -100,6 +100,7 @@ typedef struct NS16550 *NS16550_t;
 #define UART_MCR_OUT1  0x04            /* Out 1 */
 #define UART_MCR_OUT2  0x08            /* Out 2 */
 #define UART_MCR_LOOP  0x10            /* Enable loopback test mode */
+#define UART_MCR_AFE   0x20            /* Enable auto-RTS/CTS */
 
 #define UART_MCR_DMA_EN        0x04
 #define UART_MCR_TX_DFR        0x08