aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorAbylay Ospan <aospan@netup.ru>2011-07-14 04:20:29 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 16:56:07 -0400
commitb8f0d306b73162f9c9870ce5cd7b33b8204fcccc (patch)
tree2cd8015cf1b40d12d6200a41bc03ee246a3dcc81 /drivers/media
parent1752cd5d3e7ac53025e3010219d06d2b962e1395 (diff)
[media] NetUP Dual DVB-T/C CI RF: load firmware according card revision
Currently available two hardware revision: 0x1 firmware filename: dvb-netup-altera-01.fw 0x4 firmware filename: dvb-netup-altera-04.fw Signed-off-by: Abylay Ospan <aospan@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/cx23885/cx23885-cards.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c
index bbdd2b5089b7..9fa4db27ae4f 100644
--- a/drivers/media/video/cx23885/cx23885-cards.c
+++ b/drivers/media/video/cx23885/cx23885-cards.c
@@ -29,6 +29,7 @@
29#include "../../../staging/altera-stapl/altera.h" 29#include "../../../staging/altera-stapl/altera.h"
30#include "cx23885.h" 30#include "cx23885.h"
31#include "tuner-xc2028.h" 31#include "tuner-xc2028.h"
32#include "netup-eeprom.h"
32#include "netup-init.h" 33#include "netup-init.h"
33#include "altera-ci.h" 34#include "altera-ci.h"
34#include "xc4000.h" 35#include "xc4000.h"
@@ -1430,6 +1431,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
1430 const struct firmware *fw; 1431 const struct firmware *fw;
1431 const char *filename = "dvb-netup-altera-01.fw"; 1432 const char *filename = "dvb-netup-altera-01.fw";
1432 char *action = "configure"; 1433 char *action = "configure";
1434 static struct netup_card_info cinfo;
1433 struct altera_config netup_config = { 1435 struct altera_config netup_config = {
1434 .dev = dev, 1436 .dev = dev,
1435 .action = action, 1437 .action = action,
@@ -1438,6 +1440,18 @@ void cx23885_card_setup(struct cx23885_dev *dev)
1438 1440
1439 netup_initialize(dev); 1441 netup_initialize(dev);
1440 1442
1443 netup_get_card_info(&dev->i2c_bus[0].i2c_adap, &cinfo);
1444 switch (cinfo.rev) {
1445 case 0x4:
1446 filename = "dvb-netup-altera-04.fw";
1447 break;
1448 default:
1449 filename = "dvb-netup-altera-01.fw";
1450 break;
1451 }
1452 printk(KERN_INFO "NetUP card rev=0x%x fw_filename=%s\n",
1453 cinfo.rev, filename);
1454
1441 ret = request_firmware(&fw, filename, &dev->pci->dev); 1455 ret = request_firmware(&fw, filename, &dev->pci->dev);
1442 if (ret != 0) 1456 if (ret != 0)
1443 printk(KERN_ERR "did not find the firmware file. (%s) " 1457 printk(KERN_ERR "did not find the firmware file. (%s) "