Skip to contentSkip to conversation

spi: DMA support for Designware core on Moorestown platform

PATCH Superseded Feng Tang 1 participant 1 message Aug 4, 2009 SPI

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Feng Tang

author
#0 lore raw

PATCH v2 3/3 spi: DMA support for Designware core on Moorestown platform

Quoted 1 line

From cd273fb923083650d27f6d3e710a2bec22b8f8c2 Mon Sep 17 00:00:00 2001

From: Feng Tang <[email protected]>
Date: Tue, 4 Aug 2009 16:42:31 +0800
Subject: [PATCH 3/3] spi: DMA support for Designware core on Moorestown platform

Designware core can work with multiple DMA controllers for DMA operation, and this patch supports it to cowork with the Designware DMA controller used on Intel Moorestown platform

---
 drivers/spi/Kconfig        |    4 +
 drivers/spi/dw_spi.c       |  173 +++++++++++++++++++++++++++++++++++++++++++-
 include/linux/spi/dw_spi.h |    6 ++
 3 files changed, 179 insertions(+), 4 deletions(-)
drivers/spi/Kconfig +4 -0
index 906bca4..e3f98d9 100644
@@ -233,6 +233,10 @@ config SPI_DESIGNWARE
 	help
 	  general driver for SPI controller core from DesignWare
 
+config SPI_DW_MRST_DMA
+	bool "DMA support for DW SPI controller on Intel Moorestown platform"
+	depends on SPI_DESGINWARE && MRST_DMA
+
 config SPI_DW_PCI
 	tristate "PCI interface driver for DW SPI core"
 	depends on SPI_DESIGNWARE && PCI
drivers/spi/dw_spi.c +169 -4

209 lines not on this page · raw message

include/linux/spi/dw_spi.h +6 -0
index 51b3e77..4881a18 100644
@@ -1,6 +1,7 @@
 #ifndef DW_SPI_HEADER_H
 #define DW_SPI_HEADER_H
 #include <linux/io.h>
+#include <linux/lnw_dma.h>
 
 /* Bit fields in CTRLR0 */
 #define SPI_DFS_OFFSET			0
@@ -141,6 +142,11 @@ struct dw_spi {
 	struct device		*dma_dev;
 	dma_addr_t		dma_addr;
 
+#ifdef CONFIG_SPI_MRST_DMA
+	struct lnw_dma_slave	dmas_tx;
+	struct lnw_dma_slave	dmas_rx;
+#endif
+
 	/* Bus interface info */
 	void			*priv;
 #ifdef CONFIG_DEBUG_FS
Signature · 7 lines
1.5.6.3

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july