]> git.baikalelectronics.ru Git - kernel.git/commit
serial: mxs: enable the DMA only when the RTS/CTS is valid
authorHuang Shijie <b32955@freescale.com>
Sat, 3 Aug 2013 14:09:14 +0000 (10:09 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Aug 2013 07:05:17 +0000 (15:05 +0800)
commitfd82fdd6792446d68a501dd3a5ca342b4a6c1e97
treef3a202723dcae7e09158e651f013e2cff0168f0f
parent16d35097bb145bb83a60e2a92bd0395c57219540
serial: mxs: enable the DMA only when the RTS/CTS is valid

The original DMA support works only when RTS/CTS is enabled.
(see the "297a0c6 serial: mxs-auart: add the DMA support for mx28")
But after several patches, DMA support has lost this limit.
(see the "273e50c serial: mxs-auart: move to use generic DMA helper")

So an UART without the RTS/CTS lines may also enables the DMA support,
in which case the UART may gets unpredictable results.

This patch adds an optional property for the UART DT node
which indicates the UART has RTS and CTS lines, and it also means you
enable the DMA support for this UART.

This patch also adds a macro MXS_AUART_RTSCTS, and uses it to check
RTS/CTS before we enable the DMA for the UART.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Huang Shijie <shijie8@gmail.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/devicetree/bindings/tty/serial/fsl-mxs-auart.txt
drivers/tty/serial/mxs-auart.c