Lines Matching +full:0 +full:x01c00000

54 	if ((ret = af9005_write_ofdm_register(d, reglo, (u8) (value & 0xff))))  in af9005_write_word_agc()
57 (u8) ((value & 0x300) >> 8)); in af9005_write_word_agc()
71 case 0: in af9005_read_word_agc()
72 *value = ((u16) (temp1 & 0x03) << 8) + (u16) temp0; in af9005_read_word_agc()
75 *value = ((u16) (temp1 & 0x0C) << 6) + (u16) temp0; in af9005_read_word_agc()
78 *value = ((u16) (temp1 & 0x30) << 4) + (u16) temp0; in af9005_read_word_agc()
81 *value = ((u16) (temp1 & 0xC0) << 2) + (u16) temp0; in af9005_read_word_agc()
87 return 0; in af9005_read_word_agc()
112 if ((temp & 1) == 0) in af9005_is_fecmon_available()
116 return 0; in af9005_is_fecmon_available()
131 *post_err_count = 0; in af9005_get_post_vit_err_cw_count()
132 *post_cw_count = 0; in af9005_get_post_vit_err_cw_count()
191 if (cw_count == 0) { in af9005_get_post_vit_err_cw_count()
199 return 0; in af9005_get_post_vit_err_cw_count()
207 u32 loc_cw_count = 0, loc_err_count; in af9005_get_post_vit_ber()
208 u16 loc_abort_count = 0; in af9005_get_post_vit_ber()
220 return 0; in af9005_get_post_vit_ber()
270 if (super_frame_count == 0) { in af9005_get_pre_vit_err_bit_count()
271 deb_info("super frame count 0\n"); in af9005_get_pre_vit_err_bit_count()
282 if (temp == 0) { in af9005_get_pre_vit_err_bit_count()
301 case 0: /* QPSK */ in af9005_get_pre_vit_err_bit_count()
317 return 0; in af9005_get_pre_vit_err_bit_count()
328 1 & 0xff); in af9005_reset_pre_viterbi()
352 10000 & 0xff); in af9005_reset_post_viterbi()
381 return 0; in af9005_get_statistic()
386 if (ret == 0) { in af9005_get_statistic()
388 if (state->pre_vit_bit_count > 0) { in af9005_get_statistic()
397 state->ber = 0xffffffff; in af9005_get_statistic()
404 if (ret == 0) { in af9005_get_statistic()
410 return 0; in af9005_get_statistic()
424 return 0; in af9005_fe_refresh_state()
437 *stat = 0; in af9005_fe_read_status()
474 return 0; in af9005_fe_read_status()
484 return 0; in af9005_fe_read_ber()
494 return 0; in af9005_fe_read_unc_blocks()
519 return 0; in af9005_fe_read_signal_strength()
543 NS_coeff1_2048Nu = 0x2ADB6DC; in af9005_fe_program_cfoe()
544 NS_coeff1_8191Nu = 0xAB7313; in af9005_fe_program_cfoe()
545 NS_coeff1_8192Nu = 0xAB6DB7; in af9005_fe_program_cfoe()
546 NS_coeff1_8193Nu = 0xAB685C; in af9005_fe_program_cfoe()
547 NS_coeff2_2k = 0x156DB6E; in af9005_fe_program_cfoe()
548 NS_coeff2_8k = 0x55B6DC; in af9005_fe_program_cfoe()
552 NS_coeff1_2048Nu = 0x3200001; in af9005_fe_program_cfoe()
553 NS_coeff1_8191Nu = 0xC80640; in af9005_fe_program_cfoe()
554 NS_coeff1_8192Nu = 0xC80000; in af9005_fe_program_cfoe()
555 NS_coeff1_8193Nu = 0xC7F9C0; in af9005_fe_program_cfoe()
556 NS_coeff2_2k = 0x1900000; in af9005_fe_program_cfoe()
557 NS_coeff2_8k = 0x640000; in af9005_fe_program_cfoe()
561 NS_coeff1_2048Nu = 0x3924926; in af9005_fe_program_cfoe()
562 NS_coeff1_8191Nu = 0xE4996E; in af9005_fe_program_cfoe()
563 NS_coeff1_8192Nu = 0xE49249; in af9005_fe_program_cfoe()
564 NS_coeff1_8193Nu = 0xE48B25; in af9005_fe_program_cfoe()
565 NS_coeff2_2k = 0x1C92493; in af9005_fe_program_cfoe()
566 NS_coeff2_8k = 0x724925; in af9005_fe_program_cfoe()
577 temp0 = (u8) (NS_coeff1_2048Nu & 0x000000FF); in af9005_fe_program_cfoe()
578 temp1 = (u8) ((NS_coeff1_2048Nu & 0x0000FF00) >> 8); in af9005_fe_program_cfoe()
579 temp2 = (u8) ((NS_coeff1_2048Nu & 0x00FF0000) >> 16); in af9005_fe_program_cfoe()
580 temp3 = (u8) ((NS_coeff1_2048Nu & 0x03000000) >> 24); in af9005_fe_program_cfoe()
583 buf[0] = temp3; in af9005_fe_program_cfoe()
589 ret = af9005_write_ofdm_register(d, 0xAE00, buf[0]); in af9005_fe_program_cfoe()
594 ret = af9005_write_ofdm_register(d, 0xAE01, buf[1]); in af9005_fe_program_cfoe()
599 ret = af9005_write_ofdm_register(d, 0xAE02, buf[2]); in af9005_fe_program_cfoe()
604 ret = af9005_write_ofdm_register(d, 0xAE03, buf[3]); in af9005_fe_program_cfoe()
612 temp0 = (u8) ((NS_coeff2_2k & 0x0000003F)); in af9005_fe_program_cfoe()
613 temp1 = (u8) ((NS_coeff2_2k & 0x00003FC0) >> 6); in af9005_fe_program_cfoe()
614 temp2 = (u8) ((NS_coeff2_2k & 0x003FC000) >> 14); in af9005_fe_program_cfoe()
615 temp3 = (u8) ((NS_coeff2_2k & 0x01C00000) >> 22); in af9005_fe_program_cfoe()
618 buf[0] = temp3; in af9005_fe_program_cfoe()
623 ret = af9005_write_ofdm_register(d, 0xAE04, buf[0]); in af9005_fe_program_cfoe()
627 ret = af9005_write_ofdm_register(d, 0xAE05, buf[1]); in af9005_fe_program_cfoe()
631 ret = af9005_write_ofdm_register(d, 0xAE06, buf[2]); in af9005_fe_program_cfoe()
635 ret = af9005_write_ofdm_register(d, 0xAE07, buf[3]); in af9005_fe_program_cfoe()
643 temp0 = (u8) ((NS_coeff1_8191Nu & 0x000000FF)); in af9005_fe_program_cfoe()
644 temp1 = (u8) ((NS_coeff1_8191Nu & 0x0000FF00) >> 8); in af9005_fe_program_cfoe()
645 temp2 = (u8) ((NS_coeff1_8191Nu & 0x00FFC000) >> 16); in af9005_fe_program_cfoe()
646 temp3 = (u8) ((NS_coeff1_8191Nu & 0x03000000) >> 24); in af9005_fe_program_cfoe()
649 buf[0] = temp3; in af9005_fe_program_cfoe()
654 ret = af9005_write_ofdm_register(d, 0xAE08, buf[0]); in af9005_fe_program_cfoe()
658 ret = af9005_write_ofdm_register(d, 0xAE09, buf[1]); in af9005_fe_program_cfoe()
662 ret = af9005_write_ofdm_register(d, 0xAE0A, buf[2]); in af9005_fe_program_cfoe()
666 ret = af9005_write_ofdm_register(d, 0xAE0B, buf[3]); in af9005_fe_program_cfoe()
674 temp0 = (u8) (NS_coeff1_8192Nu & 0x000000FF); in af9005_fe_program_cfoe()
675 temp1 = (u8) ((NS_coeff1_8192Nu & 0x0000FF00) >> 8); in af9005_fe_program_cfoe()
676 temp2 = (u8) ((NS_coeff1_8192Nu & 0x00FFC000) >> 16); in af9005_fe_program_cfoe()
677 temp3 = (u8) ((NS_coeff1_8192Nu & 0x03000000) >> 24); in af9005_fe_program_cfoe()
680 buf[0] = temp3; in af9005_fe_program_cfoe()
685 ret = af9005_write_ofdm_register(d, 0xAE0C, buf[0]); in af9005_fe_program_cfoe()
689 ret = af9005_write_ofdm_register(d, 0xAE0D, buf[1]); in af9005_fe_program_cfoe()
693 ret = af9005_write_ofdm_register(d, 0xAE0E, buf[2]); in af9005_fe_program_cfoe()
697 ret = af9005_write_ofdm_register(d, 0xAE0F, buf[3]); in af9005_fe_program_cfoe()
705 temp0 = (u8) ((NS_coeff1_8193Nu & 0x000000FF)); in af9005_fe_program_cfoe()
706 temp1 = (u8) ((NS_coeff1_8193Nu & 0x0000FF00) >> 8); in af9005_fe_program_cfoe()
707 temp2 = (u8) ((NS_coeff1_8193Nu & 0x00FFC000) >> 16); in af9005_fe_program_cfoe()
708 temp3 = (u8) ((NS_coeff1_8193Nu & 0x03000000) >> 24); in af9005_fe_program_cfoe()
711 buf[0] = temp3; in af9005_fe_program_cfoe()
716 ret = af9005_write_ofdm_register(d, 0xAE10, buf[0]); in af9005_fe_program_cfoe()
720 ret = af9005_write_ofdm_register(d, 0xAE11, buf[1]); in af9005_fe_program_cfoe()
724 ret = af9005_write_ofdm_register(d, 0xAE12, buf[2]); in af9005_fe_program_cfoe()
728 ret = af9005_write_ofdm_register(d, 0xAE13, buf[3]); in af9005_fe_program_cfoe()
736 temp0 = (u8) ((NS_coeff2_8k & 0x0000003F)); in af9005_fe_program_cfoe()
737 temp1 = (u8) ((NS_coeff2_8k & 0x00003FC0) >> 6); in af9005_fe_program_cfoe()
738 temp2 = (u8) ((NS_coeff2_8k & 0x003FC000) >> 14); in af9005_fe_program_cfoe()
739 temp3 = (u8) ((NS_coeff2_8k & 0x01C00000) >> 22); in af9005_fe_program_cfoe()
742 buf[0] = temp3; in af9005_fe_program_cfoe()
747 ret = af9005_write_ofdm_register(d, 0xAE14, buf[0]); in af9005_fe_program_cfoe()
751 ret = af9005_write_ofdm_register(d, 0xAE15, buf[1]); in af9005_fe_program_cfoe()
755 ret = af9005_write_ofdm_register(d, 0xAE16, buf[2]); in af9005_fe_program_cfoe()
759 ret = af9005_write_ofdm_register(d, 0xAE17, buf[3]); in af9005_fe_program_cfoe()
769 temp = 0; in af9005_fe_select_bw()
791 ret = af9005_send_command(state->d, 0x03, &temp, 1, NULL, 0); in af9005_fe_power()
796 0xC0
800 0xC4
808 u8 temp, temp0 = 0, temp1 = 0, temp2 = 0; in af9005_fe_init()
818 4, 1, 0x01))) in af9005_fe_init()
820 if ((ret = af9005_write_ofdm_register(state->d, APO_REG_RESET, 0))) in af9005_fe_init()
824 for (i = 0; i < 150; i++) { in af9005_fe_init()
843 write xd_g_reg_ofsm_clk 0 in af9005_fe_init()
846 ret = af9005_write_ofdm_register(state->d, 0xb200, 0xa9); in af9005_fe_init()
849 ret = af9005_write_ofdm_register(state->d, xd_g_reg_ofsm_clk, 0x07); in af9005_fe_init()
852 temp = 0x01; in af9005_fe_init()
853 ret = af9005_send_command(state->d, 0x03, &temp, 1, NULL, 0); in af9005_fe_init()
856 ret = af9005_write_ofdm_register(state->d, xd_g_reg_ofsm_clk, 0x00); in af9005_fe_init()
859 ret = af9005_write_ofdm_register(state->d, 0xb200, 0xa1); in af9005_fe_init()
869 reg_ofdm_rst_pos, reg_ofdm_rst_len, 0); in af9005_fe_init()
874 ret = af9005_write_ofdm_register(state->d, 0xaefc, 0); in af9005_fe_init()
891 reg_dca_upper_chip_len, 0))) in af9005_fe_init()
896 reg_dca_lower_chip_len, 0))) in af9005_fe_init()
899 /* set 2wire master clock to 0x14 (for 60KHz) */ in af9005_fe_init()
900 deb_info("set 2wire master clock to 0x14 (for 60KHz)\n"); in af9005_fe_init()
902 af9005_write_ofdm_register(state->d, xd_I2C_i2c_m_period, 0x14))) in af9005_fe_init()
909 reg_dca_en_pos, reg_dca_en_len, 0))) in af9005_fe_init()
912 ret = af9005_write_ofdm_register(state->d, 0xa16c, 1); in af9005_fe_init()
915 ret = af9005_write_ofdm_register(state->d, 0xa3c1, 0); in af9005_fe_init()
952 ret = af9005_write_ofdm_register(state->d, 0xa601, 0); in af9005_fe_init()
956 if ((ret = af9005_write_ofdm_register(state->d, 0xaefb, 0x01))) in af9005_fe_init()
962 for (i = 0; i < scriptlen; i++) { in af9005_fe_init()
969 if (script[i].reg == 0xae18) in af9005_fe_init()
971 if (script[i].reg == 0xae19) in af9005_fe_init()
973 if (script[i].reg == 0xae1a) in af9005_fe_init()
998 xd_p_reg_aagc_rf_top_numerator_7_0, 0, 2, in af9005_fe_init()
1007 xd_p_reg_aagc_if_top_numerator_7_0, 0, 2, in af9005_fe_init()
1012 /* ACI 0 IF TOP */ in af9005_fe_init()
1014 af9005_read_word_agc(state->d, 0xA60E, 0xA60A, 4, 2, in af9005_fe_init()
1021 af9005_read_word_agc(state->d, 0xA60E, 0xA60B, 6, 2, in af9005_fe_init()
1029 ret = af9005_read_eeprom(adap->dev, 0xc6, buf, 2); in af9005_fe_init()
1034 deb_info("Tuner id %d, board id %d\n", buf[0], buf[1]); in af9005_fe_init()
1035 switch (buf[0]) { in af9005_fe_init()
1038 ret = af9005_read_eeprom(adap->dev, 0xc8, buf, 2); in af9005_fe_init()
1043 if1 = (u16) (buf[0] << 8) + buf[1]; in af9005_fe_init()
1059 err("Unsupported tuner type %d", buf[0]); in af9005_fe_init()
1068 return 0; in af9005_fe_init()
1073 return af9005_fe_power(fe, 0); in af9005_fe_sleep()
1086 af9005_led_control(state->d, 0); in af9005_ts_bus_ctrl()
1088 return 0; in af9005_ts_bus_ctrl()
1107 ret = af9005_led_control(state->d, 0); in af9005_fe_set_frontend()
1111 ret = af9005_write_register_bits(state->d, XD_MP2IF_MISC, 2, 1, 0); in af9005_fe_set_frontend()
1117 temp0 = (u8) (state->original_fcw & 0x000000ff); in af9005_fe_set_frontend()
1118 temp1 = (u8) ((state->original_fcw & 0x0000ff00) >> 8); in af9005_fe_set_frontend()
1119 temp2 = (u8) ((state->original_fcw & 0x00ff0000) >> 16); in af9005_fe_set_frontend()
1120 ret = af9005_write_ofdm_register(state->d, 0xae1a, temp0); in af9005_fe_set_frontend()
1123 ret = af9005_write_ofdm_register(state->d, 0xae19, temp1); in af9005_fe_set_frontend()
1126 ret = af9005_write_ofdm_register(state->d, 0xae18, temp2); in af9005_fe_set_frontend()
1135 xd_p_reg_aagc_rf_top_numerator_7_0, 0, 2, in af9005_fe_set_frontend()
1142 xd_p_reg_aagc_if_top_numerator_7_0, 0, 2, in af9005_fe_set_frontend()
1147 af9005_write_word_agc(state->d, 0xA60E, 0xA60A, 4, 2, in af9005_fe_set_frontend()
1152 af9005_write_word_agc(state->d, 0xA60E, 0xA60B, 6, 2, in af9005_fe_set_frontend()
1168 ret = af9005_write_ofdm_register(state->d, 0xaefd, 0); in af9005_fe_set_frontend()
1187 temp = 0; in af9005_fe_set_frontend()
1188 ret = af9005_write_tuner_registers(state->d, 0xffff, &temp, 1); in af9005_fe_set_frontend()
1197 reg_api_retrain_request_pos, 2, 0); in af9005_fe_set_frontend()
1204 state->pre_vit_error_count = 0; in af9005_fe_set_frontend()
1205 state->pre_vit_bit_count = 0; in af9005_fe_set_frontend()
1206 state->ber = 0; in af9005_fe_set_frontend()
1207 state->post_vit_error_count = 0; in af9005_fe_set_frontend()
1208 /* state->unc = 0; commented out since it should be ever increasing */ in af9005_fe_set_frontend()
1209 state->abort_count = 0; in af9005_fe_set_frontend()
1214 return 0; in af9005_fe_set_frontend()
1234 case 0: in af9005_fe_get_frontend()
1257 case 0: in af9005_fe_get_frontend()
1293 case 0: in af9005_fe_get_frontend()
1324 case 0: in af9005_fe_get_frontend()
1354 case 0: in af9005_fe_get_frontend()
1381 case 0: in af9005_fe_get_frontend()
1397 case 0: in af9005_fe_get_frontend()
1410 return 0; in af9005_fe_get_frontend()
1434 state->opened = 0; in af9005_fe_attach()