diff mbox

spi: atmel: Fix DMA-setup for transfers with more than 8 bits per word.

Message ID 1445288084-31805-1-git-send-email-davidm@egauge.net (mailing list archive)
State Accepted
Commit 06515f83908d038d9e12ffa3dcca27a1b67f2de0
Headers show

Commit Message

David Mosberger-Tang Oct. 19, 2015, 8:54 p.m. UTC
The DMA-slave configuration depends on the whether <= 8 or > 8 bits
are transferred per word, so we need to call
atmel_spi_dma_slave_config() with the correct value.

Signed-off-by: David Mosberger <davidm@egauge.net>
---
 drivers/spi/spi-atmel.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Nicolas Ferre Oct. 20, 2015, 10:22 a.m. UTC | #1
Le 19/10/2015 22:54, David Mosberger-Tang a écrit :
> The DMA-slave configuration depends on the whether <= 8 or > 8 bits
> are transferred per word, so we need to call
> atmel_spi_dma_slave_config() with the correct value.
> 
> Signed-off-by: David Mosberger <davidm@egauge.net>

Thanks for having rewritten this patch! It's much more simple like this ;-)

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

For Mark, here is the patchwork entry which can be handy:
https://patchwork.kernel.org/patch/7439931/

Best regards,

> ---
>  drivers/spi/spi-atmel.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
> index 04e48e5..855cc56 100644
> --- a/drivers/spi/spi-atmel.c
> +++ b/drivers/spi/spi-atmel.c
> @@ -758,7 +758,8 @@ static int atmel_spi_next_xfer_dma_submit(struct spi_master *master,
>  
>  	*plen = len;
>  
> -	if (atmel_spi_dma_slave_config(as, &slave_config, 8))
> +	if (atmel_spi_dma_slave_config(as, &slave_config,
> +				       xfer->bits_per_word))
>  		goto err_exit;
>  
>  	/* Send both scatterlists */
>
Mark Brown Oct. 20, 2015, 10:27 a.m. UTC | #2
On Tue, Oct 20, 2015 at 12:22:25PM +0200, Nicolas Ferre wrote:

> Thanks for having rewritten this patch! It's much more simple like this ;-)

> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

> For Mark, here is the patchwork entry which can be handy:
> https://patchwork.kernel.org/patch/7439931/

No, please submit the patch via e-mail as covered in SubmittingPatches
and as I said yesterday.
Nicolas Ferre Oct. 20, 2015, 12:26 p.m. UTC | #3
Le 20/10/2015 12:27, Mark Brown a écrit :
> On Tue, Oct 20, 2015 at 12:22:25PM +0200, Nicolas Ferre wrote:
> 
>> Thanks for having rewritten this patch! It's much more simple like this ;-)
> 
>> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> 
>> For Mark, here is the patchwork entry which can be handy:
>> https://patchwork.kernel.org/patch/7439931/
> 
> No, please submit the patch via e-mail as covered in SubmittingPatches
> and as I said yesterday.

Done right now ;-)

Thanks, bye,
diff mbox

Patch

diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index 04e48e5..855cc56 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -758,7 +758,8 @@  static int atmel_spi_next_xfer_dma_submit(struct spi_master *master,
 
 	*plen = len;
 
-	if (atmel_spi_dma_slave_config(as, &slave_config, 8))
+	if (atmel_spi_dma_slave_config(as, &slave_config,
+				       xfer->bits_per_word))
 		goto err_exit;
 
 	/* Send both scatterlists */