Lines Matching refs:clk
16 #include <linux/clk.h>
28 struct clk *clk;
34 static struct clk *spear1340_cpu_get_possible_parent(unsigned long newfreq)
36 struct clk *sys_pclk;
39 * In SPEAr1340, cpu clk's parent sys clk can take input from
50 * As sys clk can have multiple source with their own range
72 * access a source clock (clk) which might not be ancestor of cpu at present.
76 static int spear1340_set_cpu_rate(struct clk *sys_pclk, unsigned long newfreq)
78 struct clk *sys_clk;
81 sys_clk = clk_get_parent(spear_cpufreq.clk);
90 pr_err("Failed to set sys clk rate to %lu\n", newfreq);
96 pr_err("Failed to set sys clk parent\n");
107 struct clk *srcclk;
115 * of multiple clock sources for cpu clk's parent we can have
116 * different clock source for different frequency of cpu clk.
122 pr_err("Failed to get src clk\n");
126 /* SPEAr1340: src clk is always 2 * intended cpu clk */
131 * can directly work on cpu clk
133 srcclk = spear_cpufreq.clk;
145 ret = clk_set_rate(spear_cpufreq.clk, newfreq);
155 policy->clk = spear_cpufreq.clk;
214 spear_cpufreq.clk = clk_get(NULL, "cpu_clk");
215 if (IS_ERR(spear_cpufreq.clk)) {
217 ret = PTR_ERR(spear_cpufreq.clk);
226 clk_put(spear_cpufreq.clk);