Commit a5c05b74 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'pm-4.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
 "These fix three issues in cpufreq drivers: one recent regression, one
  leftover Kconfig dependency and one old but "stable" material.

  Specifics:

   - Make the task scheduler load and utilization signals be
     frequency-invariant again after recent changes in the SCPI cpufreq
     driver (Dietmar Eggemann).

   - Drop an unnecessary leftover Kconfig dependency from the SCPI
     cpufreq driver (Sudeep Holla).

   - Fix the initialization of the s3c24xx cpufreq driver (Viresh
     Kumar)"

* tag 'pm-4.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpufreq: s3c24xx: Fix broken s3c_cpufreq_init()
  cpufreq: scpi: Fix incorrect arm_big_little config dependency
  cpufreq: scpi: invoke frequency-invariance setter function
parents 5d60e057 b61e0703
...@@ -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.
......
...@@ -351,7 +351,13 @@ struct clk *s3c_cpufreq_clk_get(struct device *dev, const char *name) ...@@ -351,7 +351,13 @@ struct clk *s3c_cpufreq_clk_get(struct device *dev, const char *name)
static int s3c_cpufreq_init(struct cpufreq_policy *policy) static int s3c_cpufreq_init(struct cpufreq_policy *policy)
{ {
policy->clk = clk_arm; policy->clk = clk_arm;
return cpufreq_generic_init(policy, ftab, cpu_cur.info->latency);
policy->cpuinfo.transition_latency = cpu_cur.info->latency;
if (ftab)
return cpufreq_table_validate_and_show(policy, ftab);
return 0;
} }
static int __init s3c_cpufreq_initclks(void) static int __init s3c_cpufreq_initclks(void)
......
...@@ -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