2 #include <linux/module.h>
4 #include <hwregs/reg_map.h>
14 .notifier_call = cris_sdram_freq_notifier
23 static unsigned int cris_freq_get_cpu_frequency(
unsigned int cpu)
27 return clk_ctrl.
pll ? 200000 : 6000;
30 static void cris_freq_set_cpu_state(
unsigned int state)
41 freqs.old = cris_freq_get_cpu_frequency(i);
52 if (cris_freq_table[state].
frequency == 200000)
69 unsigned int target_freq,
70 unsigned int relation)
72 unsigned int newstate = 0;
75 target_freq, relation, &newstate))
78 cris_freq_set_cpu_state(newstate);
88 policy->
cpuinfo.transition_latency = 1000000;
89 policy->
cur = cris_freq_get_cpu_frequency(0);
108 static struct freq_attr *cris_freq_attr[] = {
114 .get = cris_freq_get_cpu_frequency,
115 .verify = cris_freq_verify,
116 .target = cris_freq_target,
117 .init = cris_freq_cpu_init,
118 .exit = cris_freq_cpu_exit,
121 .attr = cris_freq_attr,
124 static int __init cris_freq_init(
void)
144 if (freqs->
new == 200000)
145 for (i = 0; i < 50000; i++);