OSDN Git Service

tty: serial: 8250: omap: add dma support
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 29 Sep 2014 18:06:49 +0000 (20:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Nov 2014 03:13:34 +0000 (19:13 -0800)
commit0a0661ddb8fc9298a293558898e1045fbf54f256
tree344a84c42fd052f194c26b250dfaaebf8d490432
parent77285243a68fec6852041d1db0d5587684b9dc48
tty: serial: 8250: omap: add dma support

This patch adds the required pieces to 8250-OMAP UART driver for DMA
support. The TX burst size is set to 1 so we can send an arbitrary
amount of bytes.

The RX burst is currently set to 48 which means we receive an DMA
interrupt every 48 bytes and have to reprogram everything. Less bytes in
the RX-FIFO mean that no DMA transfer will happen and the UART will send a
RX-timeout _or_ RDI event at which point the FIFO will be manually purged.
There is a workaround for TX-DMA on AM33xx where we put the first byte
into the FIFO to kick start the DMA process. Haven't seen this problem on
OMAP36xx (beagle board xm) or DRA7xx.

On AM375x there is "Usage Note 2.7: UART: Cannot Acknowledge Idle
Requests in Smartidle Mode When Configured for DMA Operations" in the
errata document. This problem persists even after disabling DMA in the
UART and will be addressed in the HWMOD.

v10:
- delay update_registers() from set_termios() until TX-DMA is
  done. It has been reported / proved that invoking
  update_registers() while TX-DMA is in progress may stall the
  DMA operation and it won't finish.
- use the new omap DMA-TX-RX hooks and DMA only interrupt
  routine.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_omap.c