Lines Matching full:fref
2106 unsigned int Fref, in arizona_validate_fll() argument
2117 if (Fref / ARIZONA_FLL_MAX_REFDIV > ARIZONA_FLL_MAX_FREF) { in arizona_validate_fll()
2120 Fref); in arizona_validate_fll()
2134 static int arizona_find_fratio(unsigned int Fref, int *fratio) in arizona_find_fratio() argument
2140 if (fll_fratios[i].min <= Fref && Fref <= fll_fratios[i].max) { in arizona_find_fratio()
2153 unsigned int Fref, bool sync) in arizona_calc_fratio() argument
2158 /* Fref must be <=13.5MHz, find initial refdiv */ in arizona_calc_fratio()
2161 while (Fref > ARIZONA_FLL_MAX_FREF) { in arizona_calc_fratio()
2163 Fref /= 2; in arizona_calc_fratio()
2171 init_ratio = arizona_find_fratio(Fref, &cfg->fratio); in arizona_calc_fratio()
2173 arizona_fll_err(fll, "Unable to find FRATIO for Fref=%uHz\n", in arizona_calc_fratio()
2174 Fref); in arizona_calc_fratio()
2198 arizona_fll_dbg(fll, "pseudo: initial ratio=%u fref=%u refdiv=%u\n", in arizona_calc_fratio()
2199 init_ratio, Fref, refdiv); in arizona_calc_fratio()
2206 if (target % (ratio * Fref)) { in arizona_calc_fratio()
2210 "pseudo: found fref=%u refdiv=%d(%d) ratio=%d\n", in arizona_calc_fratio()
2211 Fref, refdiv, div, ratio); in arizona_calc_fratio()
2219 (fll->vco_mult * ratio) < Fref) { in arizona_calc_fratio()
2224 if (Fref > pseudo_fref_max[ratio - 1]) { in arizona_calc_fratio()
2226 "pseudo: exceeded max fref(%u) for ratio=%u\n", in arizona_calc_fratio()
2232 if (target % (ratio * Fref)) { in arizona_calc_fratio()
2236 "pseudo: found fref=%u refdiv=%d(%d) ratio=%d\n", in arizona_calc_fratio()
2237 Fref, refdiv, div, ratio); in arizona_calc_fratio()
2243 Fref /= 2; in arizona_calc_fratio()
2245 init_ratio = arizona_find_fratio(Fref, NULL); in arizona_calc_fratio()
2247 "pseudo: change fref=%u refdiv=%d(%d) ratio=%u\n", in arizona_calc_fratio()
2248 Fref, refdiv, div, init_ratio); in arizona_calc_fratio()
2257 unsigned int Fref, bool sync) in arizona_calc_fll() argument
2262 arizona_fll_dbg(fll, "Fref=%u Fout=%u\n", Fref, fll->fout); in arizona_calc_fll()
2277 ratio = arizona_calc_fratio(fll, cfg, target, Fref, sync); in arizona_calc_fll()
2282 Fref = Fref / (1 << cfg->refdiv); in arizona_calc_fll()
2284 cfg->n = target / (ratio * Fref); in arizona_calc_fll()
2286 if (target % (ratio * Fref)) { in arizona_calc_fll()
2287 gcd_fll = gcd(target, ratio * Fref); in arizona_calc_fll()
2290 cfg->theta = (target - (cfg->n * ratio * Fref)) in arizona_calc_fll()
2292 cfg->lambda = (ratio * Fref) / gcd_fll; in arizona_calc_fll()
2308 if (fll_gains[i].min <= Fref && Fref <= fll_gains[i].max) { in arizona_calc_fll()
2314 arizona_fll_err(fll, "Unable to find gain for Fref=%uHz\n", in arizona_calc_fll()
2315 Fref); in arizona_calc_fll()
2556 unsigned int Fref, unsigned int Fout) in arizona_set_fll_refclk() argument
2560 if (fll->ref_src == source && fll->ref_freq == Fref) in arizona_set_fll_refclk()
2563 if (fll->fout && Fref > 0) { in arizona_set_fll_refclk()
2564 ret = arizona_validate_fll(fll, Fref, fll->fout); in arizona_set_fll_refclk()
2570 fll->ref_freq = Fref; in arizona_set_fll_refclk()
2572 if (fll->fout && Fref > 0) in arizona_set_fll_refclk()
2580 unsigned int Fref, unsigned int Fout) in arizona_set_fll() argument
2585 fll->sync_freq == Fref && fll->fout == Fout) in arizona_set_fll()
2595 ret = arizona_validate_fll(fll, Fref, Fout); in arizona_set_fll()
2601 fll->sync_freq = Fref; in arizona_set_fll()