Skip to contentSkip to conversation

spi: DMA support for Designware core on Moorestown platform

PATCH RESEND Superseded Feng Tang 1 participant 1 message Sep 21, 2009 SPI

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Feng Tang

author
#0 lore raw

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

Quoted 1 line

From 792f1d88fb42e0a526f968a16118de1508934d2c 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 · 8 lines
1.5.6.3

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; 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&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf