aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2006-04-23 05:54:56 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-05-12 19:55:12 -0300
commit7d16eaa3d0d41a6e871e5c82720bcd006b202d55 (patch)
treec3d44ea9a30887aac9e3d0ed3b1fe66b25a943f7 /drivers/media/video
parent5691c8473936508c51639b6ff8467e55d8b129c1 (diff)
V4L/DVB (3825): Remove broken 'fast firmware load' from cx25840.
The fast firmware load hack in cx25840 uses private data. In fact, it breaks pvrusb2 and doesn't work at all with ivtv. It is a unsafe implementation and so it is removed. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/cx25840/cx25840-firmware.c49
1 files changed, 2 insertions, 47 deletions
diff --git a/drivers/media/video/cx25840/cx25840-firmware.c b/drivers/media/video/cx25840/cx25840-firmware.c
index f59ced181c5..1958d4016ea 100644
--- a/drivers/media/video/cx25840/cx25840-firmware.c
+++ b/drivers/media/video/cx25840/cx25840-firmware.c
@@ -39,29 +39,12 @@
#define FWDEV(x) &((x)->adapter->dev)
-static int fastfw = 1;
static char *firmware = FWFILE;
-module_param(fastfw, bool, 0444);
module_param(firmware, charp, 0444);
-MODULE_PARM_DESC(fastfw, "Load firmware fast [0=100MHz 1=333MHz (default)]");
MODULE_PARM_DESC(firmware, "Firmware image [default: " FWFILE "]");
-static void set_i2c_delay(struct i2c_client *client, int delay)
-{
- struct i2c_algo_bit_data *algod = client->adapter->algo_data;
-
- /* We aren't guaranteed to be using algo_bit,
- * so avoid the null pointer dereference
- * and disable the 'fast firmware load' */
- if (algod) {
- algod->udelay = delay;
- } else {
- fastfw = 0;
- }
-}
-
static void start_fw_load(struct i2c_client *client)
{
/* DL_ADDR_LB=0 DL_ADDR_HB=0 */
@@ -71,16 +54,10 @@ static void start_fw_load(struct i2c_client *client)
cx25840_write(client, 0x803, 0x0b);
/* AUTO_INC_DIS=1 */
cx25840_write(client, 0x000, 0x20);
-
- if (fastfw)
- set_i2c_delay(client, 3);
}
static void end_fw_load(struct i2c_client *client)
{
- if (fastfw)
- set_i2c_delay(client, 10);
-
/* AUTO_INC_DIS=0 */
cx25840_write(client, 0x000, 0x00);
/* DL_ENABLE=0 */
@@ -107,30 +84,8 @@ static int fw_write(struct i2c_client *client, u8 * data, int size)
int sent;
if ((sent = i2c_master_send(client, data, size)) < size) {
-
- if (fastfw) {
- v4l_err(client, "333MHz i2c firmware load failed\n");
- fastfw = 0;
- set_i2c_delay(client, 10);
-
- if (sent > 2) {
- u16 dl_addr = cx25840_read(client, 0x801) << 8;
- dl_addr |= cx25840_read(client, 0x800);
- dl_addr -= sent - 2;
- cx25840_write(client, 0x801, dl_addr >> 8);
- cx25840_write(client, 0x800, dl_addr & 0xff);
- }
-
- if (i2c_master_send(client, data, size) < size) {
- v4l_err(client, "100MHz i2c firmware load failed\n");
- return -ENOSYS;
- }
-
- } else {
- v4l_err(client, "firmware load i2c failure\n");
- return -ENOSYS;
- }
-
+ v4l_err(client, "firmware load i2c failure\n");
+ return -ENOSYS;
}
return 0;