Commit 034351ff authored by Rémi Cardona's avatar Rémi Cardona Committed by Mauro Carvalho Chehab

[media] ds3000: add module parameter to force firmware upload

[mchehab@redhat.com: Fix a merge conflict]
Signed-off-by: default avatarRémi Cardona <remi.cardona@smartjog.com>
Reviewed-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent c2c1b415
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "ds3000.h" #include "ds3000.h"
static int debug; static int debug;
static int force_fw_upload;
#define dprintk(args...) \ #define dprintk(args...) \
do { \ do { \
...@@ -392,11 +393,13 @@ static int ds3000_firmware_ondemand(struct dvb_frontend *fe) ...@@ -392,11 +393,13 @@ static int ds3000_firmware_ondemand(struct dvb_frontend *fe)
dprintk("%s()\n", __func__); dprintk("%s()\n", __func__);
if (ds3000_readreg(state, 0xb2) <= 0) ret = ds3000_readreg(state, 0xb2);
if (ret < 0)
return ret; return ret;
if (state->skip_fw_load) if (state->skip_fw_load || !force_fw_upload)
return 0; return 0; /* Firmware already uploaded, skipping */
/* Load firmware */ /* Load firmware */
/* request the firmware, this will block until someone uploads it */ /* request the firmware, this will block until someone uploads it */
printk(KERN_INFO "%s: Waiting for firmware upload (%s)...\n", __func__, printk(KERN_INFO "%s: Waiting for firmware upload (%s)...\n", __func__,
...@@ -1306,6 +1309,9 @@ static struct dvb_frontend_ops ds3000_ops = { ...@@ -1306,6 +1309,9 @@ static struct dvb_frontend_ops ds3000_ops = {
module_param(debug, int, 0644); module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Activates frontend debugging (default:0)"); MODULE_PARM_DESC(debug, "Activates frontend debugging (default:0)");
module_param(force_fw_upload, int, 0644);
MODULE_PARM_DESC(force_fw_upload, "Force firmware upload (default:0)");
MODULE_DESCRIPTION("DVB Frontend module for Montage Technology " MODULE_DESCRIPTION("DVB Frontend module for Montage Technology "
"DS3000/TS2020 hardware"); "DS3000/TS2020 hardware");
MODULE_AUTHOR("Konstantin Dimitrov"); MODULE_AUTHOR("Konstantin Dimitrov");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment