summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorAbylay Ospan <aospan@netup.ru>2011-07-14 05:20:29 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 17:56:07 -0300
commitb8f0d306b73162f9c9870ce5cd7b33b8204fcccc (patch)
tree2cd8015cf1b40d12d6200a41bc03ee246a3dcc81 /drivers/media
parent1752cd5d3e7ac53025e3010219d06d2b962e1395 (diff)
downloadlinux-exynos-b8f0d306b73162f9c9870ce5cd7b33b8204fcccc.tar.gz
linux-exynos-b8f0d306b73162f9c9870ce5cd7b33b8204fcccc.tar.bz2
linux-exynos-b8f0d306b73162f9c9870ce5cd7b33b8204fcccc.zip
[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 @@
#include "../../../staging/altera-stapl/altera.h"
#include "cx23885.h"
#include "tuner-xc2028.h"
+#include "netup-eeprom.h"
#include "netup-init.h"
#include "altera-ci.h"
#include "xc4000.h"
@@ -1430,6 +1431,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
const struct firmware *fw;
const char *filename = "dvb-netup-altera-01.fw";
char *action = "configure";
+ static struct netup_card_info cinfo;
struct altera_config netup_config = {
.dev = dev,
.action = action,
@@ -1438,6 +1440,18 @@ void cx23885_card_setup(struct cx23885_dev *dev)
netup_initialize(dev);
+ netup_get_card_info(&dev->i2c_bus[0].i2c_adap, &cinfo);
+ switch (cinfo.rev) {
+ case 0x4:
+ filename = "dvb-netup-altera-04.fw";
+ break;
+ default:
+ filename = "dvb-netup-altera-01.fw";
+ break;
+ }
+ printk(KERN_INFO "NetUP card rev=0x%x fw_filename=%s\n",
+ cinfo.rev, filename);
+
ret = request_firmware(&fw, filename, &dev->pci->dev);
if (ret != 0)
printk(KERN_ERR "did not find the firmware file. (%s) "