linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: atmel: Fix DMA-setup for transfers with more than 8 bits per word.
@ 2015-10-19 20:54 David Mosberger-Tang
       [not found] ` <1445288084-31805-1-git-send-email-davidm-haPfTeumbwasTnJN9+BGXg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: David Mosberger-Tang @ 2015-10-19 20:54 UTC (permalink / raw)
  To: linux-spi-u79uwXL29TY76Z2rM5mHXA, Nicolas Ferre
  Cc: David Mosberger-Tang,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w

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-haPfTeumbwasTnJN9+BGXg@public.gmane.org>
---
 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 */
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2015-10-22 23:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-19 20:54 [PATCH] spi: atmel: Fix DMA-setup for transfers with more than 8 bits per word David Mosberger-Tang
     [not found] ` <1445288084-31805-1-git-send-email-davidm-haPfTeumbwasTnJN9+BGXg@public.gmane.org>
2015-10-20 10:22   ` Nicolas Ferre
     [not found]     ` <562615E1.4030407-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2015-10-20 10:27       ` Mark Brown
     [not found]         ` <20151020102726.GX32054-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2015-10-20 12:26           ` Nicolas Ferre
2015-10-20 12:26   ` [RESEND PATCH] " Nicolas Ferre
2015-10-22 23:10   ` Applied "spi: atmel: Fix DMA-setup for transfers with more than 8 bits per word" to the spi tree Mark Brown

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).