Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 7ad9eab

Browse files
committed
Merge tag 'cpufreq-arm-updates-6.11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/vireshk/pm
Merge ARM cpufreq updates for 6.11 from Viresh Kumar: "- cpufreq: Add Loongson-3 CPUFreq driver support (Huacai Chen). - Make exit() callback return void (Lizhe and Viresh Kumar). - Minor cleanups and fixes in several drivers (Bryan Brattlof, Javier Carrasco, Jagadeesh Kona, Jeff Johnson, Nícolas F. R. A. Prado, Primoz Fiser, Raphael Gallais-Pou, and Riwen Lu)." * tag 'cpufreq-arm-updates-6.11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: (21 commits) cpufreq: sti: fix build warning cpufreq: mediatek: Use dev_err_probe in every error path in probe cpufreq: Add Loongson-3 CPUFreq driver support cpufreq: Make cpufreq_driver->exit() return void cpufreq: pcc: Remove empty exit() callback cpufreq: loongson2: Remove empty exit() callback cpufreq: nforce2: Remove empty exit() callback cpufreq: sti: add missing MODULE_DEVICE_TABLE entry for stih418 cpufreq: ti: update OPP table for AM62Px SoCs cpufreq: ti: update OPP table for AM62Ax SoCs cpufreq: sun50i: add Allwinner H700 speed bin cpufreq/cppc: Don't compare desired_perf in target() OPP: ti: Fix ti_opp_supply_probe wrong return values cpufreq: ti-cpufreq: Handle deferred probe with dev_err_probe() cpufreq: dt-platdev: add missing MODULE_DESCRIPTION() macro cpufreq: longhaul: Fix kernel-doc param for longhaul_setstate cpufreq: qcom-nvmem: eliminate uses of of_node_put() cpufreq: qcom-nvmem: fix memory leaks in probe error paths cpufreq: scmi: Avoid overflow of target_freq in fast switch cpufreq: sun50i: replace of_node_put() with automatic cleanup handler ...
2 parents e23f41c + d992f88 commit 7ad9eab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+603
-183
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12967,6 +12967,7 @@ F: Documentation/arch/loongarch/
1296712967
F: Documentation/translations/zh_CN/arch/loongarch/
1296812968
F: arch/loongarch/
1296912969
F: drivers/*/*loongarch*
12970+
F: drivers/cpufreq/loongson3_cpufreq.c
1297012971

1297112972
LOONGSON GPIO DRIVER
1297212973
M: Yinbo Zhu <zhuyinbo@loongson.cn>

drivers/cpufreq/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,18 @@ config LOONGSON2_CPUFREQ
262262
If in doubt, say N.
263263
endif
264264

265+
if LOONGARCH
266+
config LOONGSON3_CPUFREQ
267+
tristate "Loongson3 CPUFreq Driver"
268+
help
269+
This option adds a CPUFreq driver for Loongson processors which
270+
support software configurable cpu frequency.
271+
272+
Loongson-3 family processors support this feature.
273+
274+
If in doubt, say N.
275+
endif
276+
265277
if SPARC64
266278
config SPARC_US3_CPUFREQ
267279
tristate "UltraSPARC-III CPU Frequency driver"

drivers/cpufreq/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ obj-$(CONFIG_POWERNV_CPUFREQ) += powernv-cpufreq.o
103103
# Other platform drivers
104104
obj-$(CONFIG_BMIPS_CPUFREQ) += bmips-cpufreq.o
105105
obj-$(CONFIG_LOONGSON2_CPUFREQ) += loongson2_cpufreq.o
106+
obj-$(CONFIG_LOONGSON3_CPUFREQ) += loongson3_cpufreq.o
106107
obj-$(CONFIG_SH_CPU_FREQ) += sh-cpufreq.o
107108
obj-$(CONFIG_SPARC_US2E_CPUFREQ) += sparc-us2e-cpufreq.o
108109
obj-$(CONFIG_SPARC_US3_CPUFREQ) += sparc-us3-cpufreq.o

drivers/cpufreq/acpi-cpufreq.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
904904
return result;
905905
}
906906

907-
static int acpi_cpufreq_cpu_exit(struct cpufreq_policy *policy)
907+
static void acpi_cpufreq_cpu_exit(struct cpufreq_policy *policy)
908908
{
909909
struct acpi_cpufreq_data *data = policy->driver_data;
910910

@@ -917,8 +917,6 @@ static int acpi_cpufreq_cpu_exit(struct cpufreq_policy *policy)
917917
free_cpumask_var(data->freqdomain_cpus);
918918
kfree(policy->freq_table);
919919
kfree(data);
920-
921-
return 0;
922920
}
923921

924922
static int acpi_cpufreq_resume(struct cpufreq_policy *policy)

drivers/cpufreq/amd-pstate.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,16 +1093,14 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
10931093
return ret;
10941094
}
10951095

1096-
static int amd_pstate_cpu_exit(struct cpufreq_policy *policy)
1096+
static void amd_pstate_cpu_exit(struct cpufreq_policy *policy)
10971097
{
10981098
struct amd_cpudata *cpudata = policy->driver_data;
10991099

11001100
freq_qos_remove_request(&cpudata->req[1]);
11011101
freq_qos_remove_request(&cpudata->req[0]);
11021102
policy->fast_switch_possible = false;
11031103
kfree(cpudata);
1104-
1105-
return 0;
11061104
}
11071105

11081106
static int amd_pstate_cpu_resume(struct cpufreq_policy *policy)
@@ -1545,7 +1543,7 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy)
15451543
return ret;
15461544
}
15471545

1548-
static int amd_pstate_epp_cpu_exit(struct cpufreq_policy *policy)
1546+
static void amd_pstate_epp_cpu_exit(struct cpufreq_policy *policy)
15491547
{
15501548
struct amd_cpudata *cpudata = policy->driver_data;
15511549

@@ -1555,7 +1553,6 @@ static int amd_pstate_epp_cpu_exit(struct cpufreq_policy *policy)
15551553
}
15561554

15571555
pr_debug("CPU %d exiting\n", policy->cpu);
1558-
return 0;
15591556
}
15601557

15611558
static void amd_pstate_epp_update_limit(struct cpufreq_policy *policy)

drivers/cpufreq/apple-soc-cpufreq.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,16 +305,14 @@ static int apple_soc_cpufreq_init(struct cpufreq_policy *policy)
305305
return ret;
306306
}
307307

308-
static int apple_soc_cpufreq_exit(struct cpufreq_policy *policy)
308+
static void apple_soc_cpufreq_exit(struct cpufreq_policy *policy)
309309
{
310310
struct apple_cpu_priv *priv = policy->driver_data;
311311

312312
dev_pm_opp_free_cpufreq_table(priv->cpu_dev, &policy->freq_table);
313313
dev_pm_opp_remove_all_dynamic(priv->cpu_dev);
314314
iounmap(priv->reg_base);
315315
kfree(priv);
316-
317-
return 0;
318316
}
319317

320318
static struct cpufreq_driver apple_soc_cpufreq_driver = {

drivers/cpufreq/bmips-cpufreq.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,9 @@ static int bmips_cpufreq_target_index(struct cpufreq_policy *policy,
121121
return 0;
122122
}
123123

124-
static int bmips_cpufreq_exit(struct cpufreq_policy *policy)
124+
static void bmips_cpufreq_exit(struct cpufreq_policy *policy)
125125
{
126126
kfree(policy->freq_table);
127-
128-
return 0;
129127
}
130128

131129
static int bmips_cpufreq_init(struct cpufreq_policy *policy)

drivers/cpufreq/cppc_cpufreq.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -291,15 +291,10 @@ static int cppc_cpufreq_set_target(struct cpufreq_policy *policy,
291291
struct cppc_cpudata *cpu_data = policy->driver_data;
292292
unsigned int cpu = policy->cpu;
293293
struct cpufreq_freqs freqs;
294-
u32 desired_perf;
295294
int ret = 0;
296295

297-
desired_perf = cppc_khz_to_perf(&cpu_data->perf_caps, target_freq);
298-
/* Return if it is exactly the same perf */
299-
if (desired_perf == cpu_data->perf_ctrls.desired_perf)
300-
return ret;
301-
302-
cpu_data->perf_ctrls.desired_perf = desired_perf;
296+
cpu_data->perf_ctrls.desired_perf =
297+
cppc_khz_to_perf(&cpu_data->perf_caps, target_freq);
303298
freqs.old = policy->cur;
304299
freqs.new = target_freq;
305300

@@ -688,7 +683,7 @@ static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy)
688683
return ret;
689684
}
690685

691-
static int cppc_cpufreq_cpu_exit(struct cpufreq_policy *policy)
686+
static void cppc_cpufreq_cpu_exit(struct cpufreq_policy *policy)
692687
{
693688
struct cppc_cpudata *cpu_data = policy->driver_data;
694689
struct cppc_perf_caps *caps = &cpu_data->perf_caps;
@@ -705,7 +700,6 @@ static int cppc_cpufreq_cpu_exit(struct cpufreq_policy *policy)
705700
caps->lowest_perf, cpu, ret);
706701

707702
cppc_cpufreq_put_cpu_data(policy);
708-
return 0;
709703
}
710704

711705
static inline u64 get_delta(u64 t1, u64 t0)

drivers/cpufreq/cpufreq-dt-platdev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,4 +233,5 @@ static int __init cpufreq_dt_platdev_init(void)
233233
sizeof(struct cpufreq_dt_platform_data)));
234234
}
235235
core_initcall(cpufreq_dt_platdev_init);
236+
MODULE_DESCRIPTION("Generic DT based cpufreq platdev driver");
236237
MODULE_LICENSE("GPL");

drivers/cpufreq/cpufreq-dt.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,9 @@ static int cpufreq_offline(struct cpufreq_policy *policy)
157157
return 0;
158158
}
159159

160-
static int cpufreq_exit(struct cpufreq_policy *policy)
160+
static void cpufreq_exit(struct cpufreq_policy *policy)
161161
{
162162
clk_put(policy->clk);
163-
return 0;
164163
}
165164

166165
static struct cpufreq_driver dt_cpufreq_driver = {

0 commit comments

Comments
 (0)