serial: samsung: add DMA support for RX

Add RX DMA transfers support for samsung serial driver. It's enabled
when DMA controller for RX channel is specified in device-tree.

DMA transactions are started when number of bytes in RX FIFO reaches
trigger level, otherwise PIO mode is used. DMA transfer size is always
PAGE_SIZE which can cause large latency when smaller data amount is
transferred, so we always terminate DMA transaction on RX timeout
interrupt. Timeout interval is set to 64 frame times.

Based on previous work of Sylwester Nawrocki and Lukasz Czerwinski.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 files changed