diff mbox

[RESEND:] serial: nsl16550: add hw flow control support

Message ID 1397072946-23698-1-git-send-email-m-karicheri2@ti.com
State New
Headers show

Commit Message

Murali Karicheri April 9, 2014, 7:49 p.m. UTC
keystone serial hw support hw flow control. This patch
enables hw flow control for keystone EVMs as an optional
feature based on CONFIG_HWFLOW

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
---
 Depends on keystone patch series on the u-boot mailing list
 drivers/serial/ns16550.c |    6 ++++++
 include/ns16550.h        |    1 +
 2 files changed, 7 insertions(+)
diff mbox

Patch

diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 8a13454..e49a053 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -33,6 +33,12 @@ 
 #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_HWFLOW
+#define UART_MCRVAL             (UART_MCR_RTS | UART_MCR_AFE)
+#else
+#define UART_MCRVAL             (UART_MCR_RTS)
+#endif
 #endif
 
 #ifndef CONFIG_SYS_NS16550_IER
diff --git a/include/ns16550.h b/include/ns16550.h
index 51cb5b4..17f829f 100644
--- a/include/ns16550.h
+++ b/include/ns16550.h
@@ -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