linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] spi: dw-mid: set DMA burst on memory side
@ 2016-04-11 16:30 Andy Shevchenko
       [not found] ` <1460392212-101116-1-git-send-email-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2016-04-11 16:30 UTC (permalink / raw)
  To: linux-spi-u79uwXL29TY76Z2rM5mHXA, Mark Brown; +Cc: Andy Shevchenko

To optimize amount of bus writes on memory side set burst to be the same amount
of data on both sides.

Signed-off-by: Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
---
 drivers/spi/spi-dw-mid.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/spi/spi-dw-mid.c b/drivers/spi/spi-dw-mid.c
index e31971f9..0e0c34e 100644
--- a/drivers/spi/spi-dw-mid.c
+++ b/drivers/spi/spi-dw-mid.c
@@ -157,6 +157,7 @@ static struct dma_async_tx_descriptor *dw_spi_dma_prepare_tx(struct dw_spi *dws,
 
 	txconf.direction = DMA_MEM_TO_DEV;
 	txconf.dst_addr = dws->dma_addr;
+	txconf.src_maxburst = 4 * dws->dma_width;
 	txconf.dst_maxburst = 16;
 	txconf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
 	txconf.dst_addr_width = convert_dma_width(dws->dma_width);
@@ -203,6 +204,7 @@ static struct dma_async_tx_descriptor *dw_spi_dma_prepare_rx(struct dw_spi *dws,
 
 	rxconf.direction = DMA_DEV_TO_MEM;
 	rxconf.src_addr = dws->dma_addr;
+	rxconf.dst_maxburst = 4 * dws->dma_width;
 	rxconf.src_maxburst = 16;
 	rxconf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
 	rxconf.src_addr_width = convert_dma_width(dws->dma_width);
-- 
2.8.0.rc3

--
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:[~2016-04-19 13:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-11 16:30 [PATCH v1 1/1] spi: dw-mid: set DMA burst on memory side Andy Shevchenko
     [not found] ` <1460392212-101116-1-git-send-email-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-04-12  0:34   ` Mark Brown
     [not found]     ` <20160412003409.GN3351-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-04-12 11:56       ` Andy Shevchenko
     [not found]         ` <1460462195.6620.100.camel-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-04-12 14:02           ` Vinod Koul
2016-04-12 16:06             ` Andy Shevchenko
     [not found]               ` <1460477161.6620.120.camel-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-04-19 13:33                 ` Vinod Koul

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