Commit b61e0703 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branch 'cpufreq-scpi'

* cpufreq-scpi:
  cpufreq: scpi: Fix incorrect arm_big_little config dependency
  cpufreq: scpi: invoke frequency-invariance setter function
parents 0373ca74 5c8b2623
...@@ -44,10 +44,10 @@ config ARM_DT_BL_CPUFREQ ...@@ -44,10 +44,10 @@ config ARM_DT_BL_CPUFREQ
config ARM_SCPI_CPUFREQ config ARM_SCPI_CPUFREQ
tristate "SCPI based CPUfreq driver" tristate "SCPI based CPUfreq driver"
depends on ARM_BIG_LITTLE_CPUFREQ && ARM_SCPI_PROTOCOL && COMMON_CLK_SCPI depends on ARM_SCPI_PROTOCOL && COMMON_CLK_SCPI
help help
This adds the CPUfreq driver support for ARM big.LITTLE platforms This adds the CPUfreq driver support for ARM platforms using SCPI
using SCPI protocol for CPU power management. protocol for CPU power management.
This driver uses SCPI Message Protocol driver to interact with the This driver uses SCPI Message Protocol driver to interact with the
firmware providing the CPU DVFS functionality. firmware providing the CPU DVFS functionality.
......
...@@ -51,15 +51,23 @@ static unsigned int scpi_cpufreq_get_rate(unsigned int cpu) ...@@ -51,15 +51,23 @@ static unsigned int scpi_cpufreq_get_rate(unsigned int cpu)
static int static int
scpi_cpufreq_set_target(struct cpufreq_policy *policy, unsigned int index) scpi_cpufreq_set_target(struct cpufreq_policy *policy, unsigned int index)
{ {
unsigned long freq = policy->freq_table[index].frequency;
struct scpi_data *priv = policy->driver_data; struct scpi_data *priv = policy->driver_data;
u64 rate = policy->freq_table[index].frequency * 1000; u64 rate = freq * 1000;
int ret; int ret;
ret = clk_set_rate(priv->clk, rate); ret = clk_set_rate(priv->clk, rate);
if (!ret && (clk_get_rate(priv->clk) != rate))
ret = -EIO;
return ret; if (ret)
return ret;
if (clk_get_rate(priv->clk) != rate)
return -EIO;
arch_set_freq_scale(policy->related_cpus, freq,
policy->cpuinfo.max_freq);
return 0;
} }
static int static int
......
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