Lines Matching refs:reg

178 	u8 reg;  in stb0899_check_tmg()  local
184 reg = stb0899_read_reg(state, STB0899_TLIR); in stb0899_check_tmg()
185 lock = STB0899_GETFIELD(TLIR_TMG_LOCK_IND, reg); in stb0899_check_tmg()
253 u8 reg; in stb0899_check_carrier() local
257 reg = stb0899_read_reg(state, STB0899_CFD); in stb0899_check_carrier()
258 STB0899_SETFIELD_VAL(CFD_ON, reg, 1); in stb0899_check_carrier()
259 stb0899_write_reg(state, STB0899_CFD, reg); in stb0899_check_carrier()
261 reg = stb0899_read_reg(state, STB0899_DSTATUS); in stb0899_check_carrier()
262 dprintk(state->verbose, FE_DEBUG, 1, "--------------------> STB0899_DSTATUS=[0x%02x]", reg); in stb0899_check_carrier()
263 if (STB0899_GETFIELD(CARRIER_FOUND, reg)) { in stb0899_check_carrier()
285 u8 reg; in stb0899_search_carrier() local
291 reg = stb0899_read_reg(state, STB0899_CFD); in stb0899_search_carrier()
292 STB0899_SETFIELD_VAL(CFD_ON, reg, 1); in stb0899_search_carrier()
293 stb0899_write_reg(state, STB0899_CFD, reg); in stb0899_search_carrier()
306 reg = stb0899_read_reg(state, STB0899_CFD); in stb0899_search_carrier()
307 STB0899_SETFIELD_VAL(CFD_ON, reg, 1); in stb0899_search_carrier()
308 stb0899_write_reg(state, STB0899_CFD, reg); in stb0899_search_carrier()
340 u8 reg; in stb0899_check_data() local
345 reg = stb0899_read_reg(state, STB0899_TSTRES); in stb0899_check_data()
346 STB0899_SETFIELD_VAL(FRESACS, reg, 1); in stb0899_check_data()
347 stb0899_write_reg(state, STB0899_TSTRES, reg); in stb0899_check_data()
349 reg = stb0899_read_reg(state, STB0899_TSTRES); in stb0899_check_data()
350 STB0899_SETFIELD_VAL(FRESACS, reg, 0); in stb0899_check_data()
351 stb0899_write_reg(state, STB0899_TSTRES, reg); in stb0899_check_data()
368 reg = stb0899_read_reg(state, STB0899_VSTATUS); in stb0899_check_data()
369 lock = STB0899_GETFIELD(VSTATUS_LOCKEDVIT, reg); in stb0899_check_data()
370 loop = STB0899_GETFIELD(VSTATUS_END_LOOPVIT, reg); in stb0899_check_data()
393 u8 reg; in stb0899_search_data() local
412 reg = stb0899_read_reg(state, STB0899_CFD); in stb0899_search_data()
413 STB0899_SETFIELD_VAL(CFD_ON, reg, 1); in stb0899_search_data()
414 stb0899_write_reg(state, STB0899_CFD, reg); in stb0899_search_data()
431 reg = stb0899_read_reg(state, STB0899_IQSWAP); in stb0899_search_data()
432 if (STB0899_GETFIELD(SYM, reg)) in stb0899_search_data()
507 u8 bclc, reg; in stb0899_dvbs_algo() local
574 reg = stb0899_read_reg(state, STB0899_TSTRES); in stb0899_dvbs_algo()
575 STB0899_SETFIELD_VAL(FRESRS, reg, 1); in stb0899_dvbs_algo()
576 stb0899_write_reg(state, STB0899_TSTRES, reg); in stb0899_dvbs_algo()
582 reg = stb0899_read_reg(state, STB0899_DEMAPVIT); in stb0899_dvbs_algo()
583 STB0899_SETFIELD_VAL(DEMAPVIT_KDIVIDER, reg, 60); in stb0899_dvbs_algo()
584 stb0899_write_reg(state, STB0899_DEMAPVIT, reg); in stb0899_dvbs_algo()
596 reg = stb0899_read_reg(state, STB0899_CFD); in stb0899_dvbs_algo()
597 STB0899_SETFIELD_VAL(CFD_ON, reg, 1); in stb0899_dvbs_algo()
598 stb0899_write_reg(state, STB0899_CFD, reg); in stb0899_dvbs_algo()
651 reg = stb0899_read_reg(state, STB0899_PLPARM); in stb0899_dvbs_algo()
652 internal->fecrate = STB0899_GETFIELD(VITCURPUN, reg); in stb0899_dvbs_algo()
682 reg = stb0899_read_reg(state, STB0899_BCLC); in stb0899_dvbs_algo()
686 STB0899_SETFIELD_VAL(BETA, reg, betaTab[0][clnI]); in stb0899_dvbs_algo()
687 stb0899_write_reg(state, STB0899_BCLC, reg); in stb0899_dvbs_algo()
691 STB0899_SETFIELD_VAL(BETA, reg, betaTab[1][clnI]); in stb0899_dvbs_algo()
692 stb0899_write_reg(state, STB0899_BCLC, reg); in stb0899_dvbs_algo()
696 STB0899_SETFIELD_VAL(BETA, reg, betaTab[2][clnI]); in stb0899_dvbs_algo()
697 stb0899_write_reg(state, STB0899_BCLC, reg); in stb0899_dvbs_algo()
701 STB0899_SETFIELD_VAL(BETA, reg, betaTab[3][clnI]); in stb0899_dvbs_algo()
702 stb0899_write_reg(state, STB0899_BCLC, reg); in stb0899_dvbs_algo()
711 STB0899_SETFIELD_VAL(BETA, reg, betaTab[4][clnI]); in stb0899_dvbs_algo()
712 stb0899_write_reg(state, STB0899_BCLC, reg); in stb0899_dvbs_algo()
719 reg = stb0899_read_reg(state, STB0899_TSTRES); in stb0899_dvbs_algo()
720 STB0899_SETFIELD_VAL(FRESRS, reg, 0); in stb0899_dvbs_algo()
721 stb0899_write_reg(state, STB0899_TSTRES, reg); in stb0899_dvbs_algo()
724 reg = stb0899_read_reg(state, STB0899_CFD); in stb0899_dvbs_algo()
725 STB0899_SETFIELD_VAL(CFD_ON, reg, 0); in stb0899_dvbs_algo()
726 stb0899_write_reg(state, STB0899_CFD, reg); in stb0899_dvbs_algo()
742 u32 uwp1, uwp2, uwp3, reg; in stb0899_dvbs2_config_uwp() local
763 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, SOF_SRCH_TO); in stb0899_dvbs2_config_uwp()
764 STB0899_SETFIELD_VAL(SOF_SEARCH_TIMEOUT, reg, config->sof_search_timeout); in stb0899_dvbs2_config_uwp()
765 …b0899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_SOF_SRCH_TO, STB0899_OFF0_SOF_SRCH_TO, reg); in stb0899_dvbs2_config_uwp()
774 u32 reg; in stb0899_dvbs2_config_csm_auto() local
776 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, CSM_CNTRL1); in stb0899_dvbs2_config_csm_auto()
777 STB0899_SETFIELD_VAL(CSM_AUTO_PARAM, reg, 1); in stb0899_dvbs2_config_csm_auto()
778 stb0899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_CSM_CNTRL1, STB0899_OFF0_CSM_CNTRL1, reg); in stb0899_dvbs2_config_csm_auto()
854 u32 correction, freq_adj, band_lim, decim_cntrl, reg; in stb0899_dvbs2_set_srate() local
890 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, BTR_CNTRL); in stb0899_dvbs2_set_srate()
891 STB0899_SETFIELD_VAL(BTR_FREQ_CORR, reg, correction); in stb0899_dvbs2_set_srate()
892 stb0899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_BTR_CNTRL, STB0899_OFF0_BTR_CNTRL, reg); in stb0899_dvbs2_set_srate()
912 u32 reg; in stb0899_dvbs2_set_btr_loopbw() local
948 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, BTR_LOOP_GAIN); in stb0899_dvbs2_set_btr_loopbw()
949 STB0899_SETFIELD_VAL(KBTR0_RSHFT, reg, k_btr0_rshft); in stb0899_dvbs2_set_btr_loopbw()
950 STB0899_SETFIELD_VAL(KBTR0, reg, k_btr0); in stb0899_dvbs2_set_btr_loopbw()
951 STB0899_SETFIELD_VAL(KBTR1_RSHFT, reg, k_btr1_rshft); in stb0899_dvbs2_set_btr_loopbw()
952 STB0899_SETFIELD_VAL(KBTR1, reg, k_btr1); in stb0899_dvbs2_set_btr_loopbw()
953 STB0899_SETFIELD_VAL(KBTR2_RSHFT, reg, k_btr2_rshft); in stb0899_dvbs2_set_btr_loopbw()
954 …9_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_BTR_LOOP_GAIN, STB0899_OFF0_BTR_LOOP_GAIN, reg); in stb0899_dvbs2_set_btr_loopbw()
967 u32 reg; in stb0899_dvbs2_set_carr_freq() local
971 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, CRL_NOM_FREQ); in stb0899_dvbs2_set_carr_freq()
972 STB0899_SETFIELD_VAL(CRL_NOM_FREQ, reg, crl_nom_freq); in stb0899_dvbs2_set_carr_freq()
973 …899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_CRL_NOM_FREQ, STB0899_OFF0_CRL_NOM_FREQ, reg); in stb0899_dvbs2_set_carr_freq()
984 u32 range, reg; in stb0899_dvbs2_init_calc() local
1015 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, ACQ_CNTRL2); in stb0899_dvbs2_init_calc()
1016 STB0899_SETFIELD_VAL(ZIGZAG, reg, 1); in stb0899_dvbs2_init_calc()
1017 STB0899_SETFIELD_VAL(NUM_STEPS, reg, steps); in stb0899_dvbs2_init_calc()
1018 STB0899_SETFIELD_VAL(FREQ_STEPSIZE, reg, step_size); in stb0899_dvbs2_init_calc()
1019 stb0899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_ACQ_CNTRL2, STB0899_OFF0_ACQ_CNTRL2, reg); in stb0899_dvbs2_init_calc()
1028 u32 reg; in stb0899_dvbs2_btr_init() local
1031 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, BTR_CNTRL); in stb0899_dvbs2_btr_init()
1032 STB0899_SETFIELD_VAL(INTRP_PHS_SENSE, reg, 1); in stb0899_dvbs2_btr_init()
1033 STB0899_SETFIELD_VAL(BTR_ERR_ENA, reg, 1); in stb0899_dvbs2_btr_init()
1034 stb0899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_BTR_CNTRL, STB0899_OFF0_BTR_CNTRL, reg); in stb0899_dvbs2_btr_init()
1051 u32 reg = 0; in stb0899_dvbs2_reacquire() local
1054 STB0899_SETFIELD_VAL(DVBS2_RESET, reg, 1); in stb0899_dvbs2_reacquire()
1055 …b0899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_RESET_CNTRL, STB0899_OFF0_RESET_CNTRL, reg); in stb0899_dvbs2_reacquire()
1068 reg = 0; in stb0899_dvbs2_reacquire()
1069 STB0899_SETFIELD_VAL(DVBS2_RESET, reg, 0); in stb0899_dvbs2_reacquire()
1070 …b0899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_RESET_CNTRL, STB0899_OFF0_RESET_CNTRL, reg); in stb0899_dvbs2_reacquire()
1082 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, EQ_CNTRL); in stb0899_dvbs2_reacquire()
1083 STB0899_SETFIELD_VAL(EQ_SHIFT, reg, 0); in stb0899_dvbs2_reacquire()
1084 STB0899_SETFIELD_VAL(EQ_DISABLE_UPDATE, reg, 0); in stb0899_dvbs2_reacquire()
1085 STB0899_SETFIELD_VAL(EQ_DELAY, reg, 0x05); in stb0899_dvbs2_reacquire()
1086 STB0899_SETFIELD_VAL(EQ_ADAPT_MODE, reg, 0x01); in stb0899_dvbs2_reacquire()
1087 stb0899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_EQ_CNTRL, STB0899_OFF0_EQ_CNTRL, reg); in stb0899_dvbs2_reacquire()
1100 u32 reg; in stb0899_dvbs2_get_dmd_status() local
1103 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, DMD_STATUS); in stb0899_dvbs2_get_dmd_status()
1104 dprintk(state->verbose, FE_DEBUG, 1, "DMD_STATUS=[0x%02x]", reg); in stb0899_dvbs2_get_dmd_status()
1105 if (STB0899_GETFIELD(IF_AGC_LOCK, reg)) in stb0899_dvbs2_get_dmd_status()
1107 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, DMD_STAT2); in stb0899_dvbs2_get_dmd_status()
1108 dprintk(state->verbose, FE_DEBUG, 1, "----------->DMD STAT2=[0x%02x]", reg); in stb0899_dvbs2_get_dmd_status()
1109 uwp = STB0899_GETFIELD(UWP_LOCK, reg); in stb0899_dvbs2_get_dmd_status()
1110 csm = STB0899_GETFIELD(CSM_LOCK, reg); in stb0899_dvbs2_get_dmd_status()
1134 u8 reg; in stb0899_dvbs2_get_data_lock() local
1137 reg = stb0899_read_reg(state, STB0899_CFGPDELSTATUS1); in stb0899_dvbs2_get_data_lock()
1138 dprintk(state->verbose, FE_DEBUG, 1, "---------> CFGPDELSTATUS=[0x%02x]", reg); in stb0899_dvbs2_get_data_lock()
1139 lock = STB0899_GETFIELD(CFGPDELSTATUS_LOCK, reg); in stb0899_dvbs2_get_data_lock()
1286 u32 bTrNomFreq, srate, decimRate, intval1, intval2, reg; in stb0899_dvbs2_get_srate() local
1294 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, DECIM_CNTRL); in stb0899_dvbs2_get_srate()
1295 decimRate = STB0899_GETFIELD(DECIM_RATE, reg); in stb0899_dvbs2_get_srate()
1322 u32 reg, csm1; in stb0899_dvbs2_algo() local
1348 reg = stb0899_read_reg(state, STB0899_TSTRES); in stb0899_dvbs2_algo()
1349 STB0899_SETFIELD_VAL(FRESRS, reg, 1); in stb0899_dvbs2_algo()
1350 stb0899_write_reg(state, STB0899_TSTRES, reg); in stb0899_dvbs2_algo()
1365 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, IF_AGC_CNTRL); in stb0899_dvbs2_algo()
1366 STB0899_SETFIELD_VAL(IF_LOOP_GAIN, reg, 4); in stb0899_dvbs2_algo()
1367 STB0899_SETFIELD_VAL(IF_AGC_REF, reg, 32); in stb0899_dvbs2_algo()
1368 …899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_IF_AGC_CNTRL, STB0899_OFF0_IF_AGC_CNTRL, reg); in stb0899_dvbs2_algo()
1370 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, IF_AGC_CNTRL2); in stb0899_dvbs2_algo()
1371 STB0899_SETFIELD_VAL(IF_AGC_DUMP_PER, reg, 0); in stb0899_dvbs2_algo()
1372 …9_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_IF_AGC_CNTRL2, STB0899_OFF0_IF_AGC_CNTRL2, reg); in stb0899_dvbs2_algo()
1377 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, DMD_CNTRL2); in stb0899_dvbs2_algo()
1380 STB0899_SETFIELD_VAL(SPECTRUM_INVERT, reg, 0); in stb0899_dvbs2_algo()
1383 STB0899_SETFIELD_VAL(SPECTRUM_INVERT, reg, 1); in stb0899_dvbs2_algo()
1386 stb0899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_DMD_CNTRL2, STB0899_OFF0_DMD_CNTRL2, reg); in stb0899_dvbs2_algo()
1404 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, CRL_NOM_FREQ); in stb0899_dvbs2_algo()
1405 STB0899_SETFIELD_VAL(CRL_NOM_FREQ, reg, offsetfreq); in stb0899_dvbs2_algo()
1406 …899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_CRL_NOM_FREQ, STB0899_OFF0_CRL_NOM_FREQ, reg); in stb0899_dvbs2_algo()
1414 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, DMD_CNTRL2); in stb0899_dvbs2_algo()
1415 iqSpectrum = STB0899_GETFIELD(SPECTRUM_INVERT, reg); in stb0899_dvbs2_algo()
1417 STB0899_SETFIELD_VAL(SPECTRUM_INVERT, reg, !iqSpectrum); in stb0899_dvbs2_algo()
1418 …stb0899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_DMD_CNTRL2, STB0899_OFF0_DMD_CNTRL2, reg); in stb0899_dvbs2_algo()
1434 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, CRL_NOM_FREQ); in stb0899_dvbs2_algo()
1435 STB0899_SETFIELD_VAL(CRL_NOM_FREQ, reg, offsetfreq); in stb0899_dvbs2_algo()
1436 …899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_CRL_NOM_FREQ, STB0899_OFF0_CRL_NOM_FREQ, reg); in stb0899_dvbs2_algo()
1450 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, UWP_STAT2); in stb0899_dvbs2_algo()
1451 modcod = STB0899_GETFIELD(UWP_DECODE_MOD, reg) >> 2; in stb0899_dvbs2_algo()
1452 pilots = STB0899_GETFIELD(UWP_DECODE_MOD, reg) & 0x01; in stb0899_dvbs2_algo()
1481 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, EQ_CNTRL); in stb0899_dvbs2_algo()
1482 STB0899_SETFIELD_VAL(EQ_DISABLE_UPDATE, reg, 1); in stb0899_dvbs2_algo()
1483 stb0899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_EQ_CNTRL, STB0899_OFF0_EQ_CNTRL, reg); in stb0899_dvbs2_algo()
1487 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, EQ_CNTRL); in stb0899_dvbs2_algo()
1488 STB0899_SETFIELD_VAL(EQ_SHIFT, reg, 0x02); in stb0899_dvbs2_algo()
1489 stb0899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_EQ_CNTRL, STB0899_OFF0_EQ_CNTRL, reg); in stb0899_dvbs2_algo()
1500 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, DMD_CNTRL2); in stb0899_dvbs2_algo()
1501 if (STB0899_GETFIELD(SPECTRUM_INVERT, reg)) in stb0899_dvbs2_algo()
1509 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, UWP_STAT2); in stb0899_dvbs2_algo()
1510 internal->modcod = STB0899_GETFIELD(UWP_DECODE_MOD, reg) >> 2; in stb0899_dvbs2_algo()
1511 internal->pilots = STB0899_GETFIELD(UWP_DECODE_MOD, reg) & 0x01; in stb0899_dvbs2_algo()
1512 internal->frame_length = (STB0899_GETFIELD(UWP_DECODE_MOD, reg) >> 1) & 0x01; in stb0899_dvbs2_algo()
1515 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, IF_AGC_CNTRL); in stb0899_dvbs2_algo()
1516 STB0899_SETFIELD_VAL(IF_LOOP_GAIN, reg, 3); in stb0899_dvbs2_algo()
1520 STB0899_SETFIELD_VAL(IF_AGC_REF, reg, 16); in stb0899_dvbs2_algo()
1522 …899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_IF_AGC_CNTRL, STB0899_OFF0_IF_AGC_CNTRL, reg); in stb0899_dvbs2_algo()
1524 reg = STB0899_READ_S2REG(STB0899_S2DEMOD, IF_AGC_CNTRL2); in stb0899_dvbs2_algo()
1525 STB0899_SETFIELD_VAL(IF_AGC_DUMP_PER, reg, 7); in stb0899_dvbs2_algo()
1526 …9_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_IF_AGC_CNTRL2, STB0899_OFF0_IF_AGC_CNTRL2, reg); in stb0899_dvbs2_algo()
1530 reg = stb0899_read_reg(state, STB0899_TSTRES); in stb0899_dvbs2_algo()
1531 STB0899_SETFIELD_VAL(FRESRS, reg, 0); in stb0899_dvbs2_algo()
1532 stb0899_write_reg(state, STB0899_TSTRES, reg); in stb0899_dvbs2_algo()