Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

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>
Cc: stable@vger.kernel.org

authored by

David Mosberger-Tang and committed by
Mark Brown
06515f83 6ff33f39

+2 -1
+2 -1
drivers/spi/spi-atmel.c
··· 773 773 774 774 *plen = len; 775 775 776 - if (atmel_spi_dma_slave_config(as, &slave_config, 8)) 776 + if (atmel_spi_dma_slave_config(as, &slave_config, 777 + xfer->bits_per_word)) 777 778 goto err_exit; 778 779 779 780 /* Send both scatterlists */