summaryrefslogtreecommitdiff
path: root/drivers/media/video/cx88
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2005-12-01 11:51:27 +0300
committerLinus Torvalds <torvalds@g5.osdl.org>2005-12-02 02:48:57 +0300
commit3ca0ea980697d3b3c3d5c13ba7e525ed6c434756 (patch)
treedb5d423db74e88ce836588bb77ab8ae77649b5f8 /drivers/media/video/cx88
parent759324c3c4b8d63203d7ea41b56553330bc0df06 (diff)
downloadlinux-3ca0ea980697d3b3c3d5c13ba7e525ed6c434756.tar.xz
[PATCH] V4L: tveeprom MAC address parsing/cleanup
- Added a mac address field to the tveeprom structure. - allow callers to query the MAC address. - removed some redundant eeprom parsing code in cx88-cards.c (specific to Hauppauge DVB products) Instead, placed calls directly to the single eeprom parsing function in tveeprom.c Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/cx88')
-rw-r--r--drivers/media/video/cx88/cx88-cards.c38
1 files changed, 10 insertions, 28 deletions
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c
index 746ccaf40cfa..cf2d2c3a33a6 100644
--- a/drivers/media/video/cx88/cx88-cards.c
+++ b/drivers/media/video/cx88/cx88-cards.c
@@ -1083,44 +1083,26 @@ static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
core->tuner_type = tv.tuner_type;
core->has_radio = tv.has_radio;
-}
-
-/* fixme: This is bogus code... add new pnp code to parse or see tveeprom.ko */
-static int hauppauge_eeprom_dvb(struct cx88_core *core, u8 *ee)
-{
- int model;
- int tuner;
/* Make sure we support the board model */
- model = ee[0x1f] << 24 | ee[0x1e] << 16 | ee[0x1d] << 8 | ee[0x1c];
- switch(model) {
+ switch (tv.model)
+ {
case 90002: /* Nova-T-PCI (9002) */
case 90500: /* Nova-T-PCI (oem) */
case 90501: /* Nova-T-PCI (oem/IR) */
- case 92000: /* Nova-S-Plus */
- case 92002: /* Nova-SE2 */
+ case 92000: /* Nova-SE2 (OEM, No Video or IR) */
+ case 92001: /* Nova-S-Plus (Video and IR) */
+ case 92002: /* Nova-S-Plus (Video and IR) */
/* known */
break;
default:
printk("%s: warning: unknown hauppauge model #%d\n",
- core->name, model);
+ core->name, tv.model);
break;
}
- /* Make sure we support the tuner */
- tuner = ee[0x2d];
- switch(tuner) {
- case 0x4B: /* dtt 7595 */
- case 0x4C: /* dtt 7592 */
- break;
- default:
- printk("%s: error: unknown hauppauge tuner 0x%02x\n",
- core->name, tuner);
- return -ENODEV;
- }
- printk(KERN_INFO "%s: hauppauge eeprom: model=%d, tuner=%d\n",
- core->name, model, tuner);
- return 0;
+ printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n",
+ core->name, tv.model);
}
/* ----------------------------------------------------------------------- */
@@ -1204,7 +1186,7 @@ void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
void cx88_card_setup(struct cx88_core *core)
{
- static u8 eeprom[128];
+ static u8 eeprom[256];
if (0 == core->i2c_rc) {
core->i2c_client.addr = 0xa0 >> 1;
@@ -1227,7 +1209,7 @@ void cx88_card_setup(struct cx88_core *core)
break;
case CX88_BOARD_HAUPPAUGE_DVB_T1:
if (0 == core->i2c_rc)
- hauppauge_eeprom_dvb(core,eeprom);
+ hauppauge_eeprom(core,eeprom);
break;
case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS: