/linux-6.1.9/drivers/cpufreq/ |
D | scpi-cpufreq.c | 25 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 …]
|
D | scmi-cpufreq.c | 27 struct device *cpu_dev; member 74 scmi_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask) in scmi_get_sharing_cpus() argument 79 domain = perf_ops->device_domain_id(cpu_dev); in scmi_get_sharing_cpus() 84 if (cpu == cpu_dev->id) in scmi_get_sharing_cpus() 100 scmi_get_cpu_power(struct device *cpu_dev, unsigned long *power, in scmi_get_cpu_power() argument 107 domain = perf_ops->device_domain_id(cpu_dev); in scmi_get_cpu_power() 131 struct device *cpu_dev; in scmi_cpufreq_init() local 135 cpu_dev = get_cpu_device(policy->cpu); in scmi_cpufreq_init() 136 if (!cpu_dev) { in scmi_cpufreq_init() 151 ret = scmi_get_sharing_cpus(cpu_dev, policy->cpus); in scmi_cpufreq_init() [all …]
|
D | imx6q-cpufreq.c | 50 static struct device *cpu_dev; variable 70 opp = dev_pm_opp_find_freq_ceil(cpu_dev, &freq_hz); in imx6q_set_target() 72 dev_err(cpu_dev, "failed to find OPP for %ld\n", freq_hz); in imx6q_set_target() 81 dev_dbg(cpu_dev, "%u MHz, %ld mV --> %u MHz, %ld mV\n", in imx6q_set_target() 90 dev_err(cpu_dev, "failed to scale vddpu up: %d\n", ret); in imx6q_set_target() 96 dev_err(cpu_dev, "failed to scale vddsoc up: %d\n", ret); in imx6q_set_target() 101 dev_err(cpu_dev, in imx6q_set_target() 159 dev_err(cpu_dev, "failed to set clock rate: %d\n", ret); in imx6q_set_target() 162 dev_warn(cpu_dev, in imx6q_set_target() 175 dev_warn(cpu_dev, in imx6q_set_target() [all …]
|
D | mediatek-cpufreq.c | 41 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 …]
|
D | cpufreq-dt.c | 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() [all …]
|
D | raspberrypi-cpufreq.c | 21 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 …]
|
D | armada-8k-cpufreq.c | 33 struct device *cpu_dev; member 44 struct device *cpu_dev; in armada_8k_get_sharing_cpus() local 47 cpu_dev = get_cpu_device(cpu); in armada_8k_get_sharing_cpus() 48 if (!cpu_dev) { in armada_8k_get_sharing_cpus() 53 clk = clk_get(cpu_dev, 0); in armada_8k_get_sharing_cpus() 65 static int __init armada_8k_add_opp(struct clk *clk, struct device *cpu_dev, in armada_8k_add_opp() argument 76 dev_err(cpu_dev, "Failed to get clock rate for this CPU\n"); in armada_8k_add_opp() 80 freq_tables[opps_index].cpu_dev = cpu_dev; in armada_8k_add_opp() 85 ret = dev_pm_opp_add(cpu_dev, freq, 0); in armada_8k_add_opp() 103 if (!freq_tables[opps_index].cpu_dev) in armada_8k_cpufreq_free_table() [all …]
|
D | qcom-cpufreq-nvmem.c | 50 int (*get_version)(struct device *cpu_dev, 65 static void get_krait_bin_format_a(struct device *cpu_dev, in get_krait_bin_format_a() argument 79 dev_warn(cpu_dev, "Speed bin: Defaulting to %d\n", *speed); in get_krait_bin_format_a() 81 dev_dbg(cpu_dev, "Speed bin: %d\n", *speed); in get_krait_bin_format_a() 90 dev_warn(cpu_dev, "PVS bin: Defaulting to %d\n", *pvs); in get_krait_bin_format_a() 92 dev_dbg(cpu_dev, "PVS bin: %d\n", *pvs); in get_krait_bin_format_a() 96 static void get_krait_bin_format_b(struct device *cpu_dev, in get_krait_bin_format_b() argument 124 dev_dbg(cpu_dev, "Speed bin: %d\n", *speed); in get_krait_bin_format_b() 126 dev_warn(cpu_dev, "Speed bin not set. Defaulting to 0!\n"); in get_krait_bin_format_b() 134 dev_dbg(cpu_dev, "PVS bin: %d\n", *pvs); in get_krait_bin_format_b() [all …]
|
D | mvebu-cpufreq.c | 60 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 …]
|
D | vexpress-spc-cpufreq.c | 280 static void _put_cluster_clk_and_freq_table(struct device *cpu_dev, in _put_cluster_clk_and_freq_table() argument 283 u32 cluster = raw_cpu_to_cluster(cpu_dev->id); in _put_cluster_clk_and_freq_table() 289 dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table[cluster]); in _put_cluster_clk_and_freq_table() 292 static void put_cluster_clk_and_freq_table(struct device *cpu_dev, in put_cluster_clk_and_freq_table() argument 295 u32 cluster = cpu_to_cluster(cpu_dev->id); in put_cluster_clk_and_freq_table() 302 return _put_cluster_clk_and_freq_table(cpu_dev, cpumask); in put_cluster_clk_and_freq_table() 317 static int _get_cluster_clk_and_freq_table(struct device *cpu_dev, in _get_cluster_clk_and_freq_table() argument 320 u32 cluster = raw_cpu_to_cluster(cpu_dev->id); in _get_cluster_clk_and_freq_table() 330 ret = dev_pm_opp_get_opp_count(cpu_dev) <= 0; in _get_cluster_clk_and_freq_table() 334 ret = dev_pm_opp_init_cpufreq_table(cpu_dev, &freq_table[cluster]); in _get_cluster_clk_and_freq_table() [all …]
|
D | qcom-cpufreq-hw.c | 88 static int qcom_cpufreq_update_opp(struct device *cpu_dev, in qcom_cpufreq_update_opp() argument 97 return dev_pm_opp_add(cpu_dev, freq_hz, volt); in qcom_cpufreq_update_opp() 99 ret = dev_pm_opp_adjust_voltage(cpu_dev, freq_hz, volt, volt, volt); in qcom_cpufreq_update_opp() 101 dev_err(cpu_dev, "Voltage update failed freq=%ld\n", freq_khz); in qcom_cpufreq_update_opp() 105 return dev_pm_opp_enable(cpu_dev, freq_hz); in qcom_cpufreq_update_opp() 194 static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev, in qcom_cpufreq_hw_read_lut() argument 210 ret = dev_pm_opp_of_add_table(cpu_dev); in qcom_cpufreq_hw_read_lut() 215 opp = dev_pm_opp_find_freq_ceil(cpu_dev, &rate); in qcom_cpufreq_hw_read_lut() 220 dev_pm_opp_disable(cpu_dev, rate); in qcom_cpufreq_hw_read_lut() 223 dev_err(cpu_dev, "Invalid opp table in device tree\n"); in qcom_cpufreq_hw_read_lut() [all …]
|
D | sun50i-cpufreq-nvmem.c | 37 struct device *cpu_dev; in sun50i_cpufreq_get_efuse() local 42 cpu_dev = get_cpu_device(0); in sun50i_cpufreq_get_efuse() 43 if (!cpu_dev) in sun50i_cpufreq_get_efuse() 46 np = dev_pm_opp_of_get_opp_desc_node(cpu_dev); in sun50i_cpufreq_get_efuse() 60 return dev_err_probe(cpu_dev, PTR_ERR(speedbin_nvmem), in sun50i_cpufreq_get_efuse() 106 struct device *cpu_dev = get_cpu_device(cpu); in sun50i_cpufreq_nvmem_probe() local 108 if (!cpu_dev) { in sun50i_cpufreq_nvmem_probe() 113 opp_tokens[cpu] = dev_pm_opp_set_prop_name(cpu_dev, name); in sun50i_cpufreq_nvmem_probe()
|
D | armada-37xx-cpufreq.c | 90 struct device *cpu_dev; member 411 struct device *cpu_dev; in armada37xx_cpufreq_driver_init() local 442 cpu_dev = get_cpu_device(0); in armada37xx_cpufreq_driver_init() 443 if (!cpu_dev) { in armada37xx_cpufreq_driver_init() 444 dev_err(cpu_dev, "Cannot get CPU\n"); in armada37xx_cpufreq_driver_init() 448 clk = clk_get(cpu_dev, NULL); in armada37xx_cpufreq_driver_init() 450 dev_err(cpu_dev, "Cannot get clock for CPU0\n"); in armada37xx_cpufreq_driver_init() 456 dev_err(cpu_dev, "Cannot get parent clock for CPU0\n"); in armada37xx_cpufreq_driver_init() 465 dev_err(cpu_dev, "Failed to get parent clock rate for CPU\n"); in armada37xx_cpufreq_driver_init() 495 ret = dev_pm_opp_add(cpu_dev, freq, u_volt); in armada37xx_cpufreq_driver_init() [all …]
|
D | ti-cpufreq.c | 59 struct device *cpu_dev; member 212 struct device *dev = opp_data->cpu_dev; in ti_cpufreq_get_efuse() 253 struct device *dev = opp_data->cpu_dev; in ti_cpufreq_get_rev() 283 struct device *dev = opp_data->cpu_dev; in ti_cpufreq_setup_syscon_register() 344 opp_data->cpu_dev = get_cpu_device(0); in ti_cpufreq_probe() 345 if (!opp_data->cpu_dev) { in ti_cpufreq_probe() 350 opp_data->opp_node = dev_pm_opp_of_get_opp_desc_node(opp_data->cpu_dev); in ti_cpufreq_probe() 352 dev_info(opp_data->cpu_dev, in ti_cpufreq_probe() 382 ret = dev_pm_opp_set_config(opp_data->cpu_dev, &config); in ti_cpufreq_probe() 384 dev_err(opp_data->cpu_dev, "Failed to set OPP config\n"); in ti_cpufreq_probe()
|
D | highbank-cpufreq.c | 61 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()
|
D | imx-cpufreq-dt.c | 34 static struct device *cpu_dev; variable 90 cpu_dev = get_cpu_device(0); in imx_cpufreq_dt_probe() 92 if (!of_find_property(cpu_dev->of_node, "cpu-supply", NULL)) 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()
|
D | tegra20-cpufreq.c | 48 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.1.9/drivers/opp/ |
D | cpu.c | 111 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.1.9/arch/arm/mach-versatile/ |
D | spc.c | 419 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.1.9/arch/powerpc/platforms/pseries/ |
D | pseries_energy.c | 303 struct device *cpu_dev; in pseries_energy_init() local 318 cpu_dev = get_cpu_device(cpu); in pseries_energy_init() 319 err = device_create_file(cpu_dev, in pseries_energy_init() 323 err = device_create_file(cpu_dev, in pseries_energy_init() 340 struct device *cpu_dev; in pseries_energy_cleanup() local 350 cpu_dev = get_cpu_device(cpu); in pseries_energy_cleanup() 351 sysfs_remove_file(&cpu_dev->kobj, in pseries_energy_cleanup() 353 sysfs_remove_file(&cpu_dev->kobj, in pseries_energy_cleanup()
|
/linux-6.1.9/drivers/clk/qcom/ |
D | apcs-sdx55.c | 52 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.1.9/include/linux/ |
D | of_device.h | 43 struct device *cpu_dev; in of_cpu_device_node_get() local 44 cpu_dev = get_cpu_device(cpu); in of_cpu_device_node_get() 45 if (!cpu_dev) in of_cpu_device_node_get() 47 return of_node_get(cpu_dev->of_node); in of_cpu_device_node_get()
|
/linux-6.1.9/kernel/power/ |
D | energy_model.c | 203 struct device *cpu_dev; in em_create_pd() local 234 cpu_dev = get_cpu_device(cpu); in em_create_pd() 235 cpu_dev->em_pd = pd; in em_create_pd() 307 struct device *cpu_dev; in em_cpu_get() local 309 cpu_dev = get_cpu_device(cpu); in em_cpu_get() 310 if (!cpu_dev) in em_cpu_get() 313 return em_pd_get(cpu_dev); in em_cpu_get()
|
/linux-6.1.9/arch/x86/kernel/cpu/ |
D | cpu.h | 6 struct cpu_dev { struct 40 static const struct cpu_dev *const __cpu_dev_##cpu_devX __used \ argument 44 extern const struct cpu_dev *const __x86_cpu_dev_start[],
|
D | intel_epb.c | 186 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()
|