From a4a7a59fbe292e31ce13cad010af417124495528 Mon Sep 17 00:00:00 2001 From: Abylay Ospan Date: Thu, 14 Jul 2011 05:20:29 -0300 Subject: [PATCH] --- yaml --- r: 261591 b: refs/heads/master c: b8f0d306b73162f9c9870ce5cd7b33b8204fcccc h: refs/heads/master i: 261589: 68e7fde43e8599bafc4b508c4d7dfca37c590af6 261587: cc7950d6eefcd83fc2372ee7c325d394d134ccdf 261583: 8caa90ec9006be411e3ba7bd0cc5b02972814330 v: v3 --- [refs] | 2 +- trunk/drivers/media/video/cx23885/cx23885-cards.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index e4014d6bcab5..174d2aa5d2d2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1752cd5d3e7ac53025e3010219d06d2b962e1395 +refs/heads/master: b8f0d306b73162f9c9870ce5cd7b33b8204fcccc diff --git a/trunk/drivers/media/video/cx23885/cx23885-cards.c b/trunk/drivers/media/video/cx23885/cx23885-cards.c index bbdd2b5089b7..9fa4db27ae4f 100644 --- a/trunk/drivers/media/video/cx23885/cx23885-cards.c +++ b/trunk/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) "