/openbmc/linux/drivers/cpufreq/ |
H A D | scpi-cpufreq.c | 25 struct device *cpu_dev; member 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() 116 ret = dev_pm_opp_get_opp_count(cpu_dev); in scpi_cpufreq_init() 135 priv->cpu_dev = cpu_dev; in scpi_cpufreq_init() 136 priv->clk = clk_get(cpu_dev, NULL); in scpi_cpufreq_init() 139 __func__, cpu_dev->id); in scpi_cpufreq_init() [all …]
|
H A D | scmi-cpufreq.c | 27 struct device *cpu_dev; member 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() 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() 177 nr_opp = dev_pm_opp_get_opp_count(cpu_dev); in scmi_cpufreq_init() 185 nr_opp = dev_pm_opp_get_opp_count(cpu_dev); in scmi_cpufreq_init() 211 priv->cpu_dev = cpu_dev; in scmi_cpufreq_init() [all …]
|
H A D | imx6q-cpufreq.c | 50 static struct device *cpu_dev; variable 101 dev_err(cpu_dev, in imx6q_set_target() 162 dev_warn(cpu_dev, in imx6q_set_target() 175 dev_warn(cpu_dev, in imx6q_set_target() 350 cpu_dev = get_cpu_device(0); in imx6q_cpufreq_probe() 351 if (!cpu_dev) { in imx6q_cpufreq_probe() 356 np = of_node_get(cpu_dev->of_node); in imx6q_cpufreq_probe() 372 arm_reg = regulator_get(cpu_dev, "arm"); in imx6q_cpufreq_probe() 388 ret = dev_pm_opp_of_add_table(cpu_dev); in imx6q_cpufreq_probe() 506 dev_pm_opp_of_remove_table(cpu_dev); in imx6q_cpufreq_probe() [all …]
|
H A 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() 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() 73 if (cpu_dev) in raspberrypi_cpufreq_remove() [all …]
|
H A D | cpufreq-dt.c | 31 struct device *cpu_dev; member 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() 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() 225 ret = dev_err_probe(cpu_dev, priv->opp_token, in dt_cpufreq_early_init() [all …]
|
H A D | armada-8k-cpufreq.c | 40 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, 0); in armada_8k_get_sharing_cpus() 87 freq_tables[opps_index].cpu_dev = cpu_dev; in armada_8k_add_opp() 110 if (!freq_tables[opps_index].cpu_dev) in armada_8k_cpufreq_free_table() 158 struct device *cpu_dev; in armada_8k_cpufreq_init() local 161 cpu_dev = get_cpu_device(cpu); in armada_8k_cpufreq_init() 163 if (!cpu_dev) { in armada_8k_cpufreq_init() [all …]
|
H A D | mediatek-cpufreq.c | 41 struct device *cpu_dev; member 89 dev_err(info->cpu_dev, in mtk_cpufreq_voltage_tracking() 207 struct device *cpu_dev = info->cpu_dev; in mtk_cpufreq_set_target() local 257 dev_err(cpu_dev, in mtk_cpufreq_set_target() 267 dev_err(cpu_dev, in mtk_cpufreq_set_target() 276 dev_err(cpu_dev, in mtk_cpufreq_set_target() 286 dev_err(cpu_dev, in mtk_cpufreq_set_target() 299 dev_err(cpu_dev, in mtk_cpufreq_set_target() 393 if (!cpu_dev) { in mtk_cpu_dvfs_info_init() 397 info->cpu_dev = cpu_dev; in mtk_cpu_dvfs_info_init() [all …]
|
H A D | qcom-cpufreq-nvmem.c | 36 int (*get_version)(struct device *cpu_dev, 71 dev_dbg(cpu_dev, "Speed bin: %d\n", *speed); in get_krait_bin_format_a() 82 dev_dbg(cpu_dev, "PVS bin: %d\n", *pvs); in get_krait_bin_format_a() 114 dev_dbg(cpu_dev, "Speed bin: %d\n", *speed); in get_krait_bin_format_b() 124 dev_dbg(cpu_dev, "PVS bin: %d\n", *pvs); in get_krait_bin_format_b() 229 struct device *cpu_dev; in qcom_cpufreq_probe() local 236 cpu_dev = get_cpu_device(0); in qcom_cpufreq_probe() 237 if (!cpu_dev) in qcom_cpufreq_probe() 272 ret = drv->data->get_version(cpu_dev, in qcom_cpufreq_probe() 288 cpu_dev = get_cpu_device(cpu); in qcom_cpufreq_probe() [all …]
|
H A 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 …]
|
H A D | apple-soc-cpufreq.c | 64 struct device *cpu_dev; member 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() 232 ret = dev_pm_opp_set_sharing_cpus(cpu_dev, policy->cpus); in apple_soc_cpufreq_init() 238 ret = dev_pm_opp_get_opp_count(cpu_dev); in apple_soc_cpufreq_init() 270 priv->cpu_dev = cpu_dev; in apple_soc_cpufreq_init() 298 dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); in apple_soc_cpufreq_init() 302 dev_pm_opp_remove_all_dynamic(cpu_dev); in apple_soc_cpufreq_init() [all …]
|
H A D | vexpress-spc-cpufreq.c | 294 u32 cluster = cpu_to_cluster(cpu_dev->id); in put_cluster_clk_and_freq_table() 329 ret = dev_pm_opp_get_opp_count(cpu_dev) <= 0; in _get_cluster_clk_and_freq_table() 337 clk[cluster] = clk_get(cpu_dev, NULL); in _get_cluster_clk_and_freq_table() 342 __func__, cpu_dev->id, cluster); in _get_cluster_clk_and_freq_table() 355 u32 cluster = cpu_to_cluster(cpu_dev->id); in get_cluster_clk_and_freq_table() 413 struct device *cpu_dev; in ve_spc_cpufreq_init() local 416 cpu_dev = get_cpu_device(policy->cpu); in ve_spc_cpufreq_init() 417 if (!cpu_dev) { in ve_spc_cpufreq_init() 452 struct device *cpu_dev; in ve_spc_cpufreq_exit() local 454 cpu_dev = get_cpu_device(policy->cpu); in ve_spc_cpufreq_exit() [all …]
|
H A D | qcom-cpufreq-hw.c | 109 return dev_pm_opp_enable(cpu_dev, freq_hz); in qcom_cpufreq_update_opp() 216 ret = dev_pm_opp_of_add_table(cpu_dev); in qcom_cpufreq_hw_read_lut() 226 dev_pm_opp_disable(cpu_dev, rate); in qcom_cpufreq_hw_read_lut() 517 struct device *cpu_dev; in qcom_cpufreq_hw_cpu_init() local 521 cpu_dev = get_cpu_device(policy->cpu); in qcom_cpufreq_hw_cpu_init() 522 if (!cpu_dev) { in qcom_cpufreq_hw_cpu_init() 561 ret = dev_pm_opp_get_opp_count(cpu_dev); in qcom_cpufreq_hw_cpu_init() 581 dev_pm_opp_remove_all_dynamic(cpu_dev); in qcom_cpufreq_hw_cpu_exit() 637 struct device *cpu_dev; in qcom_cpufreq_hw_driver_probe() local 658 cpu_dev = get_cpu_device(0); in qcom_cpufreq_hw_driver_probe() [all …]
|
H A D | sun50i-cpufreq-nvmem.c | 38 struct device *cpu_dev; in sun50i_cpufreq_get_efuse() local 43 cpu_dev = get_cpu_device(0); in sun50i_cpufreq_get_efuse() 44 if (!cpu_dev) in sun50i_cpufreq_get_efuse() 47 np = dev_pm_opp_of_get_opp_desc_node(cpu_dev); in sun50i_cpufreq_get_efuse() 61 return dev_err_probe(cpu_dev, PTR_ERR(speedbin_nvmem), in sun50i_cpufreq_get_efuse() 107 struct device *cpu_dev = get_cpu_device(cpu); in sun50i_cpufreq_nvmem_probe() local 109 if (!cpu_dev) { in sun50i_cpufreq_nvmem_probe() 114 opp_tokens[cpu] = dev_pm_opp_set_prop_name(cpu_dev, name); in sun50i_cpufreq_nvmem_probe()
|
H A D | armada-37xx-cpufreq.c | 88 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() 493 ret = dev_pm_opp_add(cpu_dev, freq, u_volt); in armada37xx_cpufreq_driver_init() 513 armada37xx_cpufreq_state->cpu_dev = cpu_dev; in armada37xx_cpufreq_driver_init() [all …]
|
H A 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()
|
H A D | tegra194-cpufreq.c | 404 struct device *cpu_dev; in tegra_cpufreq_init_cpufreq_table() local 410 cpu_dev = get_cpu_device(policy->cpu); in tegra_cpufreq_init_cpufreq_table() 411 if (!cpu_dev) { in tegra_cpufreq_init_cpufreq_table() 419 max_opps = dev_pm_opp_get_opp_count(cpu_dev); in tegra_cpufreq_init_cpufreq_table() 421 dev_err(cpu_dev, "Failed to add OPPs\n"); in tegra_cpufreq_init_cpufreq_table() 432 dev_pm_opp_disable(cpu_dev, rate); in tegra_cpufreq_init_cpufreq_table() 533 dev_pm_opp_remove_all_dynamic(cpu_dev); in tegra194_cpufreq_exit() 667 struct device *cpu_dev; in tegra194_cpufreq_probe() local 719 cpu_dev = get_cpu_device(0); in tegra194_cpufreq_probe() 720 if (!cpu_dev) { in tegra194_cpufreq_probe() [all …]
|
H A 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_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()
|
H A D | ti-cpufreq.c | 70 struct device *cpu_dev; member 253 struct device *dev = opp_data->cpu_dev; in ti_cpufreq_get_efuse() 294 struct device *dev = opp_data->cpu_dev; in ti_cpufreq_get_rev() 324 struct device *dev = opp_data->cpu_dev; in ti_cpufreq_setup_syscon_register() 387 opp_data->cpu_dev = get_cpu_device(0); in ti_cpufreq_probe() 388 if (!opp_data->cpu_dev) { in ti_cpufreq_probe() 393 opp_data->opp_node = dev_pm_opp_of_get_opp_desc_node(opp_data->cpu_dev); in ti_cpufreq_probe() 395 dev_info(opp_data->cpu_dev, in ti_cpufreq_probe() 425 ret = dev_pm_opp_set_config(opp_data->cpu_dev, &config); in ti_cpufreq_probe() 427 dev_err_probe(opp_data->cpu_dev, ret, "Failed to set OPP config\n"); in ti_cpufreq_probe()
|
H A 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()
|
/openbmc/linux/drivers/opp/ |
H A 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 …]
|
/openbmc/linux/arch/arm/mach-versatile/ |
H A 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() 434 dev_warn(cpu_dev, "failed to add opp %lu %lu\n", in ve_init_opp_table() 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() 564 clk = ve_spc_clk_register(cpu_dev); in ve_spc_clk_init() 578 if (ve_init_opp_table(cpu_dev)) in ve_spc_clk_init() 580 else if (dev_pm_opp_set_sharing_cpus(cpu_dev, in ve_spc_clk_init() [all …]
|
/openbmc/linux/arch/powerpc/platforms/pseries/ |
H A D | pseries_energy.c | 303 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()
|
/openbmc/linux/drivers/clk/qcom/ |
H A 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()
|
/openbmc/linux/drivers/of/ |
H A D | cpu.c | 142 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()
|
/openbmc/linux/kernel/power/ |
H A D | energy_model.c | 200 struct device *cpu_dev; in em_create_pd() local 231 cpu_dev = get_cpu_device(cpu); in em_create_pd() 232 cpu_dev->em_pd = pd; in em_create_pd() 304 struct device *cpu_dev; in em_cpu_get() local 306 cpu_dev = get_cpu_device(cpu); in em_cpu_get() 307 if (!cpu_dev) in em_cpu_get() 310 return em_pd_get(cpu_dev); in em_cpu_get()
|