Commit 19ea8a0d authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm

Pull ARM cpufreq updates for 5.16-rc1 from Viresh Kumar:

"- Fix tegra driver to handle BPMP errors properly (Mikko Perttunen).

 - Fix the parameter usage of the newly added perf-domain API (Hector
   Yuan).

 - Minor cleanups to cppc, vexpress and s3c244x drivers (Han Wang,
   Guenter Roeck, and Arnd Bergmann)."

* 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm:
  cpufreq: Fix parameter in parse_perf_domain()
  cpufreq: tegra186/tegra194: Handle errors in BPMP response
  cpufreq: remove useless INIT_LIST_HEAD()
  cpufreq: s3c244x: add fallthrough comments for switch
  cpufreq: vexpress: Drop unused variable
parents c72bcf0a 4a08e327
...@@ -741,8 +741,6 @@ static int __init cppc_cpufreq_init(void) ...@@ -741,8 +741,6 @@ static int __init cppc_cpufreq_init(void)
if ((acpi_disabled) || !acpi_cpc_valid()) if ((acpi_disabled) || !acpi_cpc_valid())
return -ENODEV; return -ENODEV;
INIT_LIST_HEAD(&cpu_data_list);
cppc_check_hisi_workaround(); cppc_check_hisi_workaround();
cppc_freq_invariance_init(); cppc_freq_invariance_init();
......
...@@ -173,12 +173,14 @@ static void s3c2440_cpufreq_setdivs(struct s3c_cpufreq_config *cfg) ...@@ -173,12 +173,14 @@ static void s3c2440_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
case 6: case 6:
camdiv |= S3C2440_CAMDIVN_HCLK3_HALF; camdiv |= S3C2440_CAMDIVN_HCLK3_HALF;
fallthrough;
case 3: case 3:
clkdiv |= S3C2440_CLKDIVN_HDIVN_3_6; clkdiv |= S3C2440_CLKDIVN_HDIVN_3_6;
break; break;
case 8: case 8:
camdiv |= S3C2440_CAMDIVN_HCLK4_HALF; camdiv |= S3C2440_CAMDIVN_HCLK4_HALF;
fallthrough;
case 4: case 4:
clkdiv |= S3C2440_CLKDIVN_HDIVN_4_8; clkdiv |= S3C2440_CLKDIVN_HDIVN_4_8;
break; break;
......
...@@ -159,6 +159,10 @@ static struct cpufreq_frequency_table *init_vhint_table( ...@@ -159,6 +159,10 @@ static struct cpufreq_frequency_table *init_vhint_table(
table = ERR_PTR(err); table = ERR_PTR(err);
goto free; goto free;
} }
if (msg.rx.ret) {
table = ERR_PTR(-EINVAL);
goto free;
}
for (i = data->vfloor; i <= data->vceil; i++) { for (i = data->vfloor; i <= data->vceil; i++) {
u16 ndiv = data->ndiv[i]; u16 ndiv = data->ndiv[i];
......
...@@ -242,7 +242,7 @@ static int tegra194_cpufreq_init(struct cpufreq_policy *policy) ...@@ -242,7 +242,7 @@ static int tegra194_cpufreq_init(struct cpufreq_policy *policy)
smp_call_function_single(policy->cpu, get_cpu_cluster, &cl, true); smp_call_function_single(policy->cpu, get_cpu_cluster, &cl, true);
if (cl >= data->num_clusters) if (cl >= data->num_clusters || !data->tables[cl])
return -EINVAL; return -EINVAL;
/* set same policy for all cpus in a cluster */ /* set same policy for all cpus in a cluster */
...@@ -310,6 +310,12 @@ init_freq_table(struct platform_device *pdev, struct tegra_bpmp *bpmp, ...@@ -310,6 +310,12 @@ init_freq_table(struct platform_device *pdev, struct tegra_bpmp *bpmp,
err = tegra_bpmp_transfer(bpmp, &msg); err = tegra_bpmp_transfer(bpmp, &msg);
if (err) if (err)
return ERR_PTR(err); return ERR_PTR(err);
if (msg.rx.ret == -BPMP_EINVAL) {
/* Cluster not available */
return NULL;
}
if (msg.rx.ret)
return ERR_PTR(-EINVAL);
/* /*
* Make sure frequency table step is a multiple of mdiv to match * Make sure frequency table step is a multiple of mdiv to match
......
...@@ -1041,7 +1041,7 @@ static inline int of_perf_domain_get_sharing_cpumask(int pcpu, const char *list_ ...@@ -1041,7 +1041,7 @@ static inline int of_perf_domain_get_sharing_cpumask(int pcpu, const char *list_
if (cpu == pcpu) if (cpu == pcpu)
continue; continue;
ret = parse_perf_domain(pcpu, list_name, cell_name); ret = parse_perf_domain(cpu, list_name, cell_name);
if (ret < 0) if (ret < 0)
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment