diff options
author | Mikko Perttunen <mperttunen@nvidia.com> | 2021-09-15 11:55:16 +0300 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2021-10-04 12:31:36 +0530 |
commit | c2ace21f937a0c7a296d233b4441b99b66579bda (patch) | |
tree | dd1513bdcac5837479778bc8dc3b3aea7879754e /drivers/cpufreq/tegra186-cpufreq.c | |
parent | 6065a672679f0502ede024a03db82c03534a5e00 (diff) | |
download | linux-c2ace21f937a0c7a296d233b4441b99b66579bda.tar.gz linux-c2ace21f937a0c7a296d233b4441b99b66579bda.tar.bz2 linux-c2ace21f937a0c7a296d233b4441b99b66579bda.zip |
cpufreq: tegra186/tegra194: Handle errors in BPMP response
The return value from tegra_bpmp_transfer indicates the success or
failure of the IPC transaction with BPMP. If the transaction
succeeded, we also need to check the actual command's result code.
Add code to do this.
While at it, explicitly handle missing CPU clusters, which can
occur on floorswept chips. This worked before as well, but
possibly only by accident.
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq/tegra186-cpufreq.c')
-rw-r--r-- | drivers/cpufreq/tegra186-cpufreq.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/cpufreq/tegra186-cpufreq.c b/drivers/cpufreq/tegra186-cpufreq.c index 5d1943e787b0..6c88827f4e62 100644 --- a/drivers/cpufreq/tegra186-cpufreq.c +++ b/drivers/cpufreq/tegra186-cpufreq.c @@ -159,6 +159,10 @@ static struct cpufreq_frequency_table *init_vhint_table( table = ERR_PTR(err); goto free; } + if (msg.rx.ret) { + table = ERR_PTR(-EINVAL); + goto free; + } for (i = data->vfloor; i <= data->vceil; i++) { u16 ndiv = data->ndiv[i]; |