Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 226245
b: refs/heads/master
c: c1937f8
h: refs/heads/master
i:
  226243: bbf4474
v: v3
  • Loading branch information
Stefan Ringel authored and Mauro Carvalho Chehab committed Dec 29, 2010
1 parent b0ed7e6 commit 786e62c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 101b25b55ec48354bc40b9102b4f7922c9ad9eae
refs/heads/master: c1937f8e3490fedec2c75383df07cd8a7154c545
7 changes: 0 additions & 7 deletions trunk/drivers/staging/tm6000/tm6000-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,13 +521,6 @@ int tm6000_cards_setup(struct tm6000_core *dev)
printk(KERN_ERR "Error %i doing tuner reset\n", 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 {
printk(KERN_ERR "Tuner reset is not configured\n");
Expand Down
27 changes: 20 additions & 7 deletions trunk/drivers/staging/tm6000/tm6000-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,26 @@ int tm6000_init(struct tm6000_core *dev)
int board, rc = 0, i, size;
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) {
tab = tm6010_init_tab;
size = ARRAY_SIZE(tm6010_init_tab);
Expand All @@ -563,13 +583,6 @@ int tm6000_init(struct tm6000_core *dev)

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);

return rc;
Expand Down

0 comments on commit 786e62c

Please sign in to comment.