linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tty/serial: at91: maxburst was missing for dma transfers
@ 2015-04-16 14:58 Ludovic Desroches
  2015-04-16 15:07 ` Nicolas Ferre
  0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Desroches @ 2015-04-16 14:58 UTC (permalink / raw)
  To: linux-arm-kernel

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
---
 drivers/tty/serial/atmel_serial.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 4e959c4..6afce7e 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -880,6 +880,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_slave_config(atmel_port->chan_tx,
 				     &config);
@@ -1059,6 +1060,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_slave_config(atmel_port->chan_rx,
 				     &config);
-- 
2.2.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] tty/serial: at91: maxburst was missing for dma transfers
  2015-04-16 14:58 [PATCH] tty/serial: at91: maxburst was missing for dma transfers Ludovic Desroches
@ 2015-04-16 15:07 ` Nicolas Ferre
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Ferre @ 2015-04-16 15:07 UTC (permalink / raw)
  To: linux-arm-kernel

Le 16/04/2015 16:58, Ludovic Desroches a ?crit :
> 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

Indeed, thanks!
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

> ---
>  drivers/tty/serial/atmel_serial.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 4e959c4..6afce7e 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -880,6 +880,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_slave_config(atmel_port->chan_tx,
>  				     &config);
> @@ -1059,6 +1060,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_slave_config(atmel_port->chan_rx,
>  				     &config);
> 


-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-16 15:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-16 14:58 [PATCH] tty/serial: at91: maxburst was missing for dma transfers Ludovic Desroches
2015-04-16 15:07 ` Nicolas Ferre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).