Lines Matching full:cpufreq
14 #include <linux/cpufreq.h>
21 #include <cpufreq.h>
34 static struct ls1x_cpufreq *cpufreq; variable
67 clk_set_parent(policy->clk, cpufreq->osc_clk); in ls1x_cpufreq_target()
72 clk_set_rate(cpufreq->mux_clk, new_freq * 1000); in ls1x_cpufreq_target()
73 clk_set_parent(policy->clk, cpufreq->mux_clk); in ls1x_cpufreq_target()
86 pll_freq = clk_get_rate(cpufreq->pll_clk) / 1000; in ls1x_cpufreq_init()
95 if ((freq < cpufreq->min_freq) || (freq > cpufreq->max_freq)) in ls1x_cpufreq_init()
100 "cpufreq table: index %d: frequency %d\n", i, in ls1x_cpufreq_init()
105 policy->clk = cpufreq->clk; in ls1x_cpufreq_init()
118 .name = "cpufreq-ls1x",
148 cpufreq = in ls1x_cpufreq_probe()
150 if (!cpufreq) in ls1x_cpufreq_probe()
153 cpufreq->dev = &pdev->dev; in ls1x_cpufreq_probe()
161 cpufreq->clk = clk; in ls1x_cpufreq_probe()
166 __clk_get_name(cpufreq->clk)); in ls1x_cpufreq_probe()
169 cpufreq->mux_clk = clk; in ls1x_cpufreq_probe()
174 __clk_get_name(cpufreq->mux_clk)); in ls1x_cpufreq_probe()
177 cpufreq->pll_clk = clk; in ls1x_cpufreq_probe()
185 cpufreq->osc_clk = clk; in ls1x_cpufreq_probe()
187 cpufreq->max_freq = pdata->max_freq; in ls1x_cpufreq_probe()
188 cpufreq->min_freq = pdata->min_freq; in ls1x_cpufreq_probe()
193 "failed to register CPUFreq driver: %d\n", ret); in ls1x_cpufreq_probe()
202 "failed to register CPUFreq notifier: %d\n",ret); in ls1x_cpufreq_probe()
213 .name = "ls1x-cpufreq",
219 MODULE_ALIAS("platform:ls1x-cpufreq");
221 MODULE_DESCRIPTION("Loongson1 CPUFreq driver");