Lines Matching refs:cpu_dev
31 struct device *cpu_dev; member
62 return dev_pm_opp_set_rate(priv->cpu_dev, freq * 1000); in set_target()
106 struct device *cpu_dev; in cpufreq_init() local
116 cpu_dev = priv->cpu_dev; in cpufreq_init()
118 cpu_clk = clk_get(cpu_dev, NULL); in cpufreq_init()
121 dev_err(cpu_dev, "%s: failed to get clk: %d\n", __func__, ret); in cpufreq_init()
125 transition_latency = dev_pm_opp_get_max_transition_latency(cpu_dev); in cpufreq_init()
133 policy->suspend_freq = dev_pm_opp_get_suspend_opp_freq(cpu_dev) / 1000; in cpufreq_init()
194 struct device *cpu_dev; in dt_cpufreq_early_init() local
203 cpu_dev = get_cpu_device(cpu); in dt_cpufreq_early_init()
204 if (!cpu_dev) in dt_cpufreq_early_init()
215 priv->cpu_dev = cpu_dev; in dt_cpufreq_early_init()
221 reg_name[0] = find_supply_name(cpu_dev); in dt_cpufreq_early_init()
223 priv->opp_token = dev_pm_opp_set_regulators(cpu_dev, reg_name); in dt_cpufreq_early_init()
225 ret = dev_err_probe(cpu_dev, priv->opp_token, in dt_cpufreq_early_init()
232 ret = dev_pm_opp_of_get_sharing_cpus(cpu_dev, priv->cpus); in dt_cpufreq_early_init()
242 if (dev_pm_opp_get_sharing_cpus(cpu_dev, priv->cpus)) in dt_cpufreq_early_init()
268 ret = dev_pm_opp_get_opp_count(cpu_dev); in dt_cpufreq_early_init()
270 dev_err(cpu_dev, "OPP table can't be empty\n"); in dt_cpufreq_early_init()
277 ret = dev_pm_opp_set_sharing_cpus(cpu_dev, priv->cpus); in dt_cpufreq_early_init()
279 dev_err(cpu_dev, "%s: failed to mark OPPs as shared: %d\n", in dt_cpufreq_early_init()
283 ret = dev_pm_opp_init_cpufreq_table(cpu_dev, &priv->freq_table); in dt_cpufreq_early_init()
285 dev_err(cpu_dev, "failed to init cpufreq table: %d\n", ret); in dt_cpufreq_early_init()
306 dev_pm_opp_free_cpufreq_table(priv->cpu_dev, &priv->freq_table); in dt_cpufreq_release()