diff options
Diffstat (limited to 'arch/arm/mach-omap1/devices.c')
-rw-r--r-- | arch/arm/mach-omap1/devices.c | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index b583121b04b9..ea0d80a89da7 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * (at your option) any later version. | 9 | * (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/dma-mapping.h> | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
@@ -192,6 +193,48 @@ static inline void omap_init_spi100k(void) | |||
192 | } | 193 | } |
193 | #endif | 194 | #endif |
194 | 195 | ||
196 | |||
197 | #define OMAP1_CAMERA_BASE 0xfffb6800 | ||
198 | #define OMAP1_CAMERA_IOSIZE 0x1c | ||
199 | |||
200 | static struct resource omap1_camera_resources[] = { | ||
201 | [0] = { | ||
202 | .start = OMAP1_CAMERA_BASE, | ||
203 | .end = OMAP1_CAMERA_BASE + OMAP1_CAMERA_IOSIZE - 1, | ||
204 | .flags = IORESOURCE_MEM, | ||
205 | }, | ||
206 | [1] = { | ||
207 | .start = INT_CAMERA, | ||
208 | .flags = IORESOURCE_IRQ, | ||
209 | }, | ||
210 | }; | ||
211 | |||
212 | static u64 omap1_camera_dma_mask = DMA_BIT_MASK(32); | ||
213 | |||
214 | static struct platform_device omap1_camera_device = { | ||
215 | .name = "omap1-camera", | ||
216 | .id = 0, /* This is used to put cameras on this interface */ | ||
217 | .dev = { | ||
218 | .dma_mask = &omap1_camera_dma_mask, | ||
219 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
220 | }, | ||
221 | .num_resources = ARRAY_SIZE(omap1_camera_resources), | ||
222 | .resource = omap1_camera_resources, | ||
223 | }; | ||
224 | |||
225 | void __init omap1_camera_init(void *info) | ||
226 | { | ||
227 | struct platform_device *dev = &omap1_camera_device; | ||
228 | int ret; | ||
229 | |||
230 | dev->dev.platform_data = info; | ||
231 | |||
232 | ret = platform_device_register(dev); | ||
233 | if (ret) | ||
234 | dev_err(&dev->dev, "unable to register device: %d\n", ret); | ||
235 | } | ||
236 | |||
237 | |||
195 | /*-------------------------------------------------------------------------*/ | 238 | /*-------------------------------------------------------------------------*/ |
196 | 239 | ||
197 | static inline void omap_init_sti(void) {} | 240 | static inline void omap_init_sti(void) {} |
@@ -258,3 +301,30 @@ static int __init omap1_init_devices(void) | |||
258 | } | 301 | } |
259 | arch_initcall(omap1_init_devices); | 302 | arch_initcall(omap1_init_devices); |
260 | 303 | ||
304 | #if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE) | ||
305 | |||
306 | static struct resource wdt_resources[] = { | ||
307 | { | ||
308 | .start = 0xfffeb000, | ||
309 | .end = 0xfffeb07F, | ||
310 | .flags = IORESOURCE_MEM, | ||
311 | }, | ||
312 | }; | ||
313 | |||
314 | static struct platform_device omap_wdt_device = { | ||
315 | .name = "omap_wdt", | ||
316 | .id = -1, | ||
317 | .num_resources = ARRAY_SIZE(wdt_resources), | ||
318 | .resource = wdt_resources, | ||
319 | }; | ||
320 | |||
321 | static int __init omap_init_wdt(void) | ||
322 | { | ||
323 | if (!cpu_is_omap16xx()) | ||
324 | return; | ||
325 | |||
326 | platform_device_register(&omap_wdt_device); | ||
327 | return 0; | ||
328 | } | ||
329 | subsys_initcall(omap_init_wdt); | ||
330 | #endif | ||