summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Mosberger-Tang <davidm@egauge.net>2015-10-20 14:26:47 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-19 14:22:38 -0800
commit092f4b70fe24ef591430e5111ebeffb67ec241eb (patch)
tree05a77c9bf9031419d15138faf55d0f607797988d
parent0fd9b8b499b31651d3b2d1c837a0f199ea25cc41 (diff)
downloadlwn-092f4b70fe24ef591430e5111ebeffb67ec241eb.tar.gz
lwn-092f4b70fe24ef591430e5111ebeffb67ec241eb.zip
spi: atmel: Fix DMA-setup for transfers with more than 8 bits per word
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>
-rw-r--r--drivers/spi/spi-atmel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index 380387a47b1d..462af46ceee7 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -594,7 +594,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 */