diff options
author | Hartmut Hackmann <hartmut.hackmann@t-online.de> | 2008-04-09 22:07:11 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:09:44 -0400 |
commit | 9a1b04e461fc8127c902a988cd9a082ba0680b11 (patch) | |
tree | 5f09a53b458432fddba9ed871f5731a83e41f7e2 /drivers/media/dvb/frontends/tda10086.c | |
parent | b37f2d6a31fc8e80c79a0a214d83b128aa796543 (diff) |
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/tda10086.c')
-rw-r--r-- | drivers/media/dvb/frontends/tda10086.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/media/dvb/frontends/tda10086.c b/drivers/media/dvb/frontends/tda10086.c index 5fc26757f393..acf1471373ca 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) | |||
128 | tda10086_write_byte(state, 0x32, 0x00); // irq off | 128 | tda10086_write_byte(state, 0x32, 0x00); // irq off |
129 | tda10086_write_byte(state, 0x31, 0x56); // setup AFC | 129 | tda10086_write_byte(state, 0x31, 0x56); // setup AFC |
130 | 130 | ||
131 | // setup PLL (assumes 16Mhz XIN) | 131 | // setup PLL (this assumes SACLK = 96MHz) |
132 | tda10086_write_byte(state, 0x55, 0x2c); // misc PLL setup | 132 | tda10086_write_byte(state, 0x55, 0x2c); // misc PLL setup |
133 | tda10086_write_byte(state, 0x3a, 0x0b); // M=12 | 133 | if (state->config->xtal_freq == TDA10086_XTAL_16M) { |
134 | tda10086_write_byte(state, 0x3b, 0x01); // P=2 | 134 | tda10086_write_byte(state, 0x3a, 0x0b); // M=12 |
135 | tda10086_write_byte(state, 0x3b, 0x01); // P=2 | ||
136 | } else { | ||
137 | tda10086_write_byte(state, 0x3a, 0x17); // M=24 | ||
138 | tda10086_write_byte(state, 0x3b, 0x00); // P=1 | ||
139 | } | ||
135 | tda10086_write_mask(state, 0x55, 0x20, 0x00); // powerup PLL | 140 | tda10086_write_mask(state, 0x55, 0x20, 0x00); // powerup PLL |
136 | 141 | ||
137 | // setup TS interface | 142 | // setup TS interface |