tty/serial: at91: maxburst was missing for dma transfers
authorLudovic Desroches <ludovic.desroches@atmel.com>
Thu, 16 Apr 2015 14:58:12 +0000 (16:58 +0200)
committerSasha Levin <sasha.levin@oracle.com>
Sun, 17 May 2015 23:12:40 +0000 (19:12 -0400)
[ Upstream commit a8d4e01637902311c5643b69a5c80e2805f04054 ]

Maxburst was not set when doing the dma slave configuration. This value
is checked by the recently introduced xdmac. It causes an error when
doing the slave configuration and so prevents from using dma.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Cc: <stable@vger.kernel.org> # 3.12 and later
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/tty/serial/atmel_serial.c

index 6ee5c6cefac0dc02b8a3a4495a5d5268f16c7f71..11300f7b49cb0a89e0af723f470f35540701b0cd 100644 (file)
@@ -861,6 +861,7 @@ static int atmel_prepare_tx_dma(struct uart_port *port)
        config.direction = DMA_MEM_TO_DEV;
        config.dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
        config.dst_addr = port->mapbase + ATMEL_US_THR;
+       config.dst_maxburst = 1;
 
        ret = dmaengine_device_control(atmel_port->chan_tx,
                                        DMA_SLAVE_CONFIG,
@@ -1025,6 +1026,7 @@ static int atmel_prepare_rx_dma(struct uart_port *port)
        config.direction = DMA_DEV_TO_MEM;
        config.src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
        config.src_addr = port->mapbase + ATMEL_US_RHR;
+       config.src_maxburst = 1;
 
        ret = dmaengine_device_control(atmel_port->chan_rx,
                                        DMA_SLAVE_CONFIG,