mirror of
https://github.com/torvalds/linux.git
synced 2024-12-20 18:11:47 +00:00
[media] tm6000: add revision check
adding chip revision check Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
101b25b55e
commit
c1937f8e34
@ -521,13 +521,6 @@ int tm6000_cards_setup(struct tm6000_core *dev)
|
|||||||
printk(KERN_ERR "Error %i doing tuner reset\n", rc);
|
printk(KERN_ERR "Error %i doing tuner reset\n", rc);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
msleep(10);
|
|
||||||
|
|
||||||
if (!i) {
|
|
||||||
rc = tm6000_get_reg32(dev, REQ_40_GET_VERSION, 0, 0);
|
|
||||||
if (rc >= 0)
|
|
||||||
printk(KERN_DEBUG "board=0x%08x\n", rc);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
printk(KERN_ERR "Tuner reset is not configured\n");
|
printk(KERN_ERR "Tuner reset is not configured\n");
|
||||||
|
@ -542,6 +542,26 @@ int tm6000_init(struct tm6000_core *dev)
|
|||||||
int board, rc = 0, i, size;
|
int board, rc = 0, i, size;
|
||||||
struct reg_init *tab;
|
struct reg_init *tab;
|
||||||
|
|
||||||
|
/* Check board revision */
|
||||||
|
board = tm6000_get_reg32(dev, REQ_40_GET_VERSION, 0, 0);
|
||||||
|
if (board >= 0) {
|
||||||
|
switch (board & 0xff) {
|
||||||
|
case 0xf3:
|
||||||
|
printk(KERN_INFO "Found tm6000\n");
|
||||||
|
if (dev->dev_type != TM6000)
|
||||||
|
dev->dev_type = TM6000;
|
||||||
|
break;
|
||||||
|
case 0xf4:
|
||||||
|
printk(KERN_INFO "Found tm6010\n");
|
||||||
|
if (dev->dev_type != TM6010)
|
||||||
|
dev->dev_type = TM6010;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
printk(KERN_INFO "Unknown board version = 0x%08x\n", board);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
printk(KERN_ERR "Error %i while retrieving board version\n", board);
|
||||||
|
|
||||||
if (dev->dev_type == TM6010) {
|
if (dev->dev_type == TM6010) {
|
||||||
tab = tm6010_init_tab;
|
tab = tm6010_init_tab;
|
||||||
size = ARRAY_SIZE(tm6010_init_tab);
|
size = ARRAY_SIZE(tm6010_init_tab);
|
||||||
@ -563,13 +583,6 @@ int tm6000_init(struct tm6000_core *dev)
|
|||||||
|
|
||||||
msleep(5); /* Just to be conservative */
|
msleep(5); /* Just to be conservative */
|
||||||
|
|
||||||
/* Check board version - maybe 10Moons specific */
|
|
||||||
board = tm6000_get_reg32(dev, REQ_40_GET_VERSION, 0, 0);
|
|
||||||
if (board >= 0)
|
|
||||||
printk(KERN_INFO "Board version = 0x%08x\n", board);
|
|
||||||
else
|
|
||||||
printk(KERN_ERR "Error %i while retrieving board version\n", board);
|
|
||||||
|
|
||||||
rc = tm6000_cards_setup(dev);
|
rc = tm6000_cards_setup(dev);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
Loading…
Reference in New Issue
Block a user