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

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

 



This patch would we for the case that csi and prp are considered as a
single device, which is the option I think it's more adjusted to the
v4l capture model. It's like the i.mx31 case where CSI is integrate
inside the IPU.

Signed-off-by: Javier Martin <javier.martin@xxxxxxxxxxxxxxxxx>
---
 arch/arm/mach-mx2/devices.c |   48 +++++++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-mx2/devices.h |    1 +
 2 files changed, 49 insertions(+), 0 deletions(-)

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

 #include "devices.h"

+
+static struct resource mxc_csi_prp_resources[] = {
+	[0] = {
+		.start  = CSI_BASE_ADDR,
+		.end    = CSI_BASE_ADDR + 0x1f,
+		.flags  = IORESOURCE_MEM,
+	},
+	[1] = {
+		.start	= EMMA_PRP_BASE_ADDR,
+		.end	= EMMA_PRP_BASE_ADDR + 0x83,
+		.flags	= IORESOURCE_MEM,
+	},
+	[2] = {
+		.start  = MXC_INT_CSI,
+		.end    = MXC_INT_CSI,
+		.flags  = IORESOURCE_IRQ,
+	},
+	[3] = {
+		.start	= MXC_INT_EMMAPRP,
+		.end	= MXC_INT_EMMAPRP,
+		.flags	= IORESOURCE_IRQ,
+	},
+	[4] = {
+		.start  = DMA_REQ_CSI_RX,
+		.end    = DMA_REQ_CSI_RX,
+		.flags  = IORESOURCE_DMA
+	},
+	[5] = {
+		.start  = DMA_REQ_CSI_STAT,
+		.end    = DMA_REQ_CSI_STAT,
+		.flags  = IORESOURCE_DMA
+	},
+};
+
+static u64 mxc_csi_prp_dmamask = 0xffffffffUL;
+
+struct platform_device mxc_csi_prp_device = {
+	.name           = "mxc-camera",
+	.id             = 0,
+	.dev		= {
+		.dma_mask = &mxc_csi_prp_dmamask,
+		.coherent_dma_mask = 0xffffffff,
+	},
+	.resource       = mxc_csi_prp_resources,
+	.num_resources  = ARRAY_SIZE(mxc_csi_prp_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..abeb2c9 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_prp_device;
 extern struct platform_device mxc_gpt1;
 extern struct platform_device mxc_gpt2;
 extern struct platform_device mxc_gpt3;
---
Please comment.

Thank you.
-- 
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

[Index of Archives]     [Linux Media]     [Older V4L]     [Linux DVB]     [Video Disk Recorder]     [Linux Kernel]     [Asterisk]     [DCCP]     [Netdev]     [X.org]     [Util Linux]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [SSH]     [DVB Maintainers]     [Linux USB]     [Yosemite Information]
  Powered by Linux