Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76722
b: refs/heads/master
c: 0ac5881
h: refs/heads/master
v: v3
  • Loading branch information
Steven Toth authored and Mauro Carvalho Chehab committed Jan 25, 2008
1 parent ddadbc5 commit 258f855
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f234081bc564c69eb0e2cd4e957ad1cbae4a6144
refs/heads/master: 0ac5881aefc2dab8b3535c2e44fee6628acaf787
40 changes: 40 additions & 0 deletions trunk/drivers/media/video/cx23885/cx23885-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,44 @@ static int cx23885_init_tsport(struct cx23885_dev *dev, struct cx23885_tsport *p
return 0;
}

static void cx23885_dev_checkrevision(struct cx23885_dev *dev)
{
switch (cx_read(RDR_CFG2) & 0xff) {
case 0x00:
/* cx23885 */
dev->hwrevision = 0xa0;
break;
case 0x01:
/* CX23885-12Z */
dev->hwrevision = 0xa1;
break;
case 0x02:
/* CX23885-13Z */
dev->hwrevision = 0xb0;
break;
case 0x03:
/* CX23888-22Z */
dev->hwrevision = 0xc0;
break;
case 0x0e:
/* CX23887-15Z */
dev->hwrevision = 0xc0;
case 0x0f:
/* CX23887-14Z */
dev->hwrevision = 0xb1;
break;
default:
printk(KERN_ERR "%s() New hardware revision found 0x%x\n",
__FUNCTION__, dev->hwrevision);
}
if (dev->hwrevision)
printk(KERN_INFO "%s() Hardware revision = 0x%02x\n",
__FUNCTION__, dev->hwrevision);
else
printk(KERN_ERR "%s() Hardware revision unknown 0x%x\n",
__FUNCTION__, dev->hwrevision);
}

static int cx23885_dev_setup(struct cx23885_dev *dev)
{
int i;
Expand Down Expand Up @@ -832,6 +870,8 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)
}
}

cx23885_dev_checkrevision(dev);

return 0;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/video/cx23885/cx23885-reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ Channel manager Data Structure entry = 20 DWORD

#define RDR_CFG0 0x00050000
#define RDR_CFG1 0x00050004
#define RDR_CFG2 0x00050008
#define RDR_TLCTL0 0x00050318

/* APB DMAC Current Buffer Pointer */
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/video/cx23885/cx23885.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ struct cx23885_dev {
u32 __iomem *lmmio;
u8 __iomem *bmmio;
int pci_irqmask;
int hwrevision;

/* I2C adapters: Master 1 & 2 (External) & Master 3 (Internal only) */
struct cx23885_i2c i2c_bus[3];
Expand Down

0 comments on commit 258f855

Please sign in to comment.