diff options
author | Mauro Carvalho Chehab <devnull@localhost> | 2005-11-18 07:25:08 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <devnull@localhost> | 2005-11-18 07:25:08 +0000 |
commit | 8ad5767c565d70f73a0cb6c65a9144b7196f9616 (patch) | |
tree | 0b726a3bdefe12c79384780faa109b7f25e3c3d6 /linux/drivers/media/video/cx88 | |
parent | 2723671270469dcf207cdcc6a7b6d74223ef64cd (diff) | |
download | mediapointer-dvb-s2-8ad5767c565d70f73a0cb6c65a9144b7196f9616.tar.gz mediapointer-dvb-s2-8ad5767c565d70f73a0cb6c65a9144b7196f9616.tar.bz2 |
tveeprom MAC address parsing/cleanup
From: Steven Toth <stoth@hauppauge.com>
- 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>
Diffstat (limited to 'linux/drivers/media/video/cx88')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-cards.c | 40 |
1 files changed, 11 insertions, 29 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index 575770cb6..962f224b2 100644 --- a/linux/drivers/media/video/cx88/cx88-cards.c +++ b/linux/drivers/media/video/cx88/cx88-cards.c @@ -1,5 +1,5 @@ /* - * $Id: cx88-cards.c,v 1.105 2005/11/18 01:02:18 mkrufky Exp $ + * $Id: cx88-cards.c,v 1.106 2005/11/18 07:25:08 mchehab Exp $ * * device driver for Conexant 2388x based TV cards * card-specific stuff. @@ -1128,44 +1128,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); } /* ----------------------------------------------------------------------- */ @@ -1249,7 +1231,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; @@ -1274,7 +1256,7 @@ void cx88_card_setup(struct cx88_core *core) case CX88_BOARD_HAUPPAUGE_NOVASE2_S1: 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: |