Lines Matching refs:policy
34 struct cpufreq_policy *policy;
46 struct cpufreq_policy *policy = target->policy;
47 int cpu = policy->cpu;
61 if (freq < (policy->min * 1000) || freq > (policy->max * 1000))
70 cpufreq_freq_transition_begin(target->policy, &freqs);
72 cpufreq_freq_transition_end(target->policy, &freqs, 0);
81 static int sh_cpufreq_target(struct cpufreq_policy *policy,
85 struct cpufreq_target data = { .policy = policy, .freq = target_freq };
87 return work_on_cpu(policy->cpu, __sh_cpufreq_target, &data);
90 static int sh_cpufreq_verify(struct cpufreq_policy_data *policy)
92 struct clk *cpuclk = &per_cpu(sh_cpuclk, policy->cpu);
97 return cpufreq_frequency_table_verify(policy, freq_table);
99 cpufreq_verify_within_cpu_limits(policy);
101 policy->min = (clk_round_rate(cpuclk, 1) + 500) / 1000;
102 policy->max = (clk_round_rate(cpuclk, ~0UL) + 500) / 1000;
104 cpufreq_verify_within_cpu_limits(policy);
108 static int sh_cpufreq_cpu_init(struct cpufreq_policy *policy)
110 unsigned int cpu = policy->cpu;
125 policy->freq_table = freq_table;
130 policy->min = policy->cpuinfo.min_freq =
132 policy->max = policy->cpuinfo.max_freq =
139 static int sh_cpufreq_cpu_exit(struct cpufreq_policy *policy)
141 unsigned int cpu = policy->cpu;
149 static void sh_cpufreq_cpu_ready(struct cpufreq_policy *policy)
151 struct device *dev = get_cpu_device(policy->cpu);
155 policy->min / 1000, policy->min % 1000,
156 policy->max / 1000, policy->max % 1000);