Lines Matching refs:freq
46 unsigned long freq; in clk_rate_table_build() local
62 freq = CPUFREQ_ENTRY_INVALID; in clk_rate_table_build()
64 freq = clk->parent->rate * mult / div; in clk_rate_table_build()
67 freq_table[i].frequency = freq; in clk_rate_table_build()
84 #define for_each_frequency(pos, r, freq) \ argument
85 for (pos = r->min, freq = r->func(pos, r); \
86 pos <= r->max; pos++, freq = r->func(pos, r)) \
87 if (unlikely(freq == 0)) \
94 unsigned long highest, lowest, freq; in clk_rate_round_helper() local
101 for_each_frequency(i, rounder, freq) { in clk_rate_round_helper()
102 if (freq > highest) in clk_rate_round_helper()
103 highest = freq; in clk_rate_round_helper()
104 if (freq < lowest) in clk_rate_round_helper()
105 lowest = freq; in clk_rate_round_helper()
107 rate_error = abs(freq - rounder->rate); in clk_rate_round_helper()
109 rate_best_fit = freq; in clk_rate_round_helper()
129 unsigned long freq = freq_table[pos].frequency; in clk_rate_table_iter() local
131 if (freq == CPUFREQ_ENTRY_INVALID) in clk_rate_table_iter()
132 freq = 0; in clk_rate_table_iter()
134 return freq; in clk_rate_table_iter()
562 struct cpufreq_frequency_table *freq, *best = NULL; in clk_round_parent() local
572 cpufreq_for_each_valid_entry(freq, parent->freq_table) { in clk_round_parent()
573 if (unlikely(freq->frequency / target <= div_min - 1)) { in clk_round_parent()
576 freq_max = (freq->frequency + div_min / 2) / div_min; in clk_round_parent()
579 best = freq; in clk_round_parent()
584 pr_debug("too low freq %u, error %lu\n", freq->frequency, in clk_round_parent()
593 if (unlikely(freq->frequency / target >= div_max)) { in clk_round_parent()
596 freq_min = (freq->frequency + div_max / 2) / div_max; in clk_round_parent()
599 best = freq; in clk_round_parent()
604 pr_debug("too high freq %u, error %lu\n", freq->frequency, in clk_round_parent()
613 div = freq->frequency / target; in clk_round_parent()
614 freq_high = freq->frequency / div; in clk_round_parent()
615 freq_low = freq->frequency / (div + 1); in clk_round_parent()
619 best = freq; in clk_round_parent()
626 best = freq; in clk_round_parent()
632 freq->frequency, div, freq_high, div + 1, freq_low, in clk_round_parent()