Lines Matching refs:cpu_dev

279 static void _put_cluster_clk_and_freq_table(struct device *cpu_dev,
282 u32 cluster = raw_cpu_to_cluster(cpu_dev->id);
288 dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table[cluster]);
291 static void put_cluster_clk_and_freq_table(struct device *cpu_dev,
294 u32 cluster = cpu_to_cluster(cpu_dev->id);
301 return _put_cluster_clk_and_freq_table(cpu_dev, cpumask);
316 static int _get_cluster_clk_and_freq_table(struct device *cpu_dev,
319 u32 cluster = raw_cpu_to_cluster(cpu_dev->id);
329 ret = dev_pm_opp_get_opp_count(cpu_dev) <= 0;
333 ret = dev_pm_opp_init_cpufreq_table(cpu_dev, &freq_table[cluster]);
337 clk[cluster] = clk_get(cpu_dev, NULL);
341 dev_err(cpu_dev, "%s: Failed to get clk for cpu: %d, cluster: %d\n",
342 __func__, cpu_dev->id, cluster);
344 dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table[cluster]);
347 dev_err(cpu_dev, "%s: Failed to get data for cluster: %d\n", __func__,
352 static int get_cluster_clk_and_freq_table(struct device *cpu_dev,
355 u32 cluster = cpu_to_cluster(cpu_dev->id);
362 ret = _get_cluster_clk_and_freq_table(cpu_dev, cpumask);
413 struct device *cpu_dev;
416 cpu_dev = get_cpu_device(policy->cpu);
417 if (!cpu_dev) {
426 dev_pm_opp_get_sharing_cpus(cpu_dev, policy->cpus);
435 ret = get_cluster_clk_and_freq_table(cpu_dev, policy->cpus);
446 dev_info(cpu_dev, "%s: CPU %d initialized\n", __func__, policy->cpu);
452 struct device *cpu_dev;
454 cpu_dev = get_cpu_device(policy->cpu);
455 if (!cpu_dev) {
461 put_cluster_clk_and_freq_table(cpu_dev, policy->related_cpus);