diff options
author | Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | 2009-04-03 09:34:05 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-06 20:43:58 -0400 |
commit | 6acc81c394393b853e731cc67f17ef277d521123 (patch) | |
tree | 62d2c852d4a8a63be7c552339774e5df2443ebb2 /arch/arm/mach-mx1 | |
parent | b71df97a3ffdb2bfc286c3fa0c2b1a0aa3a6bf88 (diff) |
V4L/DVB (11350): Add camera (CSI) driver for MX1
Add support for CMOS Sensor Interface on i.MX1 and i.MXL SoCs.
create mode 100644 arch/arm/mach-mx1/ksym_mx1.c
create mode 100644 arch/arm/mach-mx1/mx1_camera_fiq.S
create mode 100644 arch/arm/plat-mxc/include/mach/mx1_camera.h
create mode 100644 drivers/media/video/mx1_camera.c
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'arch/arm/mach-mx1')
-rw-r--r-- | arch/arm/mach-mx1/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/mach-mx1/devices.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx1/ksym_mx1.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-mx1/mx1_camera_fiq.S | 35 |
4 files changed, 57 insertions, 1 deletions
diff --git a/arch/arm/mach-mx1/Makefile b/arch/arm/mach-mx1/Makefile index 82f1309568ef..7f86fe073ec6 100644 --- a/arch/arm/mach-mx1/Makefile +++ b/arch/arm/mach-mx1/Makefile | |||
@@ -6,6 +6,9 @@ | |||
6 | 6 | ||
7 | obj-y += generic.o clock.o devices.o | 7 | obj-y += generic.o clock.o devices.o |
8 | 8 | ||
9 | # Support for CMOS sensor interface | ||
10 | obj-$(CONFIG_MX1_VIDEO) += ksym_mx1.o mx1_camera_fiq.o | ||
11 | |||
9 | # Specific board support | 12 | # Specific board support |
10 | obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o | 13 | obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o |
11 | obj-$(CONFIG_MACH_SCB9328) += scb9328.o \ No newline at end of file | 14 | obj-$(CONFIG_MACH_SCB9328) += scb9328.o \ No newline at end of file |
diff --git a/arch/arm/mach-mx1/devices.c b/arch/arm/mach-mx1/devices.c index 97f42d96d7a1..76d1ffb48079 100644 --- a/arch/arm/mach-mx1/devices.c +++ b/arch/arm/mach-mx1/devices.c | |||
@@ -44,7 +44,7 @@ static struct resource imx_csi_resources[] = { | |||
44 | static u64 imx_csi_dmamask = 0xffffffffUL; | 44 | static u64 imx_csi_dmamask = 0xffffffffUL; |
45 | 45 | ||
46 | struct platform_device imx_csi_device = { | 46 | struct platform_device imx_csi_device = { |
47 | .name = "imx-csi", | 47 | .name = "mx1-camera", |
48 | .id = 0, /* This is used to put cameras on this interface */ | 48 | .id = 0, /* This is used to put cameras on this interface */ |
49 | .dev = { | 49 | .dev = { |
50 | .dma_mask = &imx_csi_dmamask, | 50 | .dma_mask = &imx_csi_dmamask, |
diff --git a/arch/arm/mach-mx1/ksym_mx1.c b/arch/arm/mach-mx1/ksym_mx1.c new file mode 100644 index 000000000000..b09ee12a4ff0 --- /dev/null +++ b/arch/arm/mach-mx1/ksym_mx1.c | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * Exported ksyms of ARCH_MX1 | ||
3 | * | ||
4 | * Copyright (C) 2008, Darius Augulis <augulis.darius@gmail.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/platform_device.h> | ||
12 | #include <linux/module.h> | ||
13 | |||
14 | #include <mach/mx1_camera.h> | ||
15 | |||
16 | /* IMX camera FIQ handler */ | ||
17 | EXPORT_SYMBOL(mx1_camera_sof_fiq_start); | ||
18 | EXPORT_SYMBOL(mx1_camera_sof_fiq_end); | ||
diff --git a/arch/arm/mach-mx1/mx1_camera_fiq.S b/arch/arm/mach-mx1/mx1_camera_fiq.S new file mode 100644 index 000000000000..9c69aa65bf17 --- /dev/null +++ b/arch/arm/mach-mx1/mx1_camera_fiq.S | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | ||
3 | * | ||
4 | * Based on linux/arch/arm/lib/floppydma.S | ||
5 | * Copyright (C) 1995, 1996 Russell King | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #include <linux/linkage.h> | ||
12 | #include <asm/assembler.h> | ||
13 | |||
14 | .text | ||
15 | .global mx1_camera_sof_fiq_end | ||
16 | .global mx1_camera_sof_fiq_start | ||
17 | mx1_camera_sof_fiq_start: | ||
18 | @ enable dma | ||
19 | ldr r12, [r9] | ||
20 | orr r12, r12, #0x00000001 | ||
21 | str r12, [r9] | ||
22 | @ unmask DMA interrupt | ||
23 | ldr r12, [r8] | ||
24 | bic r12, r12, r13 | ||
25 | str r12, [r8] | ||
26 | @ disable SOF interrupt | ||
27 | ldr r12, [r10] | ||
28 | bic r12, r12, #0x00010000 | ||
29 | str r12, [r10] | ||
30 | @ clear SOF flag | ||
31 | mov r12, #0x00010000 | ||
32 | str r12, [r11] | ||
33 | @ return from FIQ | ||
34 | subs pc, lr, #4 | ||
35 | mx1_camera_sof_fiq_end: | ||