summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorFugang Duan <b38611@freescale.com>2014-07-11 10:34:27 +0800
committerFugang Duan <b38611@freescale.com>2014-07-11 12:12:06 +0800
commitdc49a7739f46c92cc52e43e538d98f45e8cd5920 (patch)
tree887c14131e6933068b13f943a17f289a9d126137 /drivers
parentbc123587aab31201fee090653b9e30237f62a86f (diff)
ENGR00322379 tty: serial: imx: set uart to cpu mode by default
Now uart cannot work well with CSR/Atheros BT module with SDMA mode. Set it to cpu mode before SDMA mode work. To enable dma mode, just add "fsl,dma-mode" in the device tree for the node. Signed-off-by: Fugang Duan <B38611@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/imx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index a8f2215dffbc..5ecaee07cbac 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -208,6 +208,7 @@ struct imx_port {
unsigned int have_rtscts:1;
unsigned int dte_mode:1;
unsigned int use_irda:1;
+ unsigned int dma_mode:1;
unsigned int irda_inv_rx:1;
unsigned int irda_inv_tx:1;
unsigned short trcv_delay; /* transceiver delay */
@@ -1357,7 +1358,7 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios,
/* Can we enable the DMA support? */
if (is_imx6q_uart(sport) && !uart_console(port)
- && !sport->dma_is_inited)
+ && !sport->dma_is_inited && sport->dma_mode)
imx_uart_dma_init(sport);
} else {
termios->c_cflag &= ~CRTSCTS;
@@ -1920,6 +1921,9 @@ static int serial_imx_probe_dt(struct imx_port *sport,
if (of_get_property(np, "fsl,dte-mode", NULL))
sport->dte_mode = 1;
+ if (of_get_property(np, "fsl,dma-mode", NULL))
+ sport->dma_mode = 1;
+
sport->devdata = of_id->data;
return 0;