All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND][PATCH 1/2] McSPI Slave and DMA,FIFO support
@ 2009-06-23 13:54 Hemanth V
  2009-07-03  0:03 ` David Brownell
  0 siblings, 1 reply; 2+ messages in thread
From: Hemanth V @ 2009-06-23 13:54 UTC (permalink / raw)
  To: linux-omap; +Cc: spi-devel-general, dbrownell

This patch adds support for McSPI slave and FIFO. DMA and FIFO
could be enabled together for better throughput. Platform config
parameters have been added to enable these features on any particular
McSPI controller.

FIFO can be enabled by defining fifo_depth parameter. fifo_depth needs
to be a multiple of buffer size that is used for read/write.

These features are useful when you have high throughput devices
like WLAN or Modem connected over SPI.

Signed-off-by: Hemanth V <hemanthv@ti.com>
 arch/arm/mach-omap2/devices.c           |    5 +++++
 arch/arm/plat-omap/include/mach/mcspi.h |   16 ++++++++++++++++
 2 files changed, 21 insertions(+)

---
Index: linux-omap-2.6/arch/arm/mach-omap2/devices.c
===================================================================
--- linux-omap-2.6.orig/arch/arm/mach-omap2/devices.c	2009-06-18
15:22:39.000000000 +0530
+++ linux-omap-2.6/arch/arm/mach-omap2/devices.c	2009-06-23 16:45:51.000000000
+0530
@@ -259,6 +259,7 @@

 static struct omap2_mcspi_platform_config omap2_mcspi1_config = {
 	.num_cs		= 4,
+	.force_cs_mode	= 1,
 };

 static struct resource omap2_mcspi1_resources[] = {
@@ -281,6 +282,10 @@

 static struct omap2_mcspi_platform_config omap2_mcspi2_config = {
 	.num_cs		= 2,
+	.mode		= OMAP2_MCSPI_MASTER,
+	.dma_mode	= 1,
+	.force_cs_mode	= 0,
+	.fifo_depth	= 0,
 };

 static struct resource omap2_mcspi2_resources[] = {
Index: linux-omap-2.6/arch/arm/plat-omap/include/mach/mcspi.h
===================================================================
--- linux-omap-2.6.orig/arch/arm/plat-omap/include/mach/mcspi.h	2009-06-18
15:22:39.000000000 +0530
+++ linux-omap-2.6/arch/arm/plat-omap/include/mach/mcspi.h	2009-06-23
16:45:51.000000000 +0530
@@ -1,8 +1,24 @@
 #ifndef _OMAP2_MCSPI_H
 #define _OMAP2_MCSPI_H

+#define OMAP2_MCSPI_MASTER		0
+#define OMAP2_MCSPI_SLAVE		1
+
 struct omap2_mcspi_platform_config {
 	unsigned short	num_cs;
+
+	/* SPI is master or slave */
+	unsigned short	mode;
+
+	/* Use only DMA for data transfers */
+	unsigned short	dma_mode;
+
+	/* Force chip select mode */
+	unsigned short	force_cs_mode;
+
+	/* FIFO depth in bytes, max value 64 */
+	unsigned short fifo_depth;
+
 };

 struct omap2_mcspi_device_config {



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

* Re: [RESEND][PATCH 1/2] McSPI Slave and DMA,FIFO support
  2009-06-23 13:54 [RESEND][PATCH 1/2] McSPI Slave and DMA,FIFO support Hemanth V
@ 2009-07-03  0:03 ` David Brownell
  0 siblings, 0 replies; 2+ messages in thread
From: David Brownell @ 2009-07-03  0:03 UTC (permalink / raw)
  To: Hemanth V; +Cc: linux-omap, spi-devel-general

On Tuesday 23 June 2009, Hemanth V wrote:
> This patch adds support for McSPI slave and FIFO.

Actualy, no it doesn't.  Just adds a few fields to structs.

> DMA and FIFO 
> could be enabled together for better throughput. Platform config
> parameters have been added to enable these features on any particular
> McSPI controller.
> 
> FIFO can be enabled by defining fifo_depth parameter. fifo_depth needs
> to be a multiple of buffer size that is used for read/write.
> 
> These features are useful when you have high throughput devices
> like WLAN or Modem connected over SPI.

Yeah, but that's all irrelevant for adding a few fields...

I'd rather see this patch merge with the one that adds FIFO
support.  And get Tony's ack on at least these parts, being
as he's Emperor of OMAP.  ;)


> 
> Signed-off-by: Hemanth V <hemanthv@ti.com>
>  arch/arm/mach-omap2/devices.c           |    5 +++++
>  arch/arm/plat-omap/include/mach/mcspi.h |   16 ++++++++++++++++
>  2 files changed, 21 insertions(+)


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

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

end of thread, other threads:[~2009-07-03  0:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-23 13:54 [RESEND][PATCH 1/2] McSPI Slave and DMA,FIFO support Hemanth V
2009-07-03  0:03 ` David Brownell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.