Lines Matching +full:min +full:- +full:freq
4 * Copyright (C) 2002 - 2012 Paul Mundt
7 * Clock framework bits from arch/avr32/mach-at32ap/cpufreq.c
9 * Copyright (C) 2004-2007 Atmel Corporation
34 unsigned int freq;
45 struct cpufreq_policy *policy = target->policy;
46 int cpu = policy->cpu;
50 long freq;
53 return -ENODEV;
58 freq = clk_round_rate(cpuclk, target->freq * 1000);
60 if (freq < (policy->min * 1000) || freq > (policy->max * 1000))
61 return -EINVAL;
63 dev_dbg(dev, "requested frequency %u Hz\n", target->freq * 1000);
66 freqs.new = (freq + 500) / 1000;
69 cpufreq_freq_transition_begin(target->policy, &freqs);
70 clk_set_rate(cpuclk, freq);
71 cpufreq_freq_transition_end(target->policy, &freqs, 0);
73 dev_dbg(dev, "set frequency %lu Hz\n", freq);
84 struct cpufreq_target data = { .policy = policy, .freq = target_freq };
86 return work_on_cpu(policy->cpu, __sh_cpufreq_target, &data);
91 struct clk *cpuclk = &per_cpu(sh_cpuclk, policy->cpu);
94 freq_table = cpuclk->nr_freqs ? cpuclk->freq_table : NULL;
100 policy->min = (clk_round_rate(cpuclk, 1) + 500) / 1000;
101 policy->max = (clk_round_rate(cpuclk, ~0UL) + 500) / 1000;
109 unsigned int cpu = policy->cpu;
122 freq_table = cpuclk->nr_freqs ? cpuclk->freq_table : NULL;
124 policy->freq_table = freq_table;
129 policy->min = policy->cpuinfo.min_freq =
131 policy->max = policy->cpuinfo.max_freq =
140 unsigned int cpu = policy->cpu;
170 MODULE_AUTHOR("Paul Mundt <lethal@linux-sh.org>");