Lines Matching refs:policy
33 struct cpufreq_policy *policy;
45 struct cpufreq_policy *policy = target->policy;
46 int cpu = policy->cpu;
60 if (freq < (policy->min * 1000) || freq > (policy->max * 1000))
69 cpufreq_freq_transition_begin(target->policy, &freqs);
71 cpufreq_freq_transition_end(target->policy, &freqs, 0);
80 static int sh_cpufreq_target(struct cpufreq_policy *policy,
84 struct cpufreq_target data = { .policy = policy, .freq = target_freq };
86 return work_on_cpu(policy->cpu, __sh_cpufreq_target, &data);
89 static int sh_cpufreq_verify(struct cpufreq_policy_data *policy)
91 struct clk *cpuclk = &per_cpu(sh_cpuclk, policy->cpu);
96 return cpufreq_frequency_table_verify(policy, freq_table);
98 cpufreq_verify_within_cpu_limits(policy);
100 policy->min = (clk_round_rate(cpuclk, 1) + 500) / 1000;
101 policy->max = (clk_round_rate(cpuclk, ~0UL) + 500) / 1000;
103 cpufreq_verify_within_cpu_limits(policy);
107 static int sh_cpufreq_cpu_init(struct cpufreq_policy *policy)
109 unsigned int cpu = policy->cpu;
124 policy->freq_table = freq_table;
129 policy->min = policy->cpuinfo.min_freq =
131 policy->max = policy->cpuinfo.max_freq =
138 static int sh_cpufreq_cpu_exit(struct cpufreq_policy *policy)
140 unsigned int cpu = policy->cpu;