serial: at91: add rx dma support
authorElen Song <elen.song@atmel.com>
Mon, 22 Jul 2013 08:30:27 +0000 (16:30 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Jul 2013 20:03:29 +0000 (13:03 -0700)
commit34df42f59a602241b416001516d53fcfe35072b2
tree2e85c121218d9e4344d252a24b5b516f4aa49a75
parent08f738be88bb7a0163afd810a19b9cb13c79808f
serial: at91: add rx dma support

Request a cyclic dma channel for rx dma use. Use cyclic transfer is to prevent
receive data overrun.

We allocate a cycle dma cookie after request channel,
after that, enable uart timeout interrupt in startup stage, when data successful
received, the timeout callback will check the residual bytes and insert
receiving datas into the framework during the transfer interval.

When current descriptor finished, the dma callback will also check the residual
bytes and filp the receiving data.

Signed-off-by: Elen Song <elen.song@atmel.com>
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/atmel_serial.c