diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-29 12:02:23 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-29 12:02:23 -0200 |
commit | 5f4890d5ecb2b24267125ce096b0844a0ec976ee (patch) | |
tree | fb25f2f551172b4732e5973c470a7554daf0e974 /linux/drivers/media | |
parent | 3bda651d03154294f4d35ca78da14c6a573e30fc (diff) | |
download | mediapointer-dvb-s2-5f4890d5ecb2b24267125ce096b0844a0ec976ee.tar.gz mediapointer-dvb-s2-5f4890d5ecb2b24267125ce096b0844a0ec976ee.tar.bz2 |
FusionHDTV DVB-T Pro tuning problem fixes
From: Chris Pascoe <c.pascoe@itee.uq.edu.au>
It seems that on this board, the demodulator provides the pullup on the I2C
bus, which means that calling i2c_gate_ctrl crashes the bus. Turn this off
and the xc3028 can talk OK. Also fix some GPIO related settings that
became more clear through working on this.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Some changes made by Mauro Chehab to allow merging it with some
other xc3028
patches.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---
linux/drivers/media/video/cx88/cx88-cards.c | 16 ++++++++++------
linux/drivers/media/video/cx88/cx88-dvb.c | 8 ++++++++
2 files changed, 18 insertions(+), 6 deletions(-)
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-cards.c | 16 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-dvb.c | 8 |
2 files changed, 18 insertions, 6 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index 9463f34d8..e11743fb6 100644 --- a/linux/drivers/media/video/cx88/cx88-cards.c +++ b/linux/drivers/media/video/cx88/cx88-cards.c @@ -2088,11 +2088,9 @@ static int cx88_dvico_xc2028_callback(void *ptr, int command, int arg) switch (command) { case XC2028_TUNER_RESET: - cx_set(MO_GP0_IO, 0x0200); - cx_clear(MO_GP0_IO, 0x02); - mdelay(100); - cx_set(MO_GP0_IO, 0x02); - mdelay(100); + cx_write(MO_GP0_IO, 0x101000); + mdelay(5); + cx_set(MO_GP0_IO, 0x101010); break; default: return -EINVAL; @@ -2352,6 +2350,13 @@ static void cx88_card_setup(struct cx88_core *core) cx_write(MO_GP0_IO, 0x000007f8); cx_write(MO_GP1_IO, 0x00000001); break; + case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO: + /* GPIO0:0 is hooked to demod reset */ + /* GPIO0:4 is hooked to xc3028 reset */ + cx_write(MO_GP0_IO, 0x00111100); + msleep(1); + cx_write(MO_GP0_IO, 0x00111111); + break; case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL: /* GPIO0:6 is hooked to FX2 reset pin */ cx_set(MO_GP0_IO, 0x00004040); @@ -2362,7 +2367,6 @@ static void cx88_card_setup(struct cx88_core *core) case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1: case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS: case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID: - case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO: /* GPIO0:0 is hooked to mt352 reset pin */ cx_set(MO_GP0_IO, 0x00000101); cx_clear(MO_GP0_IO, 0x00000001); diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c index 816a2a986..9ef70cb92 100644 --- a/linux/drivers/media/video/cx88/cx88-dvb.c +++ b/linux/drivers/media/video/cx88/cx88-dvb.c @@ -595,6 +595,14 @@ static int dvb_register(struct cx8802_dev *dev) dev->dvb.frontend = dvb_attach(mt352_attach, &dvico_fusionhdtv_mt352_xc3028, &dev->core->i2c_adap); + /* + * On this board, the demod provides the I2C bus pullup. + * We must not permit gate_ctrl to be performed, or + * the xc3028 cannot communicate on the bus. + */ + if (dev->dvb.frontend) + dev->dvb.frontend->ops.i2c_gate_ctrl = NULL; + attach_xc3028 = 1; break; case CX88_BOARD_PCHDTV_HD3000: |