diff options
author | Qipan Li <Qipan.Li@csr.com> | 2013-08-19 11:47:53 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-19 17:13:22 -0700 |
commit | 8316d04c42b94e94c8e54027d7c77ebe098ab5fa (patch) | |
tree | 365541927dac54b6d2f151366e59d999f5aa8fe7 /drivers/tty/serial/omap-serial.c | |
parent | 15cdcb12cbcbd6abf16d6b6a52e04d452b464e3b (diff) |
serial: sirf: add DMA support using dmaengine APIs
if we get the valid dma channels from dts, move to use dmaengine to do
rx/tx. because the dma hardware requires dma address and length to be
4bytes aligned, in this driver, we will still use PIO for non-aligned
bytes, and use dma for aligned bytes.
for rx, to keep the dmaengine always active, we use double-buffer, so
we issue two dma_desc at first, and maintain the status of both
1. dma transfer done: update in rx dma finish callback
2. dma buffer is inserted into tty: update in rx dma finish tasklet and
rx timeout tasklet
so we re-issue the dma_desc only if both 1&2 are finished.
for tx, as we know the actual length for every transfer, we don't need
the above double buffering.
Signed-off-by: Qipan Li <Qipan.Li@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/omap-serial.c')
0 files changed, 0 insertions, 0 deletions