#include <linux/bitops.h>
#include "stb0899_drv.h"
#include "stb0899_priv.h"
#include "stb0899_reg.h"
static inline u32 stb0899_do_div(u64 n, u32 d)
{ … }
#if 0
static u32 stb0899_calc_srate(u32 master_clk, u8 *sfr)
{
u64 tmp;
tmp = (((u32)sfr[0]) << 16) | (((u32)sfr[1]) << 8) | sfr[2];
tmp &= ~0xf;
tmp *= master_clk;
tmp >>= 24;
return tmp;
}
static u32 stb0899_get_srate(struct stb0899_state *state)
{
struct stb0899_internal *internal = &state->internal;
u8 sfr[3];
stb0899_read_regs(state, STB0899_SFRH, sfr, 3);
return stb0899_calc_srate(internal->master_clk, sfr);
}
#endif
static u32 stb0899_set_srate(struct stb0899_state *state, u32 master_clk, u32 srate)
{ … }
static long stb0899_calc_derot_time(long srate)
{ … }
long stb0899_carr_width(struct stb0899_state *state)
{ … }
static void stb0899_first_subrange(struct stb0899_state *state)
{ … }
static enum stb0899_status stb0899_check_tmg(struct stb0899_state *state)
{ … }
static enum stb0899_status stb0899_search_tmg(struct stb0899_state *state)
{ … }
static enum stb0899_status stb0899_check_carrier(struct stb0899_state *state)
{ … }
static enum stb0899_status stb0899_search_carrier(struct stb0899_state *state)
{ … }
static enum stb0899_status stb0899_check_data(struct stb0899_state *state)
{ … }
static enum stb0899_status stb0899_search_data(struct stb0899_state *state)
{ … }
static enum stb0899_status stb0899_check_range(struct stb0899_state *state)
{ … }
static void next_sub_range(struct stb0899_state *state)
{ … }
enum stb0899_status stb0899_dvbs_algo(struct stb0899_state *state)
{ … }
static void stb0899_dvbs2_config_uwp(struct stb0899_state *state)
{ … }
static void stb0899_dvbs2_config_csm_auto(struct stb0899_state *state)
{ … }
static long Log2Int(int number)
{ … }
static u32 stb0899_dvbs2_calc_srate(struct stb0899_state *state)
{ … }
static u32 stb0899_dvbs2_calc_dev(struct stb0899_state *state)
{ … }
static void stb0899_dvbs2_set_srate(struct stb0899_state *state)
{ … }
static void stb0899_dvbs2_set_btr_loopbw(struct stb0899_state *state)
{ … }
static void stb0899_dvbs2_set_carr_freq(struct stb0899_state *state, s32 carr_freq, u32 master_clk)
{ … }
static void stb0899_dvbs2_init_calc(struct stb0899_state *state)
{ … }
static void stb0899_dvbs2_btr_init(struct stb0899_state *state)
{ … }
static void stb0899_dvbs2_reacquire(struct stb0899_state *state)
{ … }
static enum stb0899_status stb0899_dvbs2_get_dmd_status(struct stb0899_state *state, int timeout)
{ … }
static int stb0899_dvbs2_get_data_lock(struct stb0899_state *state, int timeout)
{ … }
static enum stb0899_status stb0899_dvbs2_get_fec_status(struct stb0899_state *state, int timeout)
{ … }
static void stb0899_dvbs2_init_csm(struct stb0899_state *state, int pilots, enum stb0899_modcod modcod)
{ … }
static u32 stb0899_dvbs2_get_srate(struct stb0899_state *state)
{ … }
enum stb0899_status stb0899_dvbs2_algo(struct stb0899_state *state)
{ … }