/kernel/linux/linux-5.10/drivers/media/tuners/ |
H A D | mt20xx.c | 108 unsigned int fref,lo1,lo1n,lo1a,s,sel,lo1freq, desired_lo1, in mt2032_compute_freq() local 111 fref= 5250 *1000; //5.25MHz in mt2032_compute_freq() 114 lo1=(2*(desired_lo1/1000)+(fref/1000)) / (2*fref/1000); in mt2032_compute_freq() 136 lo1freq=(lo1a+8*lo1n)*fref; in mt2032_compute_freq() 142 lo2=(desired_lo2)/fref; in mt2032_compute_freq() 145 lo2num=((desired_lo2/1000)%(fref/1000))* 3780/(fref/1000); //scale to fit in 32bit arith in mt2032_compute_freq() 146 lo2freq=(lo2a+8*lo2n)*fref + lo2num*(fref/100 in mt2032_compute_freq() [all...] |
/kernel/linux/linux-6.6/drivers/media/tuners/ |
H A D | mt20xx.c | 108 unsigned int fref,lo1,lo1n,lo1a,s,sel,lo1freq, desired_lo1, in mt2032_compute_freq() local 111 fref= 5250 *1000; //5.25MHz in mt2032_compute_freq() 114 lo1=(2*(desired_lo1/1000)+(fref/1000)) / (2*fref/1000); in mt2032_compute_freq() 136 lo1freq=(lo1a+8*lo1n)*fref; in mt2032_compute_freq() 142 lo2=(desired_lo2)/fref; in mt2032_compute_freq() 145 lo2num=((desired_lo2/1000)%(fref/1000))* 3780/(fref/1000); //scale to fit in 32bit arith in mt2032_compute_freq() 146 lo2freq=(lo2a+8*lo2n)*fref + lo2num*(fref/100 in mt2032_compute_freq() [all...] |
/kernel/linux/linux-5.10/sound/soc/codecs/ |
H A D | madera.c | 3443 static int madera_find_sync_fratio(unsigned int fref, int *fratio) in madera_find_sync_fratio() argument 3448 if (fll_sync_fratios[i].min <= fref && in madera_find_sync_fratio() 3449 fref <= fll_sync_fratios[i].max) { in madera_find_sync_fratio() 3460 static int madera_find_main_fratio(unsigned int fref, unsigned int fout, in madera_find_main_fratio() argument 3465 while ((fout / (ratio * fref)) > MADERA_FLL_MAX_N) in madera_find_main_fratio() 3474 static int madera_find_fratio(struct madera_fll *fll, unsigned int fref, in madera_find_fratio() argument 3482 return madera_find_sync_fratio(fref, fratio); in madera_find_fratio() 3485 return madera_find_sync_fratio(fref, fratio); in madera_find_fratio() 3487 return madera_find_main_fratio(fref, in madera_find_fratio() 3495 return madera_find_sync_fratio(fref, frati in madera_find_fratio() 3504 madera_calc_fratio(struct madera_fll *fll, struct madera_fll_cfg *cfg, unsigned int fref, bool sync) madera_calc_fratio() argument 3600 madera_find_fll_gain(struct madera_fll *fll, struct madera_fll_cfg *cfg, unsigned int fref, const struct madera_fll_gains *gains, int n_gains) madera_find_fll_gain() argument 3621 madera_calc_fll(struct madera_fll *fll, struct madera_fll_cfg *cfg, unsigned int fref, bool sync) madera_calc_fll() argument 4122 madera_set_fll_syncclk(struct madera_fll *fll, int source, unsigned int fref, unsigned int fout) madera_set_fll_syncclk() argument 4141 madera_set_fll_refclk(struct madera_fll *fll, int source, unsigned int fref, unsigned int fout) madera_set_fll_refclk() argument 4423 int refdiv, fref, fout, lockdet_thr, fbdiv, hp, fast_clk, fllgcd; madera_fllhj_apply() local [all...] |
H A D | nau8540.c | 553 unsigned int fref, i, fvco_sel; in nau8540_calc_fll_param() local 560 fref = fll_in / fll_pre_scalar[i].param; in nau8540_calc_fll_param() 561 if (fref <= NAU_FREF_MAX) in nau8540_calc_fll_param() 570 if (fref >= fll_ratio[i].param) in nau8540_calc_fll_param() 599 fvco = div_u64(fvco_max << 16, fref * fll_param->ratio); in nau8540_calc_fll_param()
|
H A D | da7210.c | 212 int fref; member 977 * @fref: MCLK frequency, should be < 20MHz 986 int source, unsigned int fref, unsigned int fout) in da7210_set_dai_pll() 999 /* check fref, mode and fout */ in da7210_set_dai_pll() 1000 if ((fref == da7210_pll_div[cnt].fref) && in da7210_set_dai_pll() 1029 dev_err(codec_dai->dev, "Unsupported PLL input frequency %d\n", fref); in da7210_set_dai_pll() 985 da7210_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id, int source, unsigned int fref, unsigned int fout) da7210_set_dai_pll() argument
|
/kernel/linux/linux-6.6/sound/soc/codecs/ |
H A D | madera.c | 3443 static int madera_find_sync_fratio(unsigned int fref, int *fratio) in madera_find_sync_fratio() argument 3448 if (fll_sync_fratios[i].min <= fref && in madera_find_sync_fratio() 3449 fref <= fll_sync_fratios[i].max) { in madera_find_sync_fratio() 3460 static int madera_find_main_fratio(unsigned int fref, unsigned int fout, in madera_find_main_fratio() argument 3465 while ((fout / (ratio * fref)) > MADERA_FLL_MAX_N) in madera_find_main_fratio() 3474 static int madera_find_fratio(struct madera_fll *fll, unsigned int fref, in madera_find_fratio() argument 3482 return madera_find_sync_fratio(fref, fratio); in madera_find_fratio() 3485 return madera_find_sync_fratio(fref, fratio); in madera_find_fratio() 3487 return madera_find_main_fratio(fref, in madera_find_fratio() 3495 return madera_find_sync_fratio(fref, frati in madera_find_fratio() 3504 madera_calc_fratio(struct madera_fll *fll, struct madera_fll_cfg *cfg, unsigned int fref, bool sync) madera_calc_fratio() argument 3600 madera_find_fll_gain(struct madera_fll *fll, struct madera_fll_cfg *cfg, unsigned int fref, const struct madera_fll_gains *gains, int n_gains) madera_find_fll_gain() argument 3621 madera_calc_fll(struct madera_fll *fll, struct madera_fll_cfg *cfg, unsigned int fref, bool sync) madera_calc_fll() argument 4122 madera_set_fll_syncclk(struct madera_fll *fll, int source, unsigned int fref, unsigned int fout) madera_set_fll_syncclk() argument 4141 madera_set_fll_refclk(struct madera_fll *fll, int source, unsigned int fref, unsigned int fout) madera_set_fll_refclk() argument 4423 int refdiv, fref, fout, lockdet_thr, fbdiv, hp, fast_clk, fllgcd; madera_fllhj_apply() local [all...] |
H A D | nau8540.c | 571 unsigned int fref, i, fvco_sel; in nau8540_calc_fll_param() local 578 fref = fll_in / fll_pre_scalar[i].param; in nau8540_calc_fll_param() 579 if (fref <= NAU_FREF_MAX) in nau8540_calc_fll_param() 588 if (fref >= fll_ratio[i].param) in nau8540_calc_fll_param() 617 fvco = div_u64(fvco_max << 16, fref * fll_param->ratio); in nau8540_calc_fll_param()
|
H A D | da7210.c | 212 int fref; member 977 * @fref: MCLK frequency, should be < 20MHz 986 int source, unsigned int fref, unsigned int fout) in da7210_set_dai_pll() 999 /* check fref, mode and fout */ in da7210_set_dai_pll() 1000 if ((fref == da7210_pll_div[cnt].fref) && in da7210_set_dai_pll() 1029 dev_err(codec_dai->dev, "Unsupported PLL input frequency %d\n", fref); in da7210_set_dai_pll() 985 da7210_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id, int source, unsigned int fref, unsigned int fout) da7210_set_dai_pll() argument
|
/kernel/linux/linux-5.10/drivers/clk/ |
H A D | clk-clps711x.c | 47 u32 tmp, f_cpu, f_pll, f_bus, f_tim, f_pwm, f_spi, fref = 0; in clps711x_clk_init_dt() local 51 WARN_ON(of_property_read_u32(np, "startup-frequency", &fref)); in clps711x_clk_init_dt() 65 if (((tmp >= 10) && (tmp <= 50)) || !fref) in clps711x_clk_init_dt() 68 f_pll = fref; in clps711x_clk_init_dt()
|
/kernel/linux/linux-6.6/drivers/clk/ |
H A D | clk-clps711x.c | 47 u32 tmp, f_cpu, f_pll, f_bus, f_tim, f_pwm, f_spi, fref = 0; in clps711x_clk_init_dt() local 51 WARN_ON(of_property_read_u32(np, "startup-frequency", &fref)); in clps711x_clk_init_dt() 65 if (((tmp >= 10) && (tmp <= 50)) || !fref) in clps711x_clk_init_dt() 68 f_pll = fref; in clps711x_clk_init_dt()
|
/kernel/linux/linux-5.10/drivers/clk/pistachio/ |
H A D | clk-pll.c | 129 pll_get_params(struct pistachio_clk_pll *pll, unsigned long fref, in pll_get_params() argument 135 if (pll->rates[i].fref == fref && pll->rates[i].fout == fout) in pll_get_params() 149 if (i > 0 && pll->rates[i].fref == *parent_rate && in pll_round_rate() 210 vco = params->fref; in pll_gf40lp_frac_set_rate() 218 val = div64_u64(params->fref, params->refdiv); in pll_gf40lp_frac_set_rate() 366 vco = div_u64(params->fref * params->fbdiv, params->refdiv); in pll_gf40lp_laint_set_rate() 371 val = div_u64(params->fref, params->refdiv); in pll_gf40lp_laint_set_rate()
|
/kernel/linux/linux-6.6/drivers/clk/pistachio/ |
H A D | clk-pll.c | 129 pll_get_params(struct pistachio_clk_pll *pll, unsigned long fref, in pll_get_params() argument 135 if (pll->rates[i].fref == fref && pll->rates[i].fout == fout) in pll_get_params() 149 if (i > 0 && pll->rates[i].fref == *parent_rate && in pll_round_rate() 210 vco = params->fref; in pll_gf40lp_frac_set_rate() 218 val = div64_u64(params->fref, params->refdiv); in pll_gf40lp_frac_set_rate() 366 vco = div_u64(params->fref * params->fbdiv, params->refdiv); in pll_gf40lp_laint_set_rate() 371 val = div_u64(params->fref, params->refdiv); in pll_gf40lp_laint_set_rate()
|
/kernel/linux/linux-5.10/drivers/clk/imx/ |
H A D | clk-imx27.c | 52 static void __init _mx27_clocks_init(unsigned long fref) in _mx27_clocks_init() argument 57 clk[IMX27_CLK_CKIH] = imx_clk_fixed("ckih", fref); in _mx27_clocks_init() 176 u32 fref = 26000000; /* default */ in mx27_clocks_init_dt() local 182 if (!of_property_read_u32(refnp, "clock-frequency", &fref)) { in mx27_clocks_init_dt() 190 _mx27_clocks_init(fref); in mx27_clocks_init_dt()
|
H A D | clk-imx31.c | 64 static void __init _mx31_clocks_init(void __iomem *base, unsigned long fref) in _mx31_clocks_init() argument 67 clk[ckih] = imx_clk_fixed("ckih", fref); in _mx31_clocks_init() 138 u32 fref = 26000000; /* default */ in mx31_clocks_init_dt() local 145 if (!of_property_read_u32(osc_np, "clock-frequency", &fref)) { in mx31_clocks_init_dt() 155 _mx31_clocks_init(ccm, fref); in mx31_clocks_init_dt()
|
/kernel/linux/linux-5.10/arch/m68k/coldfire/ |
H A D | m53xx.c | 472 int fref, temp, fout, mfd; in clock_pll() local 475 fref = FREF; in clock_pll() 481 return (fref * mfd / (BUSDIV * 4)); in clock_pll() 494 temp = 100 * fsys / fref; in clock_pll() 498 fout = (fref * mfd / (BUSDIV * 4)); in clock_pll()
|
/kernel/linux/linux-6.6/drivers/clk/imx/ |
H A D | clk-imx27.c | 51 static void __init _mx27_clocks_init(unsigned long fref) in _mx27_clocks_init() argument 56 clk[IMX27_CLK_CKIH] = imx_clk_fixed("ckih", fref); in _mx27_clocks_init() 175 u32 fref = 26000000; /* default */ in mx27_clocks_init_dt() local 181 if (!of_property_read_u32(refnp, "clock-frequency", &fref)) { in mx27_clocks_init_dt() 189 _mx27_clocks_init(fref); in mx27_clocks_init_dt()
|
H A D | clk-imx31.c | 53 static void __init _mx31_clocks_init(void __iomem *base, unsigned long fref) in _mx31_clocks_init() argument 56 clk[ckih] = imx_clk_fixed("ckih", fref); in _mx31_clocks_init() 127 u32 fref = 26000000; /* default */ in mx31_clocks_init_dt() local 134 if (!of_property_read_u32(osc_np, "clock-frequency", &fref)) { in mx31_clocks_init_dt() 144 _mx31_clocks_init(ccm, fref); in mx31_clocks_init_dt()
|
/kernel/linux/linux-6.6/arch/m68k/coldfire/ |
H A D | m53xx.c | 472 int fref, temp, fout, mfd; in clock_pll() local 475 fref = FREF; in clock_pll() 481 return (fref * mfd / (BUSDIV * 4)); in clock_pll() 494 temp = 100 * fsys / fref; in clock_pll() 498 fout = (fref * mfd / (BUSDIV * 4)); in clock_pll()
|
/kernel/linux/linux-5.10/drivers/phy/rockchip/ |
H A D | phy-rockchip-inno-dsidphy.c | 224 unsigned long fref, fout; in inno_dsidphy_pll_calc_rate() local 235 fref = prate / 2; in inno_dsidphy_pll_calc_rate() 242 min_prediv = DIV_ROUND_UP(fref, 40000000); in inno_dsidphy_pll_calc_rate() 243 max_prediv = fref / 5000000; in inno_dsidphy_pll_calc_rate() 250 do_div(tmp, fref); in inno_dsidphy_pll_calc_rate() 263 tmp = (u64)_fbdiv * fref; in inno_dsidphy_pll_calc_rate()
|
/kernel/linux/linux-6.6/drivers/phy/rockchip/ |
H A D | phy-rockchip-inno-dsidphy.c | 301 unsigned long fref, fout; in inno_dsidphy_pll_calc_rate() local 312 fref = prate / 2; in inno_dsidphy_pll_calc_rate() 319 min_prediv = DIV_ROUND_UP(fref, 40000000); in inno_dsidphy_pll_calc_rate() 320 max_prediv = fref / 5000000; in inno_dsidphy_pll_calc_rate() 327 do_div(tmp, fref); in inno_dsidphy_pll_calc_rate() 340 tmp = (u64)_fbdiv * fref; in inno_dsidphy_pll_calc_rate()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/msm/dsi/pll/ |
H A D | dsi_pll_14nm.c | 45 u32 fref; /* reference clk */ member 216 pll->in.fref = pll->vco_ref_clk_rate; in dsi_pll_14nm_input_init() 307 u64 fref = pll->vco_ref_clk_rate; in pll_14nm_dec_frac_calc() local 309 DBG("vco_clk_rate=%lld ref_clk_rate=%lld", vco_clk_rate, fref); in pll_14nm_dec_frac_calc() 311 dec_start_multiple = div_u64(vco_clk_rate * multiplier, fref); in pll_14nm_dec_frac_calc() 357 u64 fref = pll->vco_ref_clk_rate; in pll_14nm_calc_vco_count() local 361 data = fref * pin->vco_measure_time; in pll_14nm_calc_vco_count() 372 data = fref * pin->kvco_measure_time; in pll_14nm_calc_vco_count()
|
/kernel/linux/linux-5.10/drivers/tty/serial/8250/ |
H A D | 8250_lpss.c | 77 unsigned long fref = lpss->board->freq, fuart = baud * 16; in byt_set_termios() local 86 fuart *= rounddown_pow_of_two(fref / fuart); in byt_set_termios() 94 rational_best_approximation(fuart, fref, w, w, &m, &n); in byt_set_termios()
|
/kernel/linux/linux-6.6/drivers/tty/serial/8250/ |
H A D | 8250_lpss.c | 77 unsigned long fref = lpss->board->freq, fuart = baud * 16; in byt_set_termios() local 86 fuart *= rounddown_pow_of_two(fref / fuart); in byt_set_termios() 94 rational_best_approximation(fuart, fref, w, w, &m, &n); in byt_set_termios()
|
/kernel/linux/linux-6.6/drivers/spi/ |
H A D | spi-pxa2xx.c | 810 unsigned long fref = xtal / 2; /* mandatory division by 2, in quark_x1000_get_clk_div() local 813 unsigned long fref1 = fref / 2; /* case 1 */ in quark_x1000_get_clk_div() 814 unsigned long fref2 = fref * 2 / 5; /* case 2 */ in quark_x1000_get_clk_div() 871 if (fref / rate >= 80) { in quark_x1000_get_clk_div() 876 q1 = DIV_ROUND_UP(fref, rate); in quark_x1000_get_clk_div() 880 fssp = (u64)fref * m; in quark_x1000_get_clk_div()
|
/kernel/linux/linux-6.6/drivers/gpu/drm/msm/dsi/phy/ |
H A D | dsi_phy_14nm.c | 211 u64 fref = VCO_REF_CLK_RATE; in pll_14nm_dec_frac_calc() local 213 DBG("vco_clk_rate=%lld ref_clk_rate=%lld", vco_clk_rate, fref); in pll_14nm_dec_frac_calc() 215 dec_start_multiple = div_u64(vco_clk_rate * multiplier, fref); in pll_14nm_dec_frac_calc() 254 u64 fref = VCO_REF_CLK_RATE; in pll_14nm_calc_vco_count() local 260 data = fref * vco_measure_time; in pll_14nm_calc_vco_count() 271 data = fref * kvco_measure_time; in pll_14nm_calc_vco_count()
|