aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2009-03-25 15:48:15 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:43:40 -0400
commit378a2793eb5e1e6bcd44f85d368ad6962c8ce1ee (patch)
treeca6d7ad8a7240ec8655124b404d7ff5e810b83dc /drivers/media/dvb
parent14a19c0a2254ba58ed7559e072456ab94c9a2d3c (diff)
V4L/DVB (11215): zl10353: add support for Intel CE6230 and Intel CE6231
Add chip IDs and configuration registers needed for Intel CE6230 and Intel CE6231. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/frontends/zl10353.c8
-rw-r--r--drivers/media/dvb/frontends/zl10353.h4
-rw-r--r--drivers/media/dvb/frontends/zl10353_priv.h8
3 files changed, 18 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/zl10353.c b/drivers/media/dvb/frontends/zl10353.c
index b150ed306696..148b6f7f6cb2 100644
--- a/drivers/media/dvb/frontends/zl10353.c
+++ b/drivers/media/dvb/frontends/zl10353.c
@@ -572,6 +572,10 @@ static int zl10353_init(struct dvb_frontend *fe)
572 zl10353_dump_regs(fe); 572 zl10353_dump_regs(fe);
573 if (state->config.parallel_ts) 573 if (state->config.parallel_ts)
574 zl10353_reset_attach[2] &= ~0x20; 574 zl10353_reset_attach[2] &= ~0x20;
575 if (state->config.clock_ctl_1)
576 zl10353_reset_attach[3] = state->config.clock_ctl_1;
577 if (state->config.pll_0)
578 zl10353_reset_attach[4] = state->config.pll_0;
575 579
576 /* Do a "hard" reset if not already done */ 580 /* Do a "hard" reset if not already done */
577 if (zl10353_read_register(state, 0x50) != zl10353_reset_attach[1] || 581 if (zl10353_read_register(state, 0x50) != zl10353_reset_attach[1] ||
@@ -614,6 +618,7 @@ struct dvb_frontend *zl10353_attach(const struct zl10353_config *config,
614 struct i2c_adapter *i2c) 618 struct i2c_adapter *i2c)
615{ 619{
616 struct zl10353_state *state = NULL; 620 struct zl10353_state *state = NULL;
621 int id;
617 622
618 /* allocate memory for the internal state */ 623 /* allocate memory for the internal state */
619 state = kzalloc(sizeof(struct zl10353_state), GFP_KERNEL); 624 state = kzalloc(sizeof(struct zl10353_state), GFP_KERNEL);
@@ -625,7 +630,8 @@ struct dvb_frontend *zl10353_attach(const struct zl10353_config *config,
625 memcpy(&state->config, config, sizeof(struct zl10353_config)); 630 memcpy(&state->config, config, sizeof(struct zl10353_config));
626 631
627 /* check if the demod is there */ 632 /* check if the demod is there */
628 if (zl10353_read_register(state, CHIP_ID) != ID_ZL10353) 633 id = zl10353_read_register(state, CHIP_ID);
634 if ((id != ID_ZL10353) && (id != ID_CE6230) && (id != ID_CE6231))
629 goto error; 635 goto error;
630 636
631 /* create dvb_frontend */ 637 /* create dvb_frontend */
diff --git a/drivers/media/dvb/frontends/zl10353.h b/drivers/media/dvb/frontends/zl10353.h
index 2287bac46243..6e3ca9eed048 100644
--- a/drivers/media/dvb/frontends/zl10353.h
+++ b/drivers/media/dvb/frontends/zl10353.h
@@ -41,6 +41,10 @@ struct zl10353_config
41 41
42 /* set if i2c_gate_ctrl disable is required */ 42 /* set if i2c_gate_ctrl disable is required */
43 u8 disable_i2c_gate_ctrl:1; 43 u8 disable_i2c_gate_ctrl:1;
44
45 /* clock control registers (0x51-0x54) */
46 u8 clock_ctl_1; /* default: 0x46 */
47 u8 pll_0; /* default: 0x15 */
44}; 48};
45 49
46#if defined(CONFIG_DVB_ZL10353) || (defined(CONFIG_DVB_ZL10353_MODULE) && defined(MODULE)) 50#if defined(CONFIG_DVB_ZL10353) || (defined(CONFIG_DVB_ZL10353_MODULE) && defined(MODULE))
diff --git a/drivers/media/dvb/frontends/zl10353_priv.h b/drivers/media/dvb/frontends/zl10353_priv.h
index 055ff1f7e349..e0dd1d3e09dd 100644
--- a/drivers/media/dvb/frontends/zl10353_priv.h
+++ b/drivers/media/dvb/frontends/zl10353_priv.h
@@ -22,7 +22,9 @@
22#ifndef _ZL10353_PRIV_ 22#ifndef _ZL10353_PRIV_
23#define _ZL10353_PRIV_ 23#define _ZL10353_PRIV_
24 24
25#define ID_ZL10353 0x14 25#define ID_ZL10353 0x14 /* Zarlink ZL10353 */
26#define ID_CE6230 0x18 /* Intel CE6230 */
27#define ID_CE6231 0x19 /* Intel CE6231 */
26 28
27#define msb(x) (((x) >> 8) & 0xff) 29#define msb(x) (((x) >> 8) & 0xff)
28#define lsb(x) ((x) & 0xff) 30#define lsb(x) ((x) & 0xff)
@@ -50,6 +52,10 @@ enum zl10353_reg_addr {
50 TPS_RECEIVED_0 = 0x1E, 52 TPS_RECEIVED_0 = 0x1E,
51 TPS_CURRENT_1 = 0x1F, 53 TPS_CURRENT_1 = 0x1F,
52 TPS_CURRENT_0 = 0x20, 54 TPS_CURRENT_0 = 0x20,
55 CLOCK_CTL_0 = 0x51,
56 CLOCK_CTL_1 = 0x52,
57 PLL_0 = 0x53,
58 PLL_1 = 0x54,
53 RESET = 0x55, 59 RESET = 0x55,
54 AGC_TARGET = 0x56, 60 AGC_TARGET = 0x56,
55 MCLK_RATIO = 0x5C, 61 MCLK_RATIO = 0x5C,