]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
spi: atmel: Fix DMA-setup for transfers with more than 8 bits per word
authorDavid Mosberger-Tang <davidm@egauge.net>
Tue, 20 Oct 2015 12:26:47 +0000 (14:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Feb 2016 20:34:35 +0000 (12:34 -0800)
commit 06515f83908d038d9e12ffa3dcca27a1b67f2de0 upstream.

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>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-atmel.c

index 5f8c6d2f4df7307832383bf9fe402ce6ca2b4097..0e46e8d1d7bc768e90124aa14cd7c5e986eefc00 100644 (file)
@@ -593,7 +593,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 */