Skip to contentSkip to conversation

cpia2: use request_firmware()

PATCH In review David Woodhouse 2 participants 2 messages Jun 23, 2008 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpia2: use request_firmware()

Thanks for Jaswinder Singh for converting the firmware blob itself to ihex.

---
 drivers/media/video/cpia2/Kconfig      |    8 +
 drivers/media/video/cpia2/cpia2_core.c |   46 +++++--
 drivers/media/video/cpia2/cpia2patch.h |  233 --------------------------------
 firmware/Makefile                      |    1 +
 firmware/WHENCE                        |   13 ++
 firmware/cpia2/stv0672_vp4.bin.ihex    |   73 ++++++++++
 6 files changed, 132 insertions(+), 242 deletions(-)
 delete mode 100644 drivers/media/video/cpia2/cpia2patch.h
 create mode 100644 firmware/cpia2/stv0672_vp4.bin.ihex
drivers/media/video/cpia2/Kconfig +8 -0
index e39a961..64d9866 100644
@@ -1,9 +1,17 @@
 config VIDEO_CPIA2
 	tristate "CPiA2 Video For Linux"
 	depends on VIDEO_DEV && USB && VIDEO_V4L1
+	select FW_LOADER
 	---help---
 	  This is the video4linux driver for cameras based on Vision's CPiA2
 	  (Colour Processor Interface ASIC), such as the Digital Blue QX5
 	  Microscope. If you have one of these cameras, say Y here
 
 	  This driver is also available as a module (cpia2).
+
+config VIDEO_CPIA2_FIRMWARE
+	bool "Compile CPiA2 VP4 firmware into the kernel"
+	depends on VIDEO_CPIA2
+	---help---
+	  This includes firmware for CPiA2 VP4 in the kernel image.
+	  Say 'N' and let it get loaded from userspace on demand.
drivers/media/video/cpia2/cpia2_core.c +37 -9

72 lines not on this page · raw message

drivers/media/video/cpia2/cpia2patch.h deleted +0 -233

233 lines not on this page · raw message

firmware/Makefile +1 -0
index d0decbd..ec46a55 100644
@@ -49,6 +49,7 @@ fw-shipped-$(CONFIG_USB_SERIAL_WHITEHEAT_FIRMWARE) += whiteheat_loader.fw \
 		whiteheat.fw # whiteheat_loader_debug.fw
 fw-shipped-$(CONFIG_ATM_AMBASSADOR_FIRMWARE) += atmsar11.fw
 fw-shipped-$(CONFIG_COMPUTONE_FIRMWARE) += intelliport2.bin
+fw-shipped-$(CONFIG_VIDEO_CPIA2_FIRMWARE) += cpia2/stv0672_vp4.bin
 
 firmware-y    := $(fw-external-y) $(fw-shipped-y)
 firmware-dirs := $(sort $(patsubst %,$(objtree)/$(obj)/%/,$(dir $(firmware-y))))
firmware/WHENCE +13 -0
index 49ac8ba..235b47e 100644
@@ -289,3 +289,16 @@ Licence: GPLv2 or later
 ARM assembly source code available at http://www.linuxtv.org/downloads/firmware/Boot.S
 
 --------------------------------------------------------------------------
+
+Driver: CPiA2 -- cameras based on Vision's CPiA2
+
+File: cpia2/stv0672_vp4.bin
+
+Licence: Allegedly GPLv2+, but no source visible. Marked:
+	Copyright (C) 2001 STMicroelectronics, Inc.
+	Contact:  [email protected]
+	Description: This file contains patch data for the CPiA2 (stv0672) VP4.
+
+Found in hex form in kernel source.
+
+--------------------------------------------------------------------------
firmware/cpia2/stv0672_vp4.bin.ihex new file +73 -0

73 lines not on this page · raw message

Signature · 5 lines
1.5.5.1


-- 
dwmw2
#1 lore raw

Hi David,

drivers/media/video/cpia2/Kconfig line 4

Quoted 9 lines · On Mon, 23 Jun 2008 12:03:33 +0100 David Woodhouse <[email protected]> wrote:
drivers/media/video/cpia2/Kconfig +1 -0
index e39a961..64d9866 100644
@@ -1,9 +1,17 @@
 config VIDEO_CPIA2
 	tristate "CPiA2 Video For Linux"
 	depends on VIDEO_DEV && USB && VIDEO_V4L1
+	select FW_LOADER

Since select doesn't check for dependencies, on all places you select FW_LOADER, you also need to add "depends on HOTPLUG" since FW_LOADER is defined as(at drivers/base/Kconfig):

config FW_LOADER
tristate "Userspace firmware loading support" depends on HOTPLUG

Cheers,
Mauro