Skip to contentSkip to conversation

OMAP2: camera update

PATCH New Komal Shah 1 participant 1 message Apr 28, 2006

Subsystems (4)
lore
Share & tools
lore

Komal Shah

author
#0 lore raw

PATCH 1/1 OMAP2: camera update

Tony/David,

* This patch adds the new vb_dma_* helpers introduced in the v4l2 fwk.
* Added helpers for OMAP1 camera core, and builds for H2 and H3.
* For H4, read and mmap method works, but userptr is not working, need to investigate.

This patch doesn't follow the new rules of submitting omap core modified files patches, as I need to rush to catch the flight :). May not be able to work on this for next week.

---Komal Shah
http://komalshah.blogspot.com/

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

arch/arm/mach-omap2/devices.c +35 -0
index fb7f91d..f189f2c 100644
@@ -25,6 +25,40 @@
 #include <asm/arch/mux.h>
 #include <asm/arch/gpio.h>
 
+
+/*-------------------------------------------------------------------------*/
+#if defined(CONFIG_VIDEO_OMAP_CAMERA) || defined(CONFIG_VIDEO_OMAP_CAMERA_MODULE)
+
+#define OMAP2_CAM_BASE		0x48052000
+#define OMAP2_CAM_MPU_IRQ	24
+
+static struct resource cam_resources[] = {
+	{
+		.start		= OMAP2_CAM_BASE,
+		.end		= OMAP2_CAM_BASE + 0xfff,
+		.flags		= IORESOURCE_MEM,
+	},
+	{
+		.start		= OMAP2_CAM_MPU_IRQ,
+		.flags		= IORESOURCE_IRQ,
+	}
+};
+
+static struct platform_device omap_cam_device = {
+	.name		= "cam_omap",
+	.id		= 0,
+	.num_resources	= ARRAY_SIZE(cam_resources),
+	.resource	= cam_resources,
+};
+
+static inline void omap_init_camera(void)
+{
+	platform_device_register(&omap_cam_device);
+}
+#else
+static inline void omap_init_camera(void) {}
+#endif
+
 #if 	defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE)
 
 #define OMAP2_I2C_BASE2		0x48072000
@@ -112,6 +146,7 @@
 	/* please keep these calls, and their implementations above,
 	 * in alphabetical order so they're easier to sort through.
 	 */
+	omap_init_camera();
 	omap_init_i2c();
 	omap_init_sti();
 
drivers/media/video/omap/Makefile +2 -3
index 10987be..454b056 100644
@@ -3,9 +3,8 @@
 obj-$(CONFIG_VIDEO_OMAP_CAMERA) += omapcamera.o
 obj-$(CONFIG_VIDEO_CAMERA_SENSOR_OV9640) += sensor_ov9640.o
 
-objs-yy := camera_core.o
-
-objs-y$(CONFIG_ARCH_OMAP16XX) += omap16xxcam.o
+objs-y$(CONFIG_ARCH_OMAP16XX) += camera_core.o omap16xxcam.o
+objs-y$(CONFIG_ARCH_OMAP24XX) += omap24xxcam.o omap24xxlib.o
 objs-y$(CONFIG_MACH_OMAP_H3) += h3_sensor_power.o
 objs-y$(CONFIG_MACH_OMAP_H4) += h4_sensor_power.o
 
drivers/media/video/omap/camera_core.c +49 -6

93 lines not on this page · raw message

drivers/media/video/omap/camera_core.h +1 -0
index 9ab336f..cffc263 100644
@@ -104,6 +104,7 @@
 	 * VIDIOC_S_FMT/VIDIOC_G_FMT ioctls with a CAPTURE buffer type.
 	 */
 	struct v4l2_pix_format pix;
+	struct v4l2_pix_format pix2;
 
 	/* crop defines the size and offset of the video overlay source window 
 	 * within the framebuffer.  These parameters are set/queried by the 
drivers/media/video/omap/omap24xxcam.c new file +2948 -0

2,842 lines not on this page · raw message

drivers/media/video/omap/omap24xxcam.h new file +870 -0

870 lines not on this page · raw message

drivers/media/video/omap/omap24xxlib.c new file +264 -0

264 lines not on this page · raw message

drivers/media/video/omap/omap24xxlib.h new file +39 -0
new file mode 100644
index 0000000..f778291

Lines of this file are not shown. View the raw message.

drivers/media/video/omap/sensor_if.h +46 -4

50 lines not on this page · raw message

drivers/media/video/omap/sensor_ov9640.c +38 -9

47 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.