aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/tty/serial/fsl-mxs-auart.txt4
-rw-r--r--drivers/tty/serial/mxs-auart.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/tty/serial/fsl-mxs-auart.txt b/Documentation/devicetree/bindings/tty/serial/fsl-mxs-auart.txt
index 2c00ec64628e..59a40f18d551 100644
--- a/Documentation/devicetree/bindings/tty/serial/fsl-mxs-auart.txt
+++ b/Documentation/devicetree/bindings/tty/serial/fsl-mxs-auart.txt
@@ -10,6 +10,10 @@ Required properties:
10 Refer to dma.txt and fsl-mxs-dma.txt for details. 10 Refer to dma.txt and fsl-mxs-dma.txt for details.
11- dma-names: "rx" for RX channel, "tx" for TX channel. 11- dma-names: "rx" for RX channel, "tx" for TX channel.
12 12
13Optional properties:
14- fsl,uart-has-rtscts : Indicate the UART has RTS and CTS lines,
15 it also means you enable the DMA support for this UART.
16
13Example: 17Example:
14auart0: serial@8006a000 { 18auart0: serial@8006a000 {
15 compatible = "fsl,imx28-auart", "fsl,imx23-auart"; 19 compatible = "fsl,imx28-auart", "fsl,imx23-auart";
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index 736e95c1ac4e..eac7b585bc0c 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -137,6 +137,7 @@ struct mxs_auart_port {
137#define MXS_AUART_DMA_ENABLED 0x2 137#define MXS_AUART_DMA_ENABLED 0x2
138#define MXS_AUART_DMA_TX_SYNC 2 /* bit 2 */ 138#define MXS_AUART_DMA_TX_SYNC 2 /* bit 2 */
139#define MXS_AUART_DMA_RX_READY 3 /* bit 3 */ 139#define MXS_AUART_DMA_RX_READY 3 /* bit 3 */
140#define MXS_AUART_RTSCTS 4 /* bit 4 */
140 unsigned long flags; 141 unsigned long flags;
141 unsigned int ctrl; 142 unsigned int ctrl;
142 enum mxs_auart_type devtype; 143 enum mxs_auart_type devtype;
@@ -639,7 +640,8 @@ static void mxs_auart_settermios(struct uart_port *u,
639 * we can only implement the DMA support for auart 640 * we can only implement the DMA support for auart
640 * in mx28. 641 * in mx28.
641 */ 642 */
642 if (is_imx28_auart(s) && (s->flags & MXS_AUART_DMA_CONFIG)) { 643 if (is_imx28_auart(s) && (s->flags & MXS_AUART_DMA_CONFIG)
644 && test_bit(MXS_AUART_RTSCTS, &s->flags)) {
643 if (!mxs_auart_dma_init(s)) 645 if (!mxs_auart_dma_init(s))
644 /* enable DMA tranfer */ 646 /* enable DMA tranfer */
645 ctrl2 |= AUART_CTRL2_TXDMAE | AUART_CTRL2_RXDMAE 647 ctrl2 |= AUART_CTRL2_TXDMAE | AUART_CTRL2_RXDMAE
@@ -1009,6 +1011,9 @@ static int serial_mxs_probe_dt(struct mxs_auart_port *s,
1009 1011
1010 s->flags |= MXS_AUART_DMA_CONFIG; 1012 s->flags |= MXS_AUART_DMA_CONFIG;
1011 1013
1014 if (of_get_property(np, "fsl,uart-has-rtscts", NULL))
1015 set_bit(MXS_AUART_RTSCTS, &s->flags);
1016
1012 return 0; 1017 return 0;
1013} 1018}
1014 1019