[PATCH] MX2x: Add CSI platform device and resources.

javier Martin <[email protected]>
Newsgroups gmane.comp.video.video4linux,gmane.linux.ports.arm.kernel
Message-ID <[email protected]>
The patch applies over 2.6.30 kernel.

Signed-off-by: Javier Martin <[email protected]>
---
 arch/arm/mach-mx2/devices.c |   38 ++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-mx2/devices.h |    1 +
 2 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c
index 4e7feea..f5c3ed6 100644
--- a/arch/arm/mach-mx2/devices.c
+++ b/arch/arm/mach-mx2/devices.c
@@ -39,6 +39,44 @@

 #include "devices.h"

+
+static struct resource mxc_csi_resources[] = {
+	[0] = {
+		.start  = CSI_BASE_ADDR,
+		.end    = CSI_BASE_ADDR + 0x1f,
+		.flags  = IORESOURCE_MEM,
+	},
+	[1] = {
+		.start  = MXC_INT_CSI,
+		.end    = MXC_INT_CSI,
+		.flags  = IORESOURCE_IRQ,
+	},
+	[2] = {
+		.start  = DMA_REQ_CSI_RX,
+		.end    = DMA_REQ_CSI_RX,
+		.flags  = IORESOURCE_DMA
+	},
+	[3] = {
+		.start  = DMA_REQ_CSI_STAT,
+		.end    = DMA_REQ_CSI_STAT,
+		.flags  = IORESOURCE_DMA
+	},
+};
+
+static u64 mxc_csi_dmamask = 0xffffffffUL;
+
+struct platform_device mxc_csi_device = {
+	.name           = "mxc-camera",
+	.id             = 0,
+	.dev		= {
+		.dma_mask = &mxc_csi_dmamask,
+		.coherent_dma_mask = 0xffffffff,
+	},
+	.resource       = mxc_csi_resources,
+	.num_resources  = ARRAY_SIZE(mxc_csi_resources),
+};
+
+
 /*
  * Resource definition for the MXC IrDA
  */
diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-mx2/devices.h
index facb4d6..d027f1a 100644
--- a/arch/arm/mach-mx2/devices.h
+++ b/arch/arm/mach-mx2/devices.h
@@ -1,3 +1,4 @@
+extern struct platform_device mxc_csi_device;
 extern struct platform_device mxc_gpt1;
 extern struct platform_device mxc_gpt2;
 extern struct platform_device mxc_gpt3;

-- 
Javier Martin
Vista Silicon S.L.
Universidad de Cantabria
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.