aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends
diff options
context:
space:
mode:
authorHartmut Hackmann <hartmut.hackmann@t-online.de>2008-04-09 23:07:11 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 14:09:44 -0300
commit9a1b04e461fc8127c902a988cd9a082ba0680b11 (patch)
tree5f09a53b458432fddba9ed871f5731a83e41f7e2 /drivers/media/dvb/frontends
parentb37f2d6a31fc8e80c79a0a214d83b128aa796543 (diff)
downloadkernel_samsung_espresso10-9a1b04e461fc8127c902a988cd9a082ba0680b11.zip
kernel_samsung_espresso10-9a1b04e461fc8127c902a988cd9a082ba0680b11.tar.gz
kernel_samsung_espresso10-9a1b04e461fc8127c902a988cd9a082ba0680b11.tar.bz2
V4L/DVB (7654): tda10086: make the xtal frequency a configuration option
Some DVB-S boards, i.e. with the SD1878 tuner, use a 4 MHz reference frequency. This reqires a different setup of the clock PLL. This patch adds an enum to the tda10086_config struct and sets the proper values for the boards. This patch also fixes the DVB-S section of the MD7134_BRIDGE_2 Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r--drivers/media/dvb/frontends/tda10086.c11
-rw-r--r--drivers/media/dvb/frontends/tda10086.h8
2 files changed, 16 insertions, 3 deletions
diff --git a/drivers/media/dvb/frontends/tda10086.c b/drivers/media/dvb/frontends/tda10086.c
index 5fc2675..acf1471 100644
--- a/drivers/media/dvb/frontends/tda10086.c
+++ b/drivers/media/dvb/frontends/tda10086.c
@@ -128,10 +128,15 @@ static int tda10086_init(struct dvb_frontend* fe)
tda10086_write_byte(state, 0x32, 0x00); // irq off
tda10086_write_byte(state, 0x31, 0x56); // setup AFC
- // setup PLL (assumes 16Mhz XIN)
+ // setup PLL (this assumes SACLK = 96MHz)
tda10086_write_byte(state, 0x55, 0x2c); // misc PLL setup
- tda10086_write_byte(state, 0x3a, 0x0b); // M=12
- tda10086_write_byte(state, 0x3b, 0x01); // P=2
+ if (state->config->xtal_freq == TDA10086_XTAL_16M) {
+ tda10086_write_byte(state, 0x3a, 0x0b); // M=12
+ tda10086_write_byte(state, 0x3b, 0x01); // P=2
+ } else {
+ tda10086_write_byte(state, 0x3a, 0x17); // M=24
+ tda10086_write_byte(state, 0x3b, 0x00); // P=1
+ }
tda10086_write_mask(state, 0x55, 0x20, 0x00); // powerup PLL
// setup TS interface
diff --git a/drivers/media/dvb/frontends/tda10086.h b/drivers/media/dvb/frontends/tda10086.h
index 197c237..f25d5ea 100644
--- a/drivers/media/dvb/frontends/tda10086.h
+++ b/drivers/media/dvb/frontends/tda10086.h
@@ -26,6 +26,11 @@
#include <linux/dvb/frontend.h>
#include <linux/firmware.h>
+enum tda10086_xtal {
+ TDA10086_XTAL_16M,
+ TDA10086_XTAL_4M
+};
+
struct tda10086_config
{
/* the demodulator's i2c address */
@@ -36,6 +41,9 @@ struct tda10086_config
/* do we need the diseqc signal with carrier? */
u8 diseqc_tone;
+
+ /* frequency of the reference xtal */
+ enum tda10086_xtal xtal_freq;
};
#if defined(CONFIG_DVB_TDA10086) || (defined(CONFIG_DVB_TDA10086_MODULE) && defined(MODULE))