]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap2/devices.c
OMAP3 camera driver: OMAP34XXCAM: Camera Base Address.
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / devices.c
index c7de03ea9309bb8109dd167ec7443514cdee7b03..f0e601c78c47ac9aebec4059e1eb94ddebb0a142 100644 (file)
@@ -46,6 +46,32 @@ static struct platform_device omap_cam_device = {
        .resource       = cam_resources,
 };
 
+static inline void omap_init_camera(void)
+{
+       platform_device_register(&omap_cam_device);
+}
+
+#elif defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE)
+
+static struct resource cam_resources[] = {
+       {
+               .start          = OMAP34XX_CAMERA_BASE,
+               .end            = OMAP34XX_CAMERA_BASE + 0x1B70,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = INT_34XX_CAM_IRQ,
+               .flags          = IORESOURCE_IRQ,
+       }
+};
+
+static struct platform_device omap_cam_device = {
+       .name           = "omap34xxcam",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(cam_resources),
+       .resource       = cam_resources,
+};
+
 static inline void omap_init_camera(void)
 {
        platform_device_register(&omap_cam_device);