summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-04-24 10:16:33 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-04-24 10:16:33 -0300
commit4f7190619698d122a85d194712d27f69742ad7e3 (patch)
tree7d2650abf46a462909dd0d380980c5e154e5c3c1 /linux/drivers/media/video
parent4ce2737286cdc0e5da6fefe64e64a2c34d2254ff (diff)
parent2ba58137b1ebe360fd85cba358245d2136659d8b (diff)
downloadmediapointer-dvb-s2-4f7190619698d122a85d194712d27f69742ad7e3.tar.gz
mediapointer-dvb-s2-4f7190619698d122a85d194712d27f69742ad7e3.tar.bz2
merge: http://linuxtv.org/hg/~mkrufky/fixes
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/cx25840/cx25840-firmware.c50
1 files changed, 2 insertions, 48 deletions
diff --git a/linux/drivers/media/video/cx25840/cx25840-firmware.c b/linux/drivers/media/video/cx25840/cx25840-firmware.c
index 539de43dd..e14e0bc1f 100644
--- a/linux/drivers/media/video/cx25840/cx25840-firmware.c
+++ b/linux/drivers/media/video/cx25840/cx25840-firmware.c
@@ -44,34 +44,16 @@
#define FWDEV(x) (x)->name
#endif
-static int fastfw = 1;
static char *firmware = FWFILE;
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
-module_param(fastfw, bool, 0444);
module_param(firmware, charp, 0444);
#else
-MODULE_PARM(fastfw, "i");
MODULE_PARM(firmware, "s");
#endif
-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 */
@@ -81,16 +63,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 */
@@ -117,30 +93,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;