diff options
author | Tejun Heo <tj@kernel.org> | 2009-07-03 18:13:18 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-07-03 18:13:18 -0400 |
commit | c43768cbb7655ea5ff782ae250f6e2ef4297cf98 (patch) | |
tree | 3982e41dde3eecaa3739a5d1a8ed18d04bd74f01 /drivers/media/dvb | |
parent | 1a8dd307cc0a2119be4e578c517795464e6dabba (diff) | |
parent | 746a99a5af60ee676afa2ba469ccd1373493c7e7 (diff) |
Merge branch 'master' into for-next
Pull linus#master to merge PER_CPU_DEF_ATTRIBUTES and alpha build fix
changes. As alpha in percpu tree uses 'weak' attribute instead of
inline assembly, there's no need for __used attribute.
Conflicts:
arch/alpha/include/asm/percpu.h
arch/mn10300/kernel/vmlinux.lds.S
include/linux/percpu-defs.h
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/frontends/stv0900.h | 7 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/stv0900_core.c | 100 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/stv0900_priv.h | 2 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/stv090x.c | 11 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/tda10048.c | 1 | ||||
-rw-r--r-- | drivers/media/dvb/siano/smscoreapi.c | 4 |
6 files changed, 96 insertions, 29 deletions
diff --git a/drivers/media/dvb/frontends/stv0900.h b/drivers/media/dvb/frontends/stv0900.h index 8a1332c2031d..bf4e9b633044 100644 --- a/drivers/media/dvb/frontends/stv0900.h +++ b/drivers/media/dvb/frontends/stv0900.h | |||
@@ -29,6 +29,11 @@ | |||
29 | #include <linux/dvb/frontend.h> | 29 | #include <linux/dvb/frontend.h> |
30 | #include "dvb_frontend.h" | 30 | #include "dvb_frontend.h" |
31 | 31 | ||
32 | struct stv0900_reg { | ||
33 | u16 addr; | ||
34 | u8 val; | ||
35 | }; | ||
36 | |||
32 | struct stv0900_config { | 37 | struct stv0900_config { |
33 | u8 demod_address; | 38 | u8 demod_address; |
34 | u32 xtal; | 39 | u32 xtal; |
@@ -38,7 +43,7 @@ struct stv0900_config { | |||
38 | 43 | ||
39 | u8 path1_mode; | 44 | u8 path1_mode; |
40 | u8 path2_mode; | 45 | u8 path2_mode; |
41 | 46 | struct stv0900_reg *ts_config_regs; | |
42 | u8 tun1_maddress;/* 0, 1, 2, 3 for 0xc0, 0xc2, 0xc4, 0xc6 */ | 47 | u8 tun1_maddress;/* 0, 1, 2, 3 for 0xc0, 0xc2, 0xc4, 0xc6 */ |
43 | u8 tun2_maddress; | 48 | u8 tun2_maddress; |
44 | u8 tun1_adc;/* 1 for stv6110, 2 for stb6100 */ | 49 | u8 tun1_adc;/* 1 for stv6110, 2 for stb6100 */ |
diff --git a/drivers/media/dvb/frontends/stv0900_core.c b/drivers/media/dvb/frontends/stv0900_core.c index 8499bcf7f251..1da045fbb4ef 100644 --- a/drivers/media/dvb/frontends/stv0900_core.c +++ b/drivers/media/dvb/frontends/stv0900_core.c | |||
@@ -149,31 +149,31 @@ void stv0900_write_reg(struct stv0900_internal *i_params, u16 reg_addr, | |||
149 | dprintk(KERN_ERR "%s: i2c error %d\n", __func__, ret); | 149 | dprintk(KERN_ERR "%s: i2c error %d\n", __func__, ret); |
150 | } | 150 | } |
151 | 151 | ||
152 | u8 stv0900_read_reg(struct stv0900_internal *i_params, u16 reg_addr) | 152 | u8 stv0900_read_reg(struct stv0900_internal *i_params, u16 reg) |
153 | { | 153 | { |
154 | u8 data[2]; | ||
155 | int ret; | 154 | int ret; |
156 | struct i2c_msg i2cmsg = { | 155 | u8 b0[] = { MSB(reg), LSB(reg) }; |
157 | .addr = i_params->i2c_addr, | 156 | u8 buf = 0; |
158 | .flags = 0, | 157 | struct i2c_msg msg[] = { |
159 | .len = 2, | 158 | { |
160 | .buf = data, | 159 | .addr = i_params->i2c_addr, |
160 | .flags = 0, | ||
161 | .buf = b0, | ||
162 | .len = 2, | ||
163 | }, { | ||
164 | .addr = i_params->i2c_addr, | ||
165 | .flags = I2C_M_RD, | ||
166 | .buf = &buf, | ||
167 | .len = 1, | ||
168 | }, | ||
161 | }; | 169 | }; |
162 | 170 | ||
163 | data[0] = MSB(reg_addr); | 171 | ret = i2c_transfer(i_params->i2c_adap, msg, 2); |
164 | data[1] = LSB(reg_addr); | 172 | if (ret != 2) |
165 | 173 | dprintk(KERN_ERR "%s: i2c error %d, reg[0x%02x]\n", | |
166 | ret = i2c_transfer(i_params->i2c_adap, &i2cmsg, 1); | 174 | __func__, ret, reg); |
167 | if (ret != 1) | ||
168 | dprintk(KERN_ERR "%s: i2c error %d\n", __func__, ret); | ||
169 | |||
170 | i2cmsg.flags = I2C_M_RD; | ||
171 | i2cmsg.len = 1; | ||
172 | ret = i2c_transfer(i_params->i2c_adap, &i2cmsg, 1); | ||
173 | if (ret != 1) | ||
174 | dprintk(KERN_ERR "%s: i2c error %d\n", __func__, ret); | ||
175 | 175 | ||
176 | return data[0]; | 176 | return buf; |
177 | } | 177 | } |
178 | 178 | ||
179 | void extract_mask_pos(u32 label, u8 *mask, u8 *pos) | 179 | void extract_mask_pos(u32 label, u8 *mask, u8 *pos) |
@@ -712,6 +712,44 @@ static s32 stv0900_carr_get_quality(struct dvb_frontend *fe, | |||
712 | return c_n; | 712 | return c_n; |
713 | } | 713 | } |
714 | 714 | ||
715 | static int stv0900_read_ucblocks(struct dvb_frontend *fe, u32 * ucblocks) | ||
716 | { | ||
717 | struct stv0900_state *state = fe->demodulator_priv; | ||
718 | struct stv0900_internal *i_params = state->internal; | ||
719 | enum fe_stv0900_demod_num demod = state->demod; | ||
720 | u8 err_val1, err_val0; | ||
721 | s32 err_field1, err_field0; | ||
722 | u32 header_err_val = 0; | ||
723 | |||
724 | *ucblocks = 0x0; | ||
725 | if (stv0900_get_standard(fe, demod) == STV0900_DVBS2_STANDARD) { | ||
726 | /* DVB-S2 delineator errors count */ | ||
727 | |||
728 | /* retreiving number for errnous headers */ | ||
729 | dmd_reg(err_field0, R0900_P1_BBFCRCKO0, | ||
730 | R0900_P2_BBFCRCKO0); | ||
731 | dmd_reg(err_field1, R0900_P1_BBFCRCKO1, | ||
732 | R0900_P2_BBFCRCKO1); | ||
733 | |||
734 | err_val1 = stv0900_read_reg(i_params, err_field1); | ||
735 | err_val0 = stv0900_read_reg(i_params, err_field0); | ||
736 | header_err_val = (err_val1<<8) | err_val0; | ||
737 | |||
738 | /* retreiving number for errnous packets */ | ||
739 | dmd_reg(err_field0, R0900_P1_UPCRCKO0, | ||
740 | R0900_P2_UPCRCKO0); | ||
741 | dmd_reg(err_field1, R0900_P1_UPCRCKO1, | ||
742 | R0900_P2_UPCRCKO1); | ||
743 | |||
744 | err_val1 = stv0900_read_reg(i_params, err_field1); | ||
745 | err_val0 = stv0900_read_reg(i_params, err_field0); | ||
746 | *ucblocks = (err_val1<<8) | err_val0; | ||
747 | *ucblocks += header_err_val; | ||
748 | } | ||
749 | |||
750 | return 0; | ||
751 | } | ||
752 | |||
715 | static int stv0900_read_snr(struct dvb_frontend *fe, u16 *snr) | 753 | static int stv0900_read_snr(struct dvb_frontend *fe, u16 *snr) |
716 | { | 754 | { |
717 | *snr = stv0900_carr_get_quality(fe, | 755 | *snr = stv0900_carr_get_quality(fe, |
@@ -1355,7 +1393,7 @@ static enum fe_stv0900_error stv0900_init_internal(struct dvb_frontend *fe, | |||
1355 | struct stv0900_state *state = fe->demodulator_priv; | 1393 | struct stv0900_state *state = fe->demodulator_priv; |
1356 | enum fe_stv0900_error error = STV0900_NO_ERROR; | 1394 | enum fe_stv0900_error error = STV0900_NO_ERROR; |
1357 | enum fe_stv0900_error demodError = STV0900_NO_ERROR; | 1395 | enum fe_stv0900_error demodError = STV0900_NO_ERROR; |
1358 | int selosci; | 1396 | int selosci, i; |
1359 | 1397 | ||
1360 | struct stv0900_inode *temp_int = find_inode(state->i2c_adap, | 1398 | struct stv0900_inode *temp_int = find_inode(state->i2c_adap, |
1361 | state->config->demod_address); | 1399 | state->config->demod_address); |
@@ -1402,7 +1440,23 @@ static enum fe_stv0900_error stv0900_init_internal(struct dvb_frontend *fe, | |||
1402 | stv0900_write_bits(state->internal, F0900_P1_ROLLOFF_CONTROL, p_init->rolloff); | 1440 | stv0900_write_bits(state->internal, F0900_P1_ROLLOFF_CONTROL, p_init->rolloff); |
1403 | stv0900_write_bits(state->internal, F0900_P2_ROLLOFF_CONTROL, p_init->rolloff); | 1441 | stv0900_write_bits(state->internal, F0900_P2_ROLLOFF_CONTROL, p_init->rolloff); |
1404 | 1442 | ||
1405 | stv0900_set_ts_parallel_serial(state->internal, p_init->path1_ts_clock, p_init->path2_ts_clock); | 1443 | state->internal->ts_config = p_init->ts_config; |
1444 | if (state->internal->ts_config == NULL) | ||
1445 | stv0900_set_ts_parallel_serial(state->internal, | ||
1446 | p_init->path1_ts_clock, | ||
1447 | p_init->path2_ts_clock); | ||
1448 | else { | ||
1449 | for (i = 0; state->internal->ts_config[i].addr != 0xffff; i++) | ||
1450 | stv0900_write_reg(state->internal, | ||
1451 | state->internal->ts_config[i].addr, | ||
1452 | state->internal->ts_config[i].val); | ||
1453 | |||
1454 | stv0900_write_bits(state->internal, F0900_P2_RST_HWARE, 1); | ||
1455 | stv0900_write_bits(state->internal, F0900_P2_RST_HWARE, 0); | ||
1456 | stv0900_write_bits(state->internal, F0900_P1_RST_HWARE, 1); | ||
1457 | stv0900_write_bits(state->internal, F0900_P1_RST_HWARE, 0); | ||
1458 | } | ||
1459 | |||
1406 | stv0900_write_bits(state->internal, F0900_P1_TUN_MADDRESS, p_init->tun1_maddress); | 1460 | stv0900_write_bits(state->internal, F0900_P1_TUN_MADDRESS, p_init->tun1_maddress); |
1407 | switch (p_init->tuner1_adc) { | 1461 | switch (p_init->tuner1_adc) { |
1408 | case 1: | 1462 | case 1: |
@@ -1882,6 +1936,7 @@ static struct dvb_frontend_ops stv0900_ops = { | |||
1882 | .read_ber = stv0900_read_ber, | 1936 | .read_ber = stv0900_read_ber, |
1883 | .read_signal_strength = stv0900_read_signal_strength, | 1937 | .read_signal_strength = stv0900_read_signal_strength, |
1884 | .read_snr = stv0900_read_snr, | 1938 | .read_snr = stv0900_read_snr, |
1939 | .read_ucblocks = stv0900_read_ucblocks, | ||
1885 | }; | 1940 | }; |
1886 | 1941 | ||
1887 | struct dvb_frontend *stv0900_attach(const struct stv0900_config *config, | 1942 | struct dvb_frontend *stv0900_attach(const struct stv0900_config *config, |
@@ -1915,6 +1970,7 @@ struct dvb_frontend *stv0900_attach(const struct stv0900_config *config, | |||
1915 | init_params.tun1_iq_inversion = STV0900_IQ_NORMAL; | 1970 | init_params.tun1_iq_inversion = STV0900_IQ_NORMAL; |
1916 | init_params.tuner1_adc = config->tun1_adc; | 1971 | init_params.tuner1_adc = config->tun1_adc; |
1917 | init_params.path2_ts_clock = config->path2_mode; | 1972 | init_params.path2_ts_clock = config->path2_mode; |
1973 | init_params.ts_config = config->ts_config_regs; | ||
1918 | init_params.tun2_maddress = config->tun2_maddress; | 1974 | init_params.tun2_maddress = config->tun2_maddress; |
1919 | init_params.tuner2_adc = config->tun2_adc; | 1975 | init_params.tuner2_adc = config->tun2_adc; |
1920 | init_params.tun2_iq_inversion = STV0900_IQ_SWAPPED; | 1976 | init_params.tun2_iq_inversion = STV0900_IQ_SWAPPED; |
diff --git a/drivers/media/dvb/frontends/stv0900_priv.h b/drivers/media/dvb/frontends/stv0900_priv.h index 67dc8ec634e2..5ed7a145c7d3 100644 --- a/drivers/media/dvb/frontends/stv0900_priv.h +++ b/drivers/media/dvb/frontends/stv0900_priv.h | |||
@@ -271,6 +271,7 @@ struct stv0900_init_params{ | |||
271 | 271 | ||
272 | /* IQ from the tuner2 to the demod */ | 272 | /* IQ from the tuner2 to the demod */ |
273 | enum stv0900_iq_inversion tun2_iq_inversion; | 273 | enum stv0900_iq_inversion tun2_iq_inversion; |
274 | struct stv0900_reg *ts_config; | ||
274 | }; | 275 | }; |
275 | 276 | ||
276 | struct stv0900_search_params { | 277 | struct stv0900_search_params { |
@@ -363,6 +364,7 @@ struct stv0900_internal{ | |||
363 | u8 i2c_addr; | 364 | u8 i2c_addr; |
364 | u8 clkmode;/* 0 for CLKI, 2 for XTALI */ | 365 | u8 clkmode;/* 0 for CLKI, 2 for XTALI */ |
365 | u8 chip_id; | 366 | u8 chip_id; |
367 | struct stv0900_reg *ts_config; | ||
366 | enum fe_stv0900_error errs; | 368 | enum fe_stv0900_error errs; |
367 | int dmds_used; | 369 | int dmds_used; |
368 | }; | 370 | }; |
diff --git a/drivers/media/dvb/frontends/stv090x.c b/drivers/media/dvb/frontends/stv090x.c index 96ef745a2e4e..488bdfb34fb3 100644 --- a/drivers/media/dvb/frontends/stv090x.c +++ b/drivers/media/dvb/frontends/stv090x.c | |||
@@ -2674,7 +2674,7 @@ static u8 stv090x_optimize_carloop(struct stv090x_state *state, enum stv090x_mod | |||
2674 | 2674 | ||
2675 | static u8 stv090x_optimize_carloop_short(struct stv090x_state *state) | 2675 | static u8 stv090x_optimize_carloop_short(struct stv090x_state *state) |
2676 | { | 2676 | { |
2677 | struct stv090x_short_frame_crloop *short_crl; | 2677 | struct stv090x_short_frame_crloop *short_crl = NULL; |
2678 | s32 index = 0; | 2678 | s32 index = 0; |
2679 | u8 aclc = 0x0b; | 2679 | u8 aclc = 0x0b; |
2680 | 2680 | ||
@@ -2694,10 +2694,13 @@ static u8 stv090x_optimize_carloop_short(struct stv090x_state *state) | |||
2694 | break; | 2694 | break; |
2695 | } | 2695 | } |
2696 | 2696 | ||
2697 | if (state->dev_ver >= 0x30) | 2697 | if (state->dev_ver >= 0x30) { |
2698 | short_crl = stv090x_s2_short_crl_cut20; | 2698 | /* Cut 3.0 and up */ |
2699 | else if (state->dev_ver >= 0x20) | ||
2700 | short_crl = stv090x_s2_short_crl_cut30; | 2699 | short_crl = stv090x_s2_short_crl_cut30; |
2700 | } else { | ||
2701 | /* Cut 2.0 and up: we don't support cuts older than 2.0 */ | ||
2702 | short_crl = stv090x_s2_short_crl_cut20; | ||
2703 | } | ||
2701 | 2704 | ||
2702 | if (state->srate <= 3000000) | 2705 | if (state->srate <= 3000000) |
2703 | aclc = short_crl[index].crl_2; | 2706 | aclc = short_crl[index].crl_2; |
diff --git a/drivers/media/dvb/frontends/tda10048.c b/drivers/media/dvb/frontends/tda10048.c index 4302c563a6b8..cc8862ce4aae 100644 --- a/drivers/media/dvb/frontends/tda10048.c +++ b/drivers/media/dvb/frontends/tda10048.c | |||
@@ -210,6 +210,7 @@ static struct pll_tab { | |||
210 | { TDA10048_CLK_4000, TDA10048_IF_36130, 10, 0, 0 }, | 210 | { TDA10048_CLK_4000, TDA10048_IF_36130, 10, 0, 0 }, |
211 | { TDA10048_CLK_16000, TDA10048_IF_3300, 10, 3, 0 }, | 211 | { TDA10048_CLK_16000, TDA10048_IF_3300, 10, 3, 0 }, |
212 | { TDA10048_CLK_16000, TDA10048_IF_3500, 10, 3, 0 }, | 212 | { TDA10048_CLK_16000, TDA10048_IF_3500, 10, 3, 0 }, |
213 | { TDA10048_CLK_16000, TDA10048_IF_3800, 10, 3, 0 }, | ||
213 | { TDA10048_CLK_16000, TDA10048_IF_4000, 10, 3, 0 }, | 214 | { TDA10048_CLK_16000, TDA10048_IF_4000, 10, 3, 0 }, |
214 | { TDA10048_CLK_16000, TDA10048_IF_4300, 10, 3, 0 }, | 215 | { TDA10048_CLK_16000, TDA10048_IF_4300, 10, 3, 0 }, |
215 | { TDA10048_CLK_16000, TDA10048_IF_36130, 10, 3, 0 }, | 216 | { TDA10048_CLK_16000, TDA10048_IF_36130, 10, 3, 0 }, |
diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c index 32be382f0e97..a246903c3341 100644 --- a/drivers/media/dvb/siano/smscoreapi.c +++ b/drivers/media/dvb/siano/smscoreapi.c | |||
@@ -1422,8 +1422,8 @@ int smscore_gpio_configure(struct smscore_device_t *coredev, u8 PinNum, | |||
1422 | struct smscore_gpio_config *pGpioConfig) { | 1422 | struct smscore_gpio_config *pGpioConfig) { |
1423 | 1423 | ||
1424 | u32 totalLen; | 1424 | u32 totalLen; |
1425 | u32 TranslatedPinNum; | 1425 | u32 TranslatedPinNum = 0; |
1426 | u32 GroupNum; | 1426 | u32 GroupNum = 0; |
1427 | u32 ElectricChar; | 1427 | u32 ElectricChar; |
1428 | u32 groupCfg; | 1428 | u32 groupCfg; |
1429 | void *buffer; | 1429 | void *buffer; |