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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


The patch applies over 2.6.30 kernel.

Signed-off-by: Javier Martin <javier.martin@xxxxxxxxxxxxxxxxx>
---
 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:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

[Linux Media]     [Older V4L]     [Linux DVB]     [Video Disk Recorder]     [Linux Kernel]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [SSH]     [DVB Maintainers]     [Linux USB]     [Yosemite Information]

Add to Google Powered by Linux