Skip to contentSkip to conversation

spi: DMA support for Designware core on Moorestown platform

RFC PATCH In review Feng Tang 1 participant 1 message Oct 12, 2009 SPI

lore
Share & tools
lore

Feng Tang

author
#0 lore raw

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

Quoted 1 line

From 347b16b69df7d75cc5ab7060a7c5311e2856b932 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       |  171 ++++++++++++++++++++++++++++++++++++++++++-
 include/linux/spi/dw_spi.h |    6 ++
 3 files changed, 177 insertions(+), 4 deletions(-)
drivers/spi/Kconfig +4 -0
index bd39e80..8132272 100644
@@ -250,6 +250,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 +167 -4

207 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 · 8 lines
1.6.0.4

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference