Home
last modified time | relevance | path

Searched refs:cpu_dev (Results 1 – 25 of 57) sorted by relevance

123

/linux-6.12.1/drivers/cpufreq/
Dscpi-cpufreq.c25 struct device *cpu_dev; member
58 scpi_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask) in scpi_get_sharing_cpus() argument
63 domain = scpi_ops->device_domain_id(cpu_dev); in scpi_get_sharing_cpus()
68 if (cpu == cpu_dev->id) in scpi_get_sharing_cpus()
87 struct device *cpu_dev; in scpi_cpufreq_init() local
91 cpu_dev = get_cpu_device(policy->cpu); in scpi_cpufreq_init()
92 if (!cpu_dev) { in scpi_cpufreq_init()
97 ret = scpi_ops->add_opps_to_device(cpu_dev); in scpi_cpufreq_init()
99 dev_warn(cpu_dev, "failed to add opps to the device\n"); in scpi_cpufreq_init()
103 ret = scpi_get_sharing_cpus(cpu_dev, policy->cpus); in scpi_cpufreq_init()
[all …]
Dimx6q-cpufreq.c52 static struct device *cpu_dev; variable
72 opp = dev_pm_opp_find_freq_ceil(cpu_dev, &freq_hz); in imx6q_set_target()
74 dev_err(cpu_dev, "failed to find OPP for %ld\n", freq_hz); in imx6q_set_target()
83 dev_dbg(cpu_dev, "%u MHz, %ld mV --> %u MHz, %ld mV\n", in imx6q_set_target()
92 dev_err(cpu_dev, "failed to scale vddpu up: %d\n", ret); in imx6q_set_target()
98 dev_err(cpu_dev, "failed to scale vddsoc up: %d\n", ret); in imx6q_set_target()
103 dev_err(cpu_dev, in imx6q_set_target()
161 dev_err(cpu_dev, "failed to set clock rate: %d\n", ret); in imx6q_set_target()
164 dev_warn(cpu_dev, in imx6q_set_target()
177 dev_warn(cpu_dev, in imx6q_set_target()
[all …]
Dcpufreq-dt.c31 struct device *cpu_dev; member
62 return dev_pm_opp_set_rate(priv->cpu_dev, freq * 1000); in set_target()
92 struct device *cpu_dev; in cpufreq_init() local
102 cpu_dev = priv->cpu_dev; in cpufreq_init()
104 cpu_clk = clk_get(cpu_dev, NULL); in cpufreq_init()
107 dev_err(cpu_dev, "%s: failed to get clk: %d\n", __func__, ret); in cpufreq_init()
111 transition_latency = dev_pm_opp_get_max_transition_latency(cpu_dev); in cpufreq_init()
119 policy->suspend_freq = dev_pm_opp_get_suspend_opp_freq(cpu_dev) / 1000; in cpufreq_init()
179 struct device *cpu_dev; in dt_cpufreq_early_init() local
188 cpu_dev = get_cpu_device(cpu); in dt_cpufreq_early_init()
[all …]
Dscmi-cpufreq.c27 struct device *cpu_dev; member
74 static int scmi_cpu_domain_id(struct device *cpu_dev) in scmi_cpu_domain_id() argument
76 struct device_node *np = cpu_dev->of_node; in scmi_cpu_domain_id()
98 scmi_get_sharing_cpus(struct device *cpu_dev, int domain, in scmi_get_sharing_cpus() argument
105 if (cpu == cpu_dev->id) in scmi_get_sharing_cpus()
121 scmi_get_cpu_power(struct device *cpu_dev, unsigned long *power, in scmi_get_cpu_power() argument
128 domain = scmi_cpu_domain_id(cpu_dev); in scmi_get_cpu_power()
181 struct device *cpu_dev; in scmi_cpufreq_init() local
185 cpu_dev = get_cpu_device(policy->cpu); in scmi_cpufreq_init()
186 if (!cpu_dev) { in scmi_cpufreq_init()
[all …]
Dmediatek-cpufreq.c41 struct device *cpu_dev; member
89 dev_err(info->cpu_dev, in mtk_cpufreq_voltage_tracking()
96 dev_err(info->cpu_dev, "invalid Vsram value: %d\n", pre_vsram); in mtk_cpufreq_voltage_tracking()
153 dev_err(info->cpu_dev, in mtk_cpufreq_voltage_tracking()
185 sup_link = device_link_add(info->cpu_dev, info->cci_dev, in is_ccifreq_ready()
188 dev_err(info->cpu_dev, "cpu%d: sup_link is NULL\n", info->opp_cpu); in is_ccifreq_ready()
207 struct device *cpu_dev = info->cpu_dev; in mtk_cpufreq_set_target() local
224 dev_err(cpu_dev, "invalid Vproc value: %d\n", pre_vproc); in mtk_cpufreq_set_target()
231 opp = dev_pm_opp_find_freq_ceil(cpu_dev, &freq_hz); in mtk_cpufreq_set_target()
233 dev_err(cpu_dev, "cpu%d: failed to find OPP for %ld\n", in mtk_cpufreq_set_target()
[all …]
Darmada-8k-cpufreq.c40 struct device *cpu_dev; member
51 struct device *cpu_dev; in armada_8k_get_sharing_cpus() local
54 cpu_dev = get_cpu_device(cpu); in armada_8k_get_sharing_cpus()
55 if (!cpu_dev) { in armada_8k_get_sharing_cpus()
60 clk = clk_get(cpu_dev, NULL); in armada_8k_get_sharing_cpus()
72 static int __init armada_8k_add_opp(struct clk *clk, struct device *cpu_dev, in armada_8k_add_opp() argument
83 dev_err(cpu_dev, "Failed to get clock rate for this CPU\n"); in armada_8k_add_opp()
87 freq_tables[opps_index].cpu_dev = cpu_dev; in armada_8k_add_opp()
92 ret = dev_pm_opp_add(cpu_dev, freq, 0); in armada_8k_add_opp()
110 if (!freq_tables[opps_index].cpu_dev) in armada_8k_cpufreq_free_table()
[all …]
Draspberrypi-cpufreq.c21 struct device *cpu_dev; in raspberrypi_cpufreq_probe() local
27 cpu_dev = get_cpu_device(0); in raspberrypi_cpufreq_probe()
28 if (!cpu_dev) { in raspberrypi_cpufreq_probe()
33 clk = clk_get(cpu_dev, NULL); in raspberrypi_cpufreq_probe()
35 dev_err(cpu_dev, "Cannot get clock for CPU0\n"); in raspberrypi_cpufreq_probe()
48 ret = dev_pm_opp_add(cpu_dev, rate, 0); in raspberrypi_cpufreq_probe()
56 dev_err(cpu_dev, "Failed to create platform device, %d\n", ret); in raspberrypi_cpufreq_probe()
63 dev_pm_opp_remove_all_dynamic(cpu_dev); in raspberrypi_cpufreq_probe()
70 struct device *cpu_dev; in raspberrypi_cpufreq_remove() local
72 cpu_dev = get_cpu_device(0); in raspberrypi_cpufreq_remove()
[all …]
Dqcom-cpufreq-nvmem.c51 int (*get_version)(struct device *cpu_dev,
71 static int qcom_cpufreq_simple_get_version(struct device *cpu_dev, in qcom_cpufreq_simple_get_version() argument
83 dev_dbg(cpu_dev, "speedbin: %d\n", *speedbin); in qcom_cpufreq_simple_get_version()
89 static void get_krait_bin_format_a(struct device *cpu_dev, in get_krait_bin_format_a() argument
103 dev_warn(cpu_dev, "Speed bin: Defaulting to %d\n", *speed); in get_krait_bin_format_a()
105 dev_dbg(cpu_dev, "Speed bin: %d\n", *speed); in get_krait_bin_format_a()
114 dev_warn(cpu_dev, "PVS bin: Defaulting to %d\n", *pvs); in get_krait_bin_format_a()
116 dev_dbg(cpu_dev, "PVS bin: %d\n", *pvs); in get_krait_bin_format_a()
120 static void get_krait_bin_format_b(struct device *cpu_dev, in get_krait_bin_format_b() argument
148 dev_dbg(cpu_dev, "Speed bin: %d\n", *speed); in get_krait_bin_format_b()
[all …]
Dmvebu-cpufreq.c60 struct device *cpu_dev; in armada_xp_pmsu_cpufreq_init() local
64 cpu_dev = get_cpu_device(cpu); in armada_xp_pmsu_cpufreq_init()
65 if (!cpu_dev) { in armada_xp_pmsu_cpufreq_init()
70 clk = clk_get(cpu_dev, NULL); in armada_xp_pmsu_cpufreq_init()
76 ret = dev_pm_opp_add(cpu_dev, clk_get_rate(clk), 0); in armada_xp_pmsu_cpufreq_init()
82 ret = dev_pm_opp_add(cpu_dev, clk_get_rate(clk) / 2, 0); in armada_xp_pmsu_cpufreq_init()
84 dev_pm_opp_remove(cpu_dev, clk_get_rate(clk)); in armada_xp_pmsu_cpufreq_init()
86 dev_err(cpu_dev, "Failed to register OPPs\n"); in armada_xp_pmsu_cpufreq_init()
90 ret = dev_pm_opp_set_sharing_cpus(cpu_dev, in armada_xp_pmsu_cpufreq_init()
91 cpumask_of(cpu_dev->id)); in armada_xp_pmsu_cpufreq_init()
[all …]
Dapple-soc-cpufreq.c64 struct device *cpu_dev; member
129 dev_err(priv->cpu_dev, "could not find frequency for pstate %d\n", in apple_soc_cpufreq_get_rate()
209 struct device *cpu_dev; in apple_soc_cpufreq_init() local
214 cpu_dev = get_cpu_device(policy->cpu); in apple_soc_cpufreq_init()
215 if (!cpu_dev) { in apple_soc_cpufreq_init()
220 ret = dev_pm_opp_of_add_table(cpu_dev); in apple_soc_cpufreq_init()
222 dev_err(cpu_dev, "%s: failed to add OPP table: %d\n", __func__, ret); in apple_soc_cpufreq_init()
228 dev_err(cpu_dev, "%s: failed to get cluster info: %d\n", __func__, ret); in apple_soc_cpufreq_init()
232 ret = dev_pm_opp_set_sharing_cpus(cpu_dev, policy->cpus); in apple_soc_cpufreq_init()
234 dev_err(cpu_dev, "%s: failed to mark OPPs as shared: %d\n", __func__, ret); in apple_soc_cpufreq_init()
[all …]
Dvexpress-spc-cpufreq.c279 static void _put_cluster_clk_and_freq_table(struct device *cpu_dev, in _put_cluster_clk_and_freq_table() argument
282 u32 cluster = raw_cpu_to_cluster(cpu_dev->id); in _put_cluster_clk_and_freq_table()
288 dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table[cluster]); in _put_cluster_clk_and_freq_table()
291 static void put_cluster_clk_and_freq_table(struct device *cpu_dev, in put_cluster_clk_and_freq_table() argument
294 u32 cluster = cpu_to_cluster(cpu_dev->id); in put_cluster_clk_and_freq_table()
301 return _put_cluster_clk_and_freq_table(cpu_dev, cpumask); in put_cluster_clk_and_freq_table()
316 static int _get_cluster_clk_and_freq_table(struct device *cpu_dev, in _get_cluster_clk_and_freq_table() argument
319 u32 cluster = raw_cpu_to_cluster(cpu_dev->id); in _get_cluster_clk_and_freq_table()
329 ret = dev_pm_opp_get_opp_count(cpu_dev) <= 0; in _get_cluster_clk_and_freq_table()
333 ret = dev_pm_opp_init_cpufreq_table(cpu_dev, &freq_table[cluster]); in _get_cluster_clk_and_freq_table()
[all …]
Dsun50i-cpufreq-nvmem.c137 struct device *cpu_dev; in dt_has_supported_hw() local
139 cpu_dev = get_cpu_device(0); in dt_has_supported_hw()
140 if (!cpu_dev) in dt_has_supported_hw()
144 dev_pm_opp_of_get_opp_desc_node(cpu_dev); in dt_has_supported_hw()
169 struct device *cpu_dev; in sun50i_cpufreq_get_efuse() local
173 cpu_dev = get_cpu_device(0); in sun50i_cpufreq_get_efuse()
174 if (!cpu_dev) in sun50i_cpufreq_get_efuse()
178 dev_pm_opp_of_get_opp_desc_node(cpu_dev); in sun50i_cpufreq_get_efuse()
190 return dev_err_probe(cpu_dev, PTR_ERR(speedbin_nvmem), in sun50i_cpufreq_get_efuse()
239 struct device *cpu_dev = get_cpu_device(cpu); in sun50i_cpufreq_nvmem_probe() local
[all …]
Dqcom-cpufreq-hw.c93 static int qcom_cpufreq_update_opp(struct device *cpu_dev, in qcom_cpufreq_update_opp() argument
102 return dev_pm_opp_add(cpu_dev, freq_hz, volt); in qcom_cpufreq_update_opp()
104 ret = dev_pm_opp_adjust_voltage(cpu_dev, freq_hz, volt, volt, volt); in qcom_cpufreq_update_opp()
106 dev_err(cpu_dev, "Voltage update failed freq=%ld\n", freq_khz); in qcom_cpufreq_update_opp()
110 return dev_pm_opp_enable(cpu_dev, freq_hz); in qcom_cpufreq_update_opp()
201 static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev, in qcom_cpufreq_hw_read_lut() argument
217 ret = dev_pm_opp_of_add_table(cpu_dev); in qcom_cpufreq_hw_read_lut()
222 opp = dev_pm_opp_find_freq_ceil(cpu_dev, &rate); in qcom_cpufreq_hw_read_lut()
227 dev_pm_opp_disable(cpu_dev, rate); in qcom_cpufreq_hw_read_lut()
230 dev_err(cpu_dev, "Invalid opp table in device tree\n"); in qcom_cpufreq_hw_read_lut()
[all …]
Darmada-37xx-cpufreq.c88 struct device *cpu_dev; member
409 struct device *cpu_dev; in armada37xx_cpufreq_driver_init() local
440 cpu_dev = get_cpu_device(0); in armada37xx_cpufreq_driver_init()
441 if (!cpu_dev) { in armada37xx_cpufreq_driver_init()
442 dev_err(cpu_dev, "Cannot get CPU\n"); in armada37xx_cpufreq_driver_init()
446 clk = clk_get(cpu_dev, NULL); in armada37xx_cpufreq_driver_init()
448 dev_err(cpu_dev, "Cannot get clock for CPU0\n"); in armada37xx_cpufreq_driver_init()
454 dev_err(cpu_dev, "Cannot get parent clock for CPU0\n"); in armada37xx_cpufreq_driver_init()
463 dev_err(cpu_dev, "Failed to get parent clock rate for CPU\n"); in armada37xx_cpufreq_driver_init()
493 ret = dev_pm_opp_add(cpu_dev, freq, u_volt); in armada37xx_cpufreq_driver_init()
[all …]
Dhighbank-cpufreq.c61 struct device *cpu_dev; in hb_cpufreq_driver_init() local
70 cpu_dev = get_cpu_device(0); in hb_cpufreq_driver_init()
71 if (!cpu_dev) { in hb_cpufreq_driver_init()
76 np = of_node_get(cpu_dev->of_node); in hb_cpufreq_driver_init()
82 cpu_clk = clk_get(cpu_dev, NULL); in hb_cpufreq_driver_init()
Dtegra194-cpufreq.c430 struct device *cpu_dev; in tegra_cpufreq_init_cpufreq_table() local
436 cpu_dev = get_cpu_device(policy->cpu); in tegra_cpufreq_init_cpufreq_table()
437 if (!cpu_dev) { in tegra_cpufreq_init_cpufreq_table()
443 ret = dev_pm_opp_of_add_table_indexed(cpu_dev, 0); in tegra_cpufreq_init_cpufreq_table()
445 max_opps = dev_pm_opp_get_opp_count(cpu_dev); in tegra_cpufreq_init_cpufreq_table()
447 dev_err(cpu_dev, "Failed to add OPPs\n"); in tegra_cpufreq_init_cpufreq_table()
453 opp = dev_pm_opp_find_freq_ceil(cpu_dev, &rate); in tegra_cpufreq_init_cpufreq_table()
458 dev_pm_opp_disable(cpu_dev, rate); in tegra_cpufreq_init_cpufreq_table()
461 dev_err(cpu_dev, "Invalid or empty opp table in device tree\n"); in tegra_cpufreq_init_cpufreq_table()
475 opp = dev_pm_opp_find_freq_exact(cpu_dev, pos->frequency * KHZ, false); in tegra_cpufreq_init_cpufreq_table()
[all …]
Dimx-cpufreq-dt.c34 static struct device *cpu_dev; variable
90 cpu_dev = get_cpu_device(0); in imx_cpufreq_dt_probe()
92 if (!of_property_present(cpu_dev->of_node, "cpu-supply")) in imx_cpufreq_dt_probe()
96 ret = clk_bulk_get(cpu_dev, ARRAY_SIZE(imx7ulp_clks), in imx_cpufreq_dt_probe()
116 ret = nvmem_cell_read_u32(cpu_dev, "speed_grade", &cell_value); in imx_cpufreq_dt_probe()
156 cpufreq_opp_token = dev_pm_opp_set_supported_hw(cpu_dev, supported_hw, 2); in imx_cpufreq_dt_probe()
Dti-cpufreq.c100 struct device *cpu_dev; member
351 struct device *dev = opp_data->cpu_dev; in ti_cpufreq_get_efuse()
392 struct device *dev = opp_data->cpu_dev; in ti_cpufreq_get_rev()
433 struct device *dev = opp_data->cpu_dev; in ti_cpufreq_setup_syscon_register()
495 opp_data->cpu_dev = get_cpu_device(0); in ti_cpufreq_probe()
496 if (!opp_data->cpu_dev) { in ti_cpufreq_probe()
501 opp_data->opp_node = dev_pm_opp_of_get_opp_desc_node(opp_data->cpu_dev); in ti_cpufreq_probe()
503 dev_info(opp_data->cpu_dev, in ti_cpufreq_probe()
533 ret = dev_pm_opp_set_config(opp_data->cpu_dev, &config); in ti_cpufreq_probe()
535 dev_err_probe(opp_data->cpu_dev, ret, "Failed to set OPP config\n"); in ti_cpufreq_probe()
Dtegra20-cpufreq.c48 struct device *cpu_dev; in tegra20_cpufreq_probe() local
69 cpu_dev = get_cpu_device(0); in tegra20_cpufreq_probe()
70 if (WARN_ON(!cpu_dev)) in tegra20_cpufreq_probe()
73 err = dev_pm_opp_set_supported_hw(cpu_dev, versions, 2); in tegra20_cpufreq_probe()
/linux-6.12.1/drivers/opp/
Dcpu.c111 struct device *cpu_dev; in _dev_pm_opp_cpumask_remove_table() local
120 cpu_dev = get_cpu_device(cpu); in _dev_pm_opp_cpumask_remove_table()
121 if (!cpu_dev) { in _dev_pm_opp_cpumask_remove_table()
127 dev_pm_opp_remove_table(cpu_dev); in _dev_pm_opp_cpumask_remove_table()
155 int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, in dev_pm_opp_set_sharing_cpus() argument
163 opp_table = _find_opp_table(cpu_dev); in dev_pm_opp_set_sharing_cpus()
168 if (cpu == cpu_dev->id) in dev_pm_opp_set_sharing_cpus()
173 dev_err(cpu_dev, "%s: failed to get cpu%d device\n", in dev_pm_opp_set_sharing_cpus()
205 int dev_pm_opp_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask) in dev_pm_opp_get_sharing_cpus() argument
211 opp_table = _find_opp_table(cpu_dev); in dev_pm_opp_get_sharing_cpus()
[all …]
/linux-6.12.1/arch/arm/mach-versatile/
Dspc.c419 static int ve_init_opp_table(struct device *cpu_dev) in ve_init_opp_table() argument
425 cluster = topology_physical_package_id(cpu_dev->id); in ve_init_opp_table()
432 ret = dev_pm_opp_add(cpu_dev, opps->freq * 1000, opps->u_volt); in ve_init_opp_table()
434 dev_warn(cpu_dev, "failed to add opp %lu %lu\n", in ve_init_opp_table()
522 static struct clk *ve_spc_clk_register(struct device *cpu_dev) in ve_spc_clk_register() argument
532 spc->cluster = topology_physical_package_id(cpu_dev->id); in ve_spc_clk_register()
536 init.name = dev_name(cpu_dev); in ve_spc_clk_register()
541 return devm_clk_register(cpu_dev, &spc->hw); in ve_spc_clk_register()
559 struct device *cpu_dev = get_cpu_device(cpu); in ve_spc_clk_init() local
560 if (!cpu_dev) { in ve_spc_clk_init()
[all …]
/linux-6.12.1/arch/powerpc/platforms/pseries/
Dpseries_energy.c303 struct device *cpu_dev, *dev_root; in pseries_energy_init() local
320 cpu_dev = get_cpu_device(cpu); in pseries_energy_init()
321 err = device_create_file(cpu_dev, in pseries_energy_init()
325 err = device_create_file(cpu_dev, in pseries_energy_init()
342 struct device *cpu_dev, *dev_root; in pseries_energy_cleanup() local
356 cpu_dev = get_cpu_device(cpu); in pseries_energy_cleanup()
357 sysfs_remove_file(&cpu_dev->kobj, in pseries_energy_cleanup()
359 sysfs_remove_file(&cpu_dev->kobj, in pseries_energy_cleanup()
/linux-6.12.1/drivers/clk/qcom/
Dapcs-sdx55.c52 struct device *cpu_dev; in qcom_apcs_sdx55_clk_probe() local
113 cpu_dev = get_cpu_device(0); in qcom_apcs_sdx55_clk_probe()
114 dev_pm_domain_attach(cpu_dev, true); in qcom_apcs_sdx55_clk_probe()
125 struct device *cpu_dev = get_cpu_device(0); in qcom_apcs_sdx55_clk_remove() local
129 dev_pm_domain_detach(cpu_dev, true); in qcom_apcs_sdx55_clk_remove()
/linux-6.12.1/drivers/of/
Dcpu.c142 struct device *cpu_dev; in of_cpu_device_node_get() local
143 cpu_dev = get_cpu_device(cpu); in of_cpu_device_node_get()
144 if (!cpu_dev) in of_cpu_device_node_get()
146 return of_node_get(cpu_dev->of_node); in of_cpu_device_node_get()
/linux-6.12.1/arch/x86/kernel/cpu/
Dintel_epb.c186 struct device *cpu_dev = get_cpu_device(cpu); in intel_epb_online() local
190 sysfs_merge_group(&cpu_dev->kobj, &intel_epb_attr_group); in intel_epb_online()
197 struct device *cpu_dev = get_cpu_device(cpu); in intel_epb_offline() local
200 sysfs_unmerge_group(&cpu_dev->kobj, &intel_epb_attr_group); in intel_epb_offline()

123