diff options
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/devices.c | 62 | ||||
-rw-r--r-- | arch/arm/mach-omap2/devices.h | 19 |
2 files changed, 57 insertions, 24 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 0d2d6a9c303c..e97851492847 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -35,6 +35,7 @@ | |||
35 | 35 | ||
36 | #include "mux.h" | 36 | #include "mux.h" |
37 | #include "control.h" | 37 | #include "control.h" |
38 | #include "devices.h" | ||
38 | 39 | ||
39 | #define L3_MODULES_MAX_LEN 12 | 40 | #define L3_MODULES_MAX_LEN 12 |
40 | #define L3_MODULES 3 | 41 | #define L3_MODULES 3 |
@@ -102,7 +103,7 @@ postcore_initcall(omap4_l3_init); | |||
102 | 103 | ||
103 | #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) | 104 | #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) |
104 | 105 | ||
105 | static struct resource cam_resources[] = { | 106 | static struct resource omap2cam_resources[] = { |
106 | { | 107 | { |
107 | .start = OMAP24XX_CAMERA_BASE, | 108 | .start = OMAP24XX_CAMERA_BASE, |
108 | .end = OMAP24XX_CAMERA_BASE + 0xfff, | 109 | .end = OMAP24XX_CAMERA_BASE + 0xfff, |
@@ -114,19 +115,13 @@ static struct resource cam_resources[] = { | |||
114 | } | 115 | } |
115 | }; | 116 | }; |
116 | 117 | ||
117 | static struct platform_device omap_cam_device = { | 118 | static struct platform_device omap2cam_device = { |
118 | .name = "omap24xxcam", | 119 | .name = "omap24xxcam", |
119 | .id = -1, | 120 | .id = -1, |
120 | .num_resources = ARRAY_SIZE(cam_resources), | 121 | .num_resources = ARRAY_SIZE(omap2cam_resources), |
121 | .resource = cam_resources, | 122 | .resource = omap2cam_resources, |
122 | }; | 123 | }; |
123 | 124 | #endif | |
124 | static inline void omap_init_camera(void) | ||
125 | { | ||
126 | platform_device_register(&omap_cam_device); | ||
127 | } | ||
128 | |||
129 | #elif defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE) | ||
130 | 125 | ||
131 | static struct resource omap3isp_resources[] = { | 126 | static struct resource omap3isp_resources[] = { |
132 | { | 127 | { |
@@ -135,11 +130,6 @@ static struct resource omap3isp_resources[] = { | |||
135 | .flags = IORESOURCE_MEM, | 130 | .flags = IORESOURCE_MEM, |
136 | }, | 131 | }, |
137 | { | 132 | { |
138 | .start = OMAP3430_ISP_CBUFF_BASE, | ||
139 | .end = OMAP3430_ISP_CBUFF_END, | ||
140 | .flags = IORESOURCE_MEM, | ||
141 | }, | ||
142 | { | ||
143 | .start = OMAP3430_ISP_CCP2_BASE, | 133 | .start = OMAP3430_ISP_CCP2_BASE, |
144 | .end = OMAP3430_ISP_CCP2_END, | 134 | .end = OMAP3430_ISP_CCP2_END, |
145 | .flags = IORESOURCE_MEM, | 135 | .flags = IORESOURCE_MEM, |
@@ -175,13 +165,33 @@ static struct resource omap3isp_resources[] = { | |||
175 | .flags = IORESOURCE_MEM, | 165 | .flags = IORESOURCE_MEM, |
176 | }, | 166 | }, |
177 | { | 167 | { |
178 | .start = OMAP3430_ISP_CSI2A_BASE, | 168 | .start = OMAP3430_ISP_CSI2A_REGS1_BASE, |
179 | .end = OMAP3430_ISP_CSI2A_END, | 169 | .end = OMAP3430_ISP_CSI2A_REGS1_END, |
170 | .flags = IORESOURCE_MEM, | ||
171 | }, | ||
172 | { | ||
173 | .start = OMAP3430_ISP_CSIPHY2_BASE, | ||
174 | .end = OMAP3430_ISP_CSIPHY2_END, | ||
175 | .flags = IORESOURCE_MEM, | ||
176 | }, | ||
177 | { | ||
178 | .start = OMAP3630_ISP_CSI2A_REGS2_BASE, | ||
179 | .end = OMAP3630_ISP_CSI2A_REGS2_END, | ||
180 | .flags = IORESOURCE_MEM, | ||
181 | }, | ||
182 | { | ||
183 | .start = OMAP3630_ISP_CSI2C_REGS1_BASE, | ||
184 | .end = OMAP3630_ISP_CSI2C_REGS1_END, | ||
185 | .flags = IORESOURCE_MEM, | ||
186 | }, | ||
187 | { | ||
188 | .start = OMAP3630_ISP_CSIPHY1_BASE, | ||
189 | .end = OMAP3630_ISP_CSIPHY1_END, | ||
180 | .flags = IORESOURCE_MEM, | 190 | .flags = IORESOURCE_MEM, |
181 | }, | 191 | }, |
182 | { | 192 | { |
183 | .start = OMAP3430_ISP_CSI2PHY_BASE, | 193 | .start = OMAP3630_ISP_CSI2C_REGS2_BASE, |
184 | .end = OMAP3430_ISP_CSI2PHY_END, | 194 | .end = OMAP3630_ISP_CSI2C_REGS2_END, |
185 | .flags = IORESOURCE_MEM, | 195 | .flags = IORESOURCE_MEM, |
186 | }, | 196 | }, |
187 | { | 197 | { |
@@ -197,15 +207,19 @@ static struct platform_device omap3isp_device = { | |||
197 | .resource = omap3isp_resources, | 207 | .resource = omap3isp_resources, |
198 | }; | 208 | }; |
199 | 209 | ||
200 | static inline void omap_init_camera(void) | 210 | int omap3_init_camera(struct isp_platform_data *pdata) |
201 | { | 211 | { |
202 | platform_device_register(&omap3isp_device); | 212 | omap3isp_device.dev.platform_data = pdata; |
213 | return platform_device_register(&omap3isp_device); | ||
203 | } | 214 | } |
204 | #else | 215 | |
205 | static inline void omap_init_camera(void) | 216 | static inline void omap_init_camera(void) |
206 | { | 217 | { |
207 | } | 218 | #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) |
219 | if (cpu_is_omap24xx()) | ||
220 | platform_device_register(&omap2cam_device); | ||
208 | #endif | 221 | #endif |
222 | } | ||
209 | 223 | ||
210 | struct omap_device_pm_latency omap_keyboard_latency[] = { | 224 | struct omap_device_pm_latency omap_keyboard_latency[] = { |
211 | { | 225 | { |
diff --git a/arch/arm/mach-omap2/devices.h b/arch/arm/mach-omap2/devices.h new file mode 100644 index 000000000000..f61eb6e5d136 --- /dev/null +++ b/arch/arm/mach-omap2/devices.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap2/devices.h | ||
3 | * | ||
4 | * OMAP2 platform device setup/initialization | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef __ARCH_ARM_MACH_OMAP_DEVICES_H | ||
13 | #define __ARCH_ARM_MACH_OMAP_DEVICES_H | ||
14 | |||
15 | struct isp_platform_data; | ||
16 | |||
17 | int omap3_init_camera(struct isp_platform_data *pdata); | ||
18 | |||
19 | #endif | ||