diff options
author | Baruch Siach <baruch@tkos.co.il> | 2010-07-04 00:55:10 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-07-28 03:28:36 -0400 |
commit | 2066930de6296ef7470de11eaa9b8bc9129721e8 (patch) | |
tree | 109fb2f88a5dce7b95f58771845ed0feccaa4b92 /arch/arm/plat-mxc | |
parent | 14cb0deb66fcfca8fdbef75da8c84b5405a8c767 (diff) |
mx2_camera: Add soc_camera support for i.MX25/i.MX27
This is the soc_camera support developed by Sascha Hauer for the i.MX27. Alan
Carvalho de Assis modified the original driver to get it working on more recent
kernels. I modified it further to add support for i.MX25. This driver has been
tested on i.MX25 and i.MX27 based platforms.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/plat-mxc')
-rw-r--r-- | arch/arm/plat-mxc/include/mach/memory.h | 4 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/mx2_cam.h | 46 |
2 files changed, 48 insertions, 2 deletions
diff --git a/arch/arm/plat-mxc/include/mach/memory.h b/arch/arm/plat-mxc/include/mach/memory.h index c4b40c35a6a1..564ec9dbc93d 100644 --- a/arch/arm/plat-mxc/include/mach/memory.h +++ b/arch/arm/plat-mxc/include/mach/memory.h | |||
@@ -44,12 +44,12 @@ | |||
44 | */ | 44 | */ |
45 | #define CONSISTENT_DMA_SIZE SZ_8M | 45 | #define CONSISTENT_DMA_SIZE SZ_8M |
46 | 46 | ||
47 | #elif defined(CONFIG_MX1_VIDEO) | 47 | #elif defined(CONFIG_MX1_VIDEO) || defined(CONFIG_VIDEO_MX2_HOSTSUPPORT) |
48 | /* | 48 | /* |
49 | * Increase size of DMA-consistent memory region. | 49 | * Increase size of DMA-consistent memory region. |
50 | * This is required for i.MX camera driver to capture at least four VGA frames. | 50 | * This is required for i.MX camera driver to capture at least four VGA frames. |
51 | */ | 51 | */ |
52 | #define CONSISTENT_DMA_SIZE SZ_4M | 52 | #define CONSISTENT_DMA_SIZE SZ_4M |
53 | #endif /* CONFIG_MX1_VIDEO */ | 53 | #endif /* CONFIG_MX1_VIDEO || CONFIG_VIDEO_MX2_HOSTSUPPORT */ |
54 | 54 | ||
55 | #endif /* __ASM_ARCH_MXC_MEMORY_H__ */ | 55 | #endif /* __ASM_ARCH_MXC_MEMORY_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/mx2_cam.h b/arch/arm/plat-mxc/include/mach/mx2_cam.h new file mode 100644 index 000000000000..3c080a32dbf5 --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/mx2_cam.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * mx2-cam.h - i.MX27/i.MX25 camera driver header file | ||
3 | * | ||
4 | * Copyright (C) 2003, Intel Corporation | ||
5 | * Copyright (C) 2008, Sascha Hauer <s.hauer@pengutronix.de> | ||
6 | * Copyright (C) 2010, Baruch Siach <baruch@tkos.co.il> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
21 | */ | ||
22 | |||
23 | #ifndef __MACH_MX2_CAM_H_ | ||
24 | #define __MACH_MX2_CAM_H_ | ||
25 | |||
26 | #define MX2_CAMERA_SWAP16 (1 << 0) | ||
27 | #define MX2_CAMERA_EXT_VSYNC (1 << 1) | ||
28 | #define MX2_CAMERA_CCIR (1 << 2) | ||
29 | #define MX2_CAMERA_CCIR_INTERLACE (1 << 3) | ||
30 | #define MX2_CAMERA_HSYNC_HIGH (1 << 4) | ||
31 | #define MX2_CAMERA_GATED_CLOCK (1 << 5) | ||
32 | #define MX2_CAMERA_INV_DATA (1 << 6) | ||
33 | #define MX2_CAMERA_PCLK_SAMPLE_RISING (1 << 7) | ||
34 | #define MX2_CAMERA_PACK_DIR_MSB (1 << 8) | ||
35 | |||
36 | /** | ||
37 | * struct mx2_camera_platform_data - optional platform data for mx2_camera | ||
38 | * @flags: any combination of MX2_CAMERA_* | ||
39 | * @clk: clock rate of the csi block / 2 | ||
40 | */ | ||
41 | struct mx2_camera_platform_data { | ||
42 | unsigned long flags; | ||
43 | unsigned long clk; | ||
44 | }; | ||
45 | |||
46 | #endif /* __MACH_MX2_CAM_H_ */ | ||