diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0045-omap3beagle-camera-Cleanup-of-boardfile.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0045-omap3beagle-camera-Cleanup-of-boardfile.patch | 161 |
1 files changed, 161 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0045-omap3beagle-camera-Cleanup-of-boardfile.patch b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0045-omap3beagle-camera-Cleanup-of-boardfile.patch new file mode 100644 index 00000000..f4c6ba02 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0045-omap3beagle-camera-Cleanup-of-boardfile.patch | |||
@@ -0,0 +1,161 @@ | |||
1 | From 62059bb8a86836a042bf1720a9bc4bdfa301026f Mon Sep 17 00:00:00 2001 | ||
2 | From: Sergio Aguirre <saaguirre@ti.com> | ||
3 | Date: Mon, 12 Jul 2010 15:44:18 -0500 | ||
4 | Subject: [PATCH 45/75] omap3beagle: camera: Cleanup of boardfile | ||
5 | |||
6 | This removes a lot of dead code. | ||
7 | |||
8 | Signed-off-by: Sergio Aguirre <saaguirre@ti.com> | ||
9 | --- | ||
10 | arch/arm/mach-omap2/board-omap3beagle-camera.c | 51 ++++++++++++++++++------ | ||
11 | arch/arm/mach-omap2/board-omap3beagle-camera.h | 41 ------------------- | ||
12 | 2 files changed, 38 insertions(+), 54 deletions(-) | ||
13 | delete mode 100644 arch/arm/mach-omap2/board-omap3beagle-camera.h | ||
14 | |||
15 | diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c | ||
16 | index 90eadd0..befa7d4 100644 | ||
17 | --- a/arch/arm/mach-omap2/board-omap3beagle-camera.c | ||
18 | +++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c | ||
19 | @@ -44,9 +44,6 @@ | ||
20 | #include <../drivers/media/video/isp/ispreg.h> | ||
21 | |||
22 | #include "mux.h" | ||
23 | -#include "board-omap3beagle-camera.h" | ||
24 | - | ||
25 | -#define MODULE_NAME "omap3beaglelmb" | ||
26 | |||
27 | #define CAM_USE_XCLKA 0 | ||
28 | |||
29 | @@ -129,11 +126,7 @@ static int mt9v113_set_prv_data(void *priv) | ||
30 | if (priv == NULL) | ||
31 | return -EINVAL; | ||
32 | |||
33 | - hwc->u.sensor = mt9v113_hwc.u.sensor; | ||
34 | - hwc->dev_index = mt9v113_hwc.dev_index; | ||
35 | - hwc->dev_minor = mt9v113_hwc.dev_minor; | ||
36 | - hwc->dev_type = mt9v113_hwc.dev_type; | ||
37 | - | ||
38 | + *hwc = mt9v113_hwc; | ||
39 | return 0; | ||
40 | } | ||
41 | |||
42 | @@ -204,10 +197,6 @@ struct mt9v113_platform_data mt9v113_pdata = { | ||
43 | .power_set = mt9v113_power_set, | ||
44 | .priv_data_set = mt9v113_set_prv_data, | ||
45 | .ifparm = mt9v113_ifparm, | ||
46 | - /* Some interface dependent params */ | ||
47 | - .clk_polarity = 0, /* data clocked out on falling edge */ | ||
48 | - .hs_polarity = 1, /* 0 - Active low, 1- Active high */ | ||
49 | - .vs_polarity = 1, /* 0 - Active low, 1- Active high */ | ||
50 | }; | ||
51 | |||
52 | static int beagle_cam_probe(struct platform_device *pdev) | ||
53 | @@ -217,6 +206,7 @@ static int beagle_cam_probe(struct platform_device *pdev) | ||
54 | dev_err(&pdev->dev, "vaux3_1 regulator missing\n"); | ||
55 | return PTR_ERR(beagle_mt9v113_1_8v1); | ||
56 | } | ||
57 | + | ||
58 | beagle_mt9v113_1_8v2 = regulator_get(&pdev->dev, "vaux4_1"); | ||
59 | if (IS_ERR(beagle_mt9v113_1_8v2)) { | ||
60 | dev_err(&pdev->dev, "vaux4_1 regulator missing\n"); | ||
61 | @@ -235,7 +225,41 @@ static int beagle_cam_probe(struct platform_device *pdev) | ||
62 | /* set to output mode, default value 0 */ | ||
63 | gpio_direction_output(LEOPARD_RESET_GPIO, 0); | ||
64 | |||
65 | - printk(KERN_INFO MODULE_NAME ": Driver registration complete \n"); | ||
66 | + /* MUX init */ | ||
67 | + omap_ctrl_writew(OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0, | ||
68 | + 0x10C); /* CAM_HS */ | ||
69 | + omap_ctrl_writew(OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0, | ||
70 | + 0x10E); /* CAM_VS */ | ||
71 | + omap_ctrl_writew(OMAP_PIN_OUTPUT | OMAP_MUX_MODE0, | ||
72 | + 0x110); /* CAM_XCLKA */ | ||
73 | + omap_ctrl_writew(OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0, | ||
74 | + 0x112); /* CAM_PCLK */ | ||
75 | + omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0, | ||
76 | + 0x116); /* CAM_D0 */ | ||
77 | + omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0, | ||
78 | + 0x118); /* CAM_D1 */ | ||
79 | + omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0, | ||
80 | + 0x11A); /* CAM_D2 */ | ||
81 | + omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0, | ||
82 | + 0x11C); /* CAM_D3 */ | ||
83 | + omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0, | ||
84 | + 0x11E); /* CAM_D4 */ | ||
85 | + omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0, | ||
86 | + 0x120); /* CAM_D5 */ | ||
87 | + omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0, | ||
88 | + 0x122); /* CAM_D6 */ | ||
89 | + omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0, | ||
90 | + 0x124); /* CAM_D7 */ | ||
91 | + omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0, | ||
92 | + 0x126); /* CAM_D8 */ | ||
93 | + omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0, | ||
94 | + 0x128); /* CAM_D9 */ | ||
95 | + omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0, | ||
96 | + 0x12A); /* CAM_D10 */ | ||
97 | + omap_ctrl_writew(OMAP_PIN_INPUT | OMAP_MUX_MODE0, | ||
98 | + 0x12C); /* CAM_D11 */ | ||
99 | + | ||
100 | + printk(KERN_INFO "omap3beaglelmb: Driver registration complete\n"); | ||
101 | |||
102 | return 0; | ||
103 | } | ||
104 | @@ -287,6 +311,7 @@ static struct platform_driver beagle_cam_driver = { | ||
105 | */ | ||
106 | int __init omap3beaglelmb_init(void) | ||
107 | { | ||
108 | + /* NOTE: Beagle xM boards are the only ones with camera interface */ | ||
109 | if (cpu_is_omap3630()) | ||
110 | platform_driver_register(&beagle_cam_driver); | ||
111 | |||
112 | diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.h b/arch/arm/mach-omap2/board-omap3beagle-camera.h | ||
113 | deleted file mode 100644 | ||
114 | index 1026aeb..0000000 | ||
115 | --- a/arch/arm/mach-omap2/board-omap3beagle-camera.h | ||
116 | +++ /dev/null | ||
117 | @@ -1,41 +0,0 @@ | ||
118 | -/* | ||
119 | - * Copyright (C) 2010 Texas Instruments Inc | ||
120 | - * Author: Sergio Aguirre <saaguirre@ti.com> | ||
121 | - * | ||
122 | - * Based on work done by: | ||
123 | - * Vaibhav Hiremath <hvaibhav@ti.com> | ||
124 | - * Anuj Aggarwal <anuj.aggarwal@ti.com> | ||
125 | - * Sivaraj R <sivaraj@ti.com> | ||
126 | - * | ||
127 | - * This package is free software; you can redistribute it and/or modify | ||
128 | - * it under the terms of the GNU General Public License version 2 as | ||
129 | - * published by the Free Software Foundation. | ||
130 | - * | ||
131 | - * This program is distributed in the hope that it will be useful, | ||
132 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
133 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
134 | - * GNU General Public License for more details. | ||
135 | - * | ||
136 | - * You should have received a copy of the GNU General Public License | ||
137 | - * along with this program; if not, write to the Free Software | ||
138 | - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
139 | - */ | ||
140 | - | ||
141 | -#ifndef __BOARD_OMAP3BEAGLE_LMB_H_ | ||
142 | -#define __BOARD_OMAP3BEAGLE_LMB_H_ | ||
143 | - | ||
144 | -/* mux id to enable/disable signal routing to different peripherals */ | ||
145 | -enum omap3beaglelmb_mux { | ||
146 | - MUX_TVP5146 = 0, | ||
147 | - MUX_CAMERA_SENSOR, | ||
148 | - MUX_EXP_CAMERA_SENSOR, | ||
149 | - NUM_MUX | ||
150 | -}; | ||
151 | - | ||
152 | -/* enum to enable or disable mux */ | ||
153 | -enum config_mux { | ||
154 | - DISABLE_MUX, | ||
155 | - ENABLE_MUX | ||
156 | -}; | ||
157 | - | ||
158 | -#endif /* __BOARD_OMAP3BEAGLE_LMB_H_ */ | ||
159 | -- | ||
160 | 1.6.6.1 | ||
161 | |||