diff options
author | Steven Toth <stoth@hauppauge.com> | 2008-01-10 00:06:35 -0500 |
---|---|---|
committer | Steven Toth <stoth@hauppauge.com> | 2008-01-10 00:06:35 -0500 |
commit | 70347138514c2c7fbd9fc4da4f1d4ea591c2aa0d (patch) | |
tree | 91d92f355fe220077120cfbd273baeea6bca84cb /linux/drivers/media/video/cx23885/cx23885-core.c | |
parent | e4b28a71b91cfc924e0638a22cc2a1e98a115ecc (diff) | |
download | mediapointer-dvb-s2-70347138514c2c7fbd9fc4da4f1d4ea591c2aa0d.tar.gz mediapointer-dvb-s2-70347138514c2c7fbd9fc4da4f1d4ea591c2aa0d.tar.bz2 |
cx23885: Add support for device revision detection
From: Steven Toth <stoth@hauppauge.com>
Each version of the cx23885/7/8 silicon has different build revs.
We'll use this internal revision to work around bugs and known
issues in the video and encoder related patches.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Diffstat (limited to 'linux/drivers/media/video/cx23885/cx23885-core.c')
-rw-r--r-- | linux/drivers/media/video/cx23885/cx23885-core.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cx23885/cx23885-core.c b/linux/drivers/media/video/cx23885/cx23885-core.c index 205b7b594..2c1f8da5d 100644 --- a/linux/drivers/media/video/cx23885/cx23885-core.c +++ b/linux/drivers/media/video/cx23885/cx23885-core.c @@ -703,6 +703,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; @@ -833,6 +871,8 @@ static int cx23885_dev_setup(struct cx23885_dev *dev) } } + cx23885_dev_checkrevision(dev); + return 0; } |