2013-08-14 13:32:44

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 00/37] CPUFreq: set policy->cur in cpufreq core instead of

Almost all drivers set policy->cur with current cpu frequency in their ->init()
part. This can be done for all of them at core level and so they wouldn't need
to do it.

This patchset adds supporting code in cpufreq core for calling get() after we have
called init() for a policy. Also fixes all drivers accordingly.

These drivers were still doing some stuff which isn't required and was done by
core already. And that is cleaned as well.

This is Fourth part of my cleanup work for CPUFreq, first three are (And
obviously its rebased over them):

1: cpufreq: Introduce cpufreq_table_validate_and_show()
https://lkml.org/lkml/2013/8/8/263

2: cpufreq: define generic routines for cpufreq drivers
https://lkml.org/lkml/2013/8/10/48

3. CPUFreq: Implement light weight ->target(): for 3.13
https://lkml.org/lkml/2013/8/13/349

All these are pushed here:
https://git.linaro.org/gitweb?p=people/vireshk/linux.git;a=shortlog;h=refs/heads/for-v3.13

--
viresh

Cc: Andrew Lunn <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Dmitry Eremin-Solenikov <[email protected]>
Cc: Eric Miao <[email protected]>
Cc: Hans-Christian Egtvedt <[email protected]>
Cc: Jesper Nilsson <[email protected]>
Cc: John Crispin <[email protected]>
Cc: Kukjin Kim <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Mikael Starvik <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: Russell King <[email protected]>
Cc: Santosh Shilimkar <[email protected]>
Cc: Sekhar Nori <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: [email protected]
Cc: Stephen Warren <[email protected]>
Cc: Steven Miao <[email protected]>
Cc: Tony Luck <[email protected]>

Viresh Kumar (37):
cpufreq: call cpufreq_driver->get() after calling ->init()
cpufreq: acpi: don't initialize part of policy that is set by core
too
cpufreq: arm_big_little: don't initialize part of policy that is set
by core too
cpufreq: at32ap: don't initialize part of policy that is set by core
too
cpufreq: blackfin: don't initialize part of policy that is set by
core too
cpufreq: cpu0: don't initialize part of policy that is set by core
too
cpufreq: nforce2: don't initialize part of policy that is set by core
too
cpufreq: cris: don't initialize part of policy that is set by core
too
cpufreq: davinci: don't initialize part of policy that is set by core
too
cpufreq: dbx500: don't initialize part of policy that is set by core
too
cpufreq: e_powersaver: don't initialize part of policy that is set by
core too
cpufreq: elanfreq: don't initialize part of policy that is set by
core too
cpufreq: exynos: don't initialize part of policy that is set by core
too
cpufreq: gx: don't initialize part of policy that is set by core too
cpufreq: ia64-acpi: don't initialize part of policy that is set by
core too
cpufreq: imx6q: don't initialize part of policy that is set by core
too
cpufreq: integrator: don't initialize part of policy that is set by
core too
cpufreq: kirkwood: don't initialize part of policy that is set by
core too
cpufreq: longhaul: don't initialize part of policy that is set by
core too
cpufreq: loongson2: don't initialize part of policy that is set by
core too
cpufreq: maple: don't initialize part of policy that is set by core
too
cpufreq: omap: don't initialize part of policy that is set by core
too
cpufreq: p4: don't initialize part of policy that is set by core too
cpufreq: pcc: don't initialize part of policy that is set by core too
cpufreq: pmac: don't initialize part of policy that is set by core
too
cpufreq: powernow: don't initialize part of policy that is set by
core too
cpufreq: ppc: don't initialize part of policy that is set by core too
cpufreq: pxa: don't initialize part of policy that is set by core too
cpufreq: s3c: don't initialize part of policy that is set by core too
cpufreq: s5pv210: don't initialize part of policy that is set by core
too
cpufreq: sa11x0: don't initialize part of policy that is set by core
too
cpufreq: sc520_freq: don't initialize part of policy that is set by
core too
cpufreq: sh: don't initialize part of policy that is set by core too
cpufreq: spear: don't initialize part of policy that is set by core
too
cpufreq: speedstep: don't initialize part of policy that is set by
core too
cpufreq: tegra: don't initialize part of policy that is set by core
too
cpufreq: unicore2: don't initialize part of policy that is set by
core too

drivers/cpufreq/acpi-cpufreq.c | 1 -
drivers/cpufreq/arm_big_little.c | 2 --
drivers/cpufreq/at32ap-cpufreq.c | 12 ++++--------
drivers/cpufreq/blackfin-cpufreq.c | 1 -
drivers/cpufreq/cpufreq-cpu0.c | 1 -
drivers/cpufreq/cpufreq-nforce2.c | 1 -
drivers/cpufreq/cpufreq.c | 11 +++++++++++
drivers/cpufreq/cris-artpec3-cpufreq.c | 1 -
drivers/cpufreq/cris-etraxfs-cpufreq.c | 1 -
drivers/cpufreq/davinci-cpufreq.c | 2 --
drivers/cpufreq/dbx500-cpufreq.c | 5 -----
drivers/cpufreq/e_powersaver.c | 1 -
drivers/cpufreq/elanfreq.c | 1 -
drivers/cpufreq/exynos-cpufreq.c | 2 --
drivers/cpufreq/exynos5440-cpufreq.c | 1 -
drivers/cpufreq/gx-suspmod.c | 5 +----
drivers/cpufreq/ia64-acpi-cpufreq.c | 1 -
drivers/cpufreq/imx6q-cpufreq.c | 1 -
drivers/cpufreq/integrator-cpufreq.c | 5 ++---
drivers/cpufreq/kirkwood-cpufreq.c | 1 -
drivers/cpufreq/longhaul.c | 1 -
drivers/cpufreq/loongson2_cpufreq.c | 2 --
drivers/cpufreq/maple-cpufreq.c | 1 -
drivers/cpufreq/omap-cpufreq.c | 4 ----
drivers/cpufreq/p4-clockmod.c | 1 -
drivers/cpufreq/pcc-cpufreq.c | 7 -------
drivers/cpufreq/pmac32-cpufreq.c | 1 -
drivers/cpufreq/pmac64-cpufreq.c | 1 -
drivers/cpufreq/powernow-k6.c | 1 -
drivers/cpufreq/powernow-k7.c | 2 --
drivers/cpufreq/powernow-k8.c | 3 ---
drivers/cpufreq/ppc-corenet-cpufreq.c | 2 --
drivers/cpufreq/pxa2xx-cpufreq.c | 2 --
drivers/cpufreq/pxa3xx-cpufreq.c | 7 +++----
drivers/cpufreq/s3c2416-cpufreq.c | 2 --
drivers/cpufreq/s3c24xx-cpufreq.c | 5 -----
drivers/cpufreq/s3c64xx-cpufreq.c | 2 --
drivers/cpufreq/s5pv210-cpufreq.c | 2 --
drivers/cpufreq/sa1100-cpufreq.c | 1 -
drivers/cpufreq/sa1110-cpufreq.c | 1 -
drivers/cpufreq/sc520_freq.c | 1 -
drivers/cpufreq/sh-cpufreq.c | 2 --
drivers/cpufreq/spear-cpufreq.c | 2 --
drivers/cpufreq/speedstep-centrino.c | 5 -----
drivers/cpufreq/speedstep-ich.c | 15 +--------------
drivers/cpufreq/speedstep-smi.c | 13 -------------
drivers/cpufreq/tegra-cpufreq.c | 3 +--
drivers/cpufreq/unicore2-cpufreq.c | 1 -
48 files changed, 23 insertions(+), 123 deletions(-)

--
1.7.12.rc2.18.g61b472e


2013-08-14 13:33:02

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 01/37] cpufreq: call cpufreq_driver->get() after calling ->init()

Almost all drivers set policy->cur with current cpu frequency in their ->init()
part. This can be done for all of them at core level and so they wouldn't need
to do it.

This patch adds supporting code in cpufreq core for calling get() after we have
called init() for a policy.

Cc: Andrew Lunn <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Dmitry Eremin-Solenikov <[email protected]>
Cc: Eric Miao <[email protected]>
Cc: Hans-Christian Egtvedt <[email protected]>
Cc: Jesper Nilsson <[email protected]>
Cc: John Crispin <[email protected]>
Cc: Kukjin Kim <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Mikael Starvik <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: Russell King <[email protected]>
Cc: Santosh Shilimkar <[email protected]>
Cc: Sekhar Nori <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: [email protected]
Cc: Stephen Warren <[email protected]>
Cc: Steven Miao <[email protected]>
Cc: Tony Luck <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/cpufreq.c | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 4d37306..a7a1d3e 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1038,6 +1038,14 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif,
goto err_set_policy_cpu;
}

+ if (cpufreq_driver->get) {
+ policy->cur = cpufreq_driver->get(policy->cpu);
+ if (!policy->cur) {
+ pr_err("%s: ->get() failed\n", __func__);
+ goto err_get_freq;
+ }
+ }
+
/* related cpus should atleast have policy->cpus */
cpumask_or(policy->related_cpus, policy->related_cpus, policy->cpus);

@@ -1097,6 +1105,9 @@ err_out_unregister:
}
write_unlock_irqrestore(&cpufreq_driver_lock, flags);

+err_get_freq:
+ if (cpufreq_driver->exit)
+ cpufreq_driver->exit(policy);
err_set_policy_cpu:
per_cpu(cpufreq_policy_cpu, cpu) = -1;
cpufreq_policy_free(policy);
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:33:08

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 02/37] cpufreq: acpi: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/acpi-cpufreq.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index 324e061..7536e7d 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -833,7 +833,6 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
break;
case ACPI_ADR_SPACE_FIXED_HARDWARE:
acpi_cpufreq_driver.get = get_cur_freq_on_cpu;
- policy->cur = get_cur_freq_on_cpu(cpu);
break;
default:
break;
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:33:14

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 03/37] cpufreq: arm_big_little: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/arm_big_little.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c
index 4bba5ad..daf4423 100644
--- a/drivers/cpufreq/arm_big_little.c
+++ b/drivers/cpufreq/arm_big_little.c
@@ -164,8 +164,6 @@ static int bL_cpufreq_init(struct cpufreq_policy *policy)
else
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;

- policy->cur = bL_cpufreq_get(policy->cpu);
-
cpumask_copy(policy->cpus, topology_core_cpumask(policy->cpu));

dev_info(cpu_dev, "%s: CPU %d initialized\n", __func__, policy->cpu);
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:33:26

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 05/37] cpufreq: blackfin: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Steven Miao <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/blackfin-cpufreq.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/blackfin-cpufreq.c b/drivers/cpufreq/blackfin-cpufreq.c
index b343c7b..12528b2 100644
--- a/drivers/cpufreq/blackfin-cpufreq.c
+++ b/drivers/cpufreq/blackfin-cpufreq.c
@@ -195,7 +195,6 @@ static int __bfin_cpu_init(struct cpufreq_policy *policy)

policy->cpuinfo.transition_latency = 50000; /* 50us assumed */

- policy->cur = cclk;
return cpufreq_table_validate_and_show(policy, bfin_freq_table);
}

--
1.7.12.rc2.18.g61b472e

2013-08-14 13:33:19

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 04/37] cpufreq: at32ap: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Hans-Christian Egtvedt <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/at32ap-cpufreq.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/cpufreq/at32ap-cpufreq.c b/drivers/cpufreq/at32ap-cpufreq.c
index bae6ed8..81d0752 100644
--- a/drivers/cpufreq/at32ap-cpufreq.c
+++ b/drivers/cpufreq/at32ap-cpufreq.c
@@ -64,7 +64,7 @@ static int at32_set_target(struct cpufreq_policy *policy, unsigned int index)

static int __init at32_cpufreq_driver_init(struct cpufreq_policy *policy)
{
- unsigned int frequency, rate;
+ unsigned int frequency, rate, min_freq;
int retval, steps, i;

if (policy->cpu != 0)
@@ -77,12 +77,9 @@ static int __init at32_cpufreq_driver_init(struct cpufreq_policy *policy)
goto out_err;
}

- policy->cpuinfo.min_freq = (clk_round_rate(cpuclk, 1) + 500) / 1000;
- policy->cpuinfo.max_freq = (clk_round_rate(cpuclk, ~0UL) + 500) / 1000;
+ min_freq = (clk_round_rate(cpuclk, 1) + 500) / 1000;
+ frequency = (clk_round_rate(cpuclk, ~0UL) + 500) / 1000;
policy->cpuinfo.transition_latency = 0;
- policy->cur = at32_get_speed(0);
- policy->min = policy->cpuinfo.min_freq;
- policy->max = policy->cpuinfo.max_freq;

/*
* AVR32 CPU frequency rate scales in power of two between maximum and
@@ -91,7 +88,7 @@ static int __init at32_cpufreq_driver_init(struct cpufreq_policy *policy)
* Further validate that the frequency is usable, and append it to the
* frequency table.
*/
- steps = fls(policy->cpuinfo.max_freq / policy->cpuinfo.min_freq) + 1;
+ steps = fls(frequency / min_freq) + 1;
freq_table = kzalloc(steps * sizeof(struct cpufreq_frequency_table),
GFP_KERNEL);
if (!freq_table) {
@@ -99,7 +96,6 @@ static int __init at32_cpufreq_driver_init(struct cpufreq_policy *policy)
goto out_err_put_clk;
}

- frequency = policy->cpuinfo.max_freq;
for (i = 0; i < (steps - 1); i++) {
rate = clk_round_rate(cpuclk, frequency * 1000) / 1000;

--
1.7.12.rc2.18.g61b472e

2013-08-14 13:33:34

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 06/37] cpufreq: cpu0: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Shawn Guo <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/cpufreq-cpu0.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
index 000da22..4014925 100644
--- a/drivers/cpufreq/cpufreq-cpu0.c
+++ b/drivers/cpufreq/cpufreq-cpu0.c
@@ -117,7 +117,6 @@ static int cpu0_cpufreq_init(struct cpufreq_policy *policy)
}

policy->cpuinfo.transition_latency = transition_latency;
- policy->cur = clk_get_rate(cpu_clk) / 1000;

/*
* The driver only supports the SMP configuartion where all processors
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:33:47

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 08/37] cpufreq: cris: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Jesper Nilsson <[email protected]>
Cc: Mikael Starvik <[email protected]>
Cc: [email protected]
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/cris-artpec3-cpufreq.c | 1 -
drivers/cpufreq/cris-etraxfs-cpufreq.c | 1 -
2 files changed, 2 deletions(-)

diff --git a/drivers/cpufreq/cris-artpec3-cpufreq.c b/drivers/cpufreq/cris-artpec3-cpufreq.c
index 1488277..dace19d 100644
--- a/drivers/cpufreq/cris-artpec3-cpufreq.c
+++ b/drivers/cpufreq/cris-artpec3-cpufreq.c
@@ -59,7 +59,6 @@ static int cris_freq_cpu_init(struct cpufreq_policy *policy)
{
/* cpuinfo and default policy values */
policy->cpuinfo.transition_latency = 1000000; /* 1ms */
- policy->cur = cris_freq_get_cpu_frequency(0);

return cpufreq_table_validate_and_show(policy, cris_freq_table);
}
diff --git a/drivers/cpufreq/cris-etraxfs-cpufreq.c b/drivers/cpufreq/cris-etraxfs-cpufreq.c
index 4e3e9c7..4d40d9df 100644
--- a/drivers/cpufreq/cris-etraxfs-cpufreq.c
+++ b/drivers/cpufreq/cris-etraxfs-cpufreq.c
@@ -59,7 +59,6 @@ static int cris_freq_cpu_init(struct cpufreq_policy *policy)
{
/* cpuinfo and default policy values */
policy->cpuinfo.transition_latency = 1000000; /* 1ms */
- policy->cur = cris_freq_get_cpu_frequency(0);

return cpufreq_table_validate_and_show(policy, cris_freq_table);
}
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:33:39

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 07/37] cpufreq: nforce2: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/cpufreq-nforce2.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/cpufreq-nforce2.c b/drivers/cpufreq/cpufreq-nforce2.c
index b83d45f..ef70de2 100644
--- a/drivers/cpufreq/cpufreq-nforce2.c
+++ b/drivers/cpufreq/cpufreq-nforce2.c
@@ -362,7 +362,6 @@ static int nforce2_cpu_init(struct cpufreq_policy *policy)
policy->min = policy->cpuinfo.min_freq = min_fsb * fid * 100;
policy->max = policy->cpuinfo.max_freq = max_fsb * fid * 100;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
- policy->cur = nforce2_get(policy->cpu);

return 0;
}
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:33:56

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 09/37] cpufreq: davinci: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Sekhar Nori <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/davinci-cpufreq.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/cpufreq/davinci-cpufreq.c b/drivers/cpufreq/davinci-cpufreq.c
index 822100b..07ea6c0 100644
--- a/drivers/cpufreq/davinci-cpufreq.c
+++ b/drivers/cpufreq/davinci-cpufreq.c
@@ -128,8 +128,6 @@ static int davinci_cpu_init(struct cpufreq_policy *policy)
return result;
}

- policy->cur = davinci_getspeed(0);
-
result = cpufreq_table_validate_and_show(policy, freq_table);
if (result) {
pr_err("%s: cpufreq_table_validate_and_show() failed",
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:34:03

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 10/37] cpufreq: dbx500: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Linus Walleij <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/dbx500-cpufreq.c | 5 -----
1 file changed, 5 deletions(-)

diff --git a/drivers/cpufreq/dbx500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c
index 28deaf0..d6d6b8c 100644
--- a/drivers/cpufreq/dbx500-cpufreq.c
+++ b/drivers/cpufreq/dbx500-cpufreq.c
@@ -73,11 +73,6 @@ static int dbx500_cpufreq_init(struct cpufreq_policy *policy)
return res;
}

- policy->min = policy->cpuinfo.min_freq;
- policy->max = policy->cpuinfo.max_freq;
- policy->cur = dbx500_cpufreq_getspeed(policy->cpu);
- policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
-
/*
* FIXME : Need to take time measurement across the target()
* function with no/some/all drivers in the notification
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:34:23

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 11/37] cpufreq: e_powersaver: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/e_powersaver.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c
index 60cd576..b39c4ef 100644
--- a/drivers/cpufreq/e_powersaver.c
+++ b/drivers/cpufreq/e_powersaver.c
@@ -384,7 +384,6 @@ static int eps_cpu_init(struct cpufreq_policy *policy)
}

policy->cpuinfo.transition_latency = 140000; /* 844mV -> 700mV in ns */
- policy->cur = fsb * current_multiplier;

ret = cpufreq_table_validate_and_show(policy, &centaur->freq_table[0]);
if (ret) {
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:34:31

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 12/37] cpufreq: elanfreq: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/elanfreq.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/elanfreq.c b/drivers/cpufreq/elanfreq.c
index 0d133a7..4ab4153 100644
--- a/drivers/cpufreq/elanfreq.c
+++ b/drivers/cpufreq/elanfreq.c
@@ -179,7 +179,6 @@ static int elanfreq_cpu_init(struct cpufreq_policy *policy)

/* cpuinfo and default policy values */
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
- policy->cur = elanfreq_get_cpu_frequency(0);

return cpufreq_table_validate_and_show(policy, elanfreq_table);
}
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:34:44

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 14/37] cpufreq: gx: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/gx-suspmod.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/cpufreq/gx-suspmod.c b/drivers/cpufreq/gx-suspmod.c
index 70442c7..d83e826 100644
--- a/drivers/cpufreq/gx-suspmod.c
+++ b/drivers/cpufreq/gx-suspmod.c
@@ -401,7 +401,7 @@ static int cpufreq_gx_target(struct cpufreq_policy *policy,

static int cpufreq_gx_cpu_init(struct cpufreq_policy *policy)
{
- unsigned int maxfreq, curfreq;
+ unsigned int maxfreq;

if (!policy || policy->cpu != 0)
return -ENODEV;
@@ -415,10 +415,8 @@ static int cpufreq_gx_cpu_init(struct cpufreq_policy *policy)
maxfreq = 30000 * gx_freq_mult[getCx86(CX86_DIR1) & 0x0f];

stock_freq = maxfreq;
- curfreq = gx_get_cpuspeed(0);

pr_debug("cpu max frequency is %d.\n", maxfreq);
- pr_debug("cpu current frequency is %dkHz.\n", curfreq);

/* setup basic struct for cpufreq API */
policy->cpu = 0;
@@ -428,7 +426,6 @@ static int cpufreq_gx_cpu_init(struct cpufreq_policy *policy)
else
policy->min = maxfreq / POLICY_MIN_DIV;
policy->max = maxfreq;
- policy->cur = curfreq;
policy->cpuinfo.min_freq = maxfreq / max_duration;
policy->cpuinfo.max_freq = maxfreq;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:34:38

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 13/37] cpufreq: exynos: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Kukjin Kim <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/exynos-cpufreq.c | 2 --
drivers/cpufreq/exynos5440-cpufreq.c | 1 -
2 files changed, 3 deletions(-)

diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c
index 79b869b..b1db082 100644
--- a/drivers/cpufreq/exynos-cpufreq.c
+++ b/drivers/cpufreq/exynos-cpufreq.c
@@ -226,8 +226,6 @@ static struct notifier_block exynos_cpufreq_nb = {

static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy)
{
- policy->cur = policy->min = policy->max = exynos_getspeed(policy->cpu);
-
/* set the transition latency value */
policy->cpuinfo.transition_latency = 100000;

diff --git a/drivers/cpufreq/exynos5440-cpufreq.c b/drivers/cpufreq/exynos5440-cpufreq.c
index 9a5ed485..91a64d6 100644
--- a/drivers/cpufreq/exynos5440-cpufreq.c
+++ b/drivers/cpufreq/exynos5440-cpufreq.c
@@ -316,7 +316,6 @@ static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy)
return ret;
}

- policy->cur = dvfs_info->cur_frequency;
policy->cpuinfo.transition_latency = dvfs_info->latency;
cpumask_setall(policy->cpus);

--
1.7.12.rc2.18.g61b472e

2013-08-14 13:34:51

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 15/37] cpufreq: ia64-acpi: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Tony Luck <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/ia64-acpi-cpufreq.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/ia64-acpi-cpufreq.c b/drivers/cpufreq/ia64-acpi-cpufreq.c
index 371c63d..4695fa2 100644
--- a/drivers/cpufreq/ia64-acpi-cpufreq.c
+++ b/drivers/cpufreq/ia64-acpi-cpufreq.c
@@ -290,7 +290,6 @@ acpi_cpufreq_cpu_init (
data->acpi_data.states[i].transition_latency * 1000;
}
}
- policy->cur = processor_get_freq(data, policy->cpu);

/* table init */
for (i = 0; i <= data->acpi_data.state_count; i++)
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:34:58

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 16/37] cpufreq: imx6q: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Shawn Guo <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/imx6q-cpufreq.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
index f6f877c..04a32fb 100644
--- a/drivers/cpufreq/imx6q-cpufreq.c
+++ b/drivers/cpufreq/imx6q-cpufreq.c
@@ -166,7 +166,6 @@ static int imx6q_cpufreq_init(struct cpufreq_policy *policy)
}

policy->cpuinfo.transition_latency = transition_latency;
- policy->cur = clk_get_rate(arm_clk) / 1000;
cpumask_setall(policy->cpus);

return 0;
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:35:13

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 18/37] cpufreq: kirkwood: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Andrew Lunn <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/kirkwood-cpufreq.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/kirkwood-cpufreq.c b/drivers/cpufreq/kirkwood-cpufreq.c
index d0d107a..c3d6987 100644
--- a/drivers/cpufreq/kirkwood-cpufreq.c
+++ b/drivers/cpufreq/kirkwood-cpufreq.c
@@ -109,7 +109,6 @@ static int kirkwood_cpufreq_cpu_init(struct cpufreq_policy *policy)
{
/* cpuinfo and default policy values */
policy->cpuinfo.transition_latency = 5000; /* 5uS */
- policy->cur = kirkwood_cpufreq_get_cpu_frequency(0);

return cpufreq_table_validate_and_show(policy, kirkwood_freq_table);
}
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:35:18

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 19/37] cpufreq: longhaul: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/longhaul.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c
index e566776..45bafdd 100644
--- a/drivers/cpufreq/longhaul.c
+++ b/drivers/cpufreq/longhaul.c
@@ -904,7 +904,6 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy)
longhaul_setup_voltagescaling();

policy->cpuinfo.transition_latency = 200000; /* nsec */
- policy->cur = calc_speed(longhaul_get_cpu_mult());

return cpufreq_table_validate_and_show(policy, longhaul_table);
}
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:35:27

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 20/37] cpufreq: loongson2: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: John Crispin <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/loongson2_cpufreq.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/cpufreq/loongson2_cpufreq.c b/drivers/cpufreq/loongson2_cpufreq.c
index 009c29c..c33347c 100644
--- a/drivers/cpufreq/loongson2_cpufreq.c
+++ b/drivers/cpufreq/loongson2_cpufreq.c
@@ -120,8 +120,6 @@ static int loongson2_cpufreq_cpu_init(struct cpufreq_policy *policy)
return ret;
}

- policy->cur = loongson2_cpufreq_get(policy->cpu);
-
return cpufreq_table_validate_and_show(policy,
&loongson2_clockmod_table[0]);
}
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:35:40

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 22/37] cpufreq: omap: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Santosh Shilimkar <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/omap-cpufreq.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c
index 69bf7d8..92d45e6 100644
--- a/drivers/cpufreq/omap-cpufreq.c
+++ b/drivers/cpufreq/omap-cpufreq.c
@@ -146,8 +146,6 @@ static int omap_cpu_init(struct cpufreq_policy *policy)
goto fail_ck;
}

- policy->cur = omap_getspeed(policy->cpu);
-
if (!freq_table)
result = opp_init_cpufreq_table(mpu_dev, &freq_table);

@@ -163,8 +161,6 @@ static int omap_cpu_init(struct cpufreq_policy *policy)
if (result)
goto fail_table;

- policy->cur = omap_getspeed(policy->cpu);
-
/*
* On OMAP SMP configuartion, both processors share the voltage
* and clock. So both CPUs needs to be scaled together and hence
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:35:33

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 21/37] cpufreq: maple: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Dmitry Eremin-Solenikov <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/maple-cpufreq.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/maple-cpufreq.c b/drivers/cpufreq/maple-cpufreq.c
index 1c24219..b508147 100644
--- a/drivers/cpufreq/maple-cpufreq.c
+++ b/drivers/cpufreq/maple-cpufreq.c
@@ -158,7 +158,6 @@ static unsigned int maple_cpufreq_get_speed(unsigned int cpu)
static int maple_cpufreq_cpu_init(struct cpufreq_policy *policy)
{
policy->cpuinfo.transition_latency = 12000;
- policy->cur = maple_cpu_freqs[maple_scom_query_freq()].frequency;
/* secondary CPUs are tied to the primary one by the
* cpufreq core if in the secondary policy we tell it that
* it actually must be one policy together with all others. */
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:35:48

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 23/37] cpufreq: p4: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: David S. Miller <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/p4-clockmod.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/p4-clockmod.c b/drivers/cpufreq/p4-clockmod.c
index 5a6263e..3c23053 100644
--- a/drivers/cpufreq/p4-clockmod.c
+++ b/drivers/cpufreq/p4-clockmod.c
@@ -220,7 +220,6 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)
/* the transition latency is set to be 1 higher than the maximum
* transition latency of the ondemand governor */
policy->cpuinfo.transition_latency = 10000001;
- policy->cur = stock_freq;

return cpufreq_table_validate_and_show(policy, &p4clockmod_table[0]);
}
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:36:00

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 25/37] cpufreq: pmac: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/pmac32-cpufreq.c | 1 -
drivers/cpufreq/pmac64-cpufreq.c | 1 -
2 files changed, 2 deletions(-)

diff --git a/drivers/cpufreq/pmac32-cpufreq.c b/drivers/cpufreq/pmac32-cpufreq.c
index b1ba708..47c227c 100644
--- a/drivers/cpufreq/pmac32-cpufreq.c
+++ b/drivers/cpufreq/pmac32-cpufreq.c
@@ -389,7 +389,6 @@ static int pmac_cpufreq_cpu_init(struct cpufreq_policy *policy)
return -ENODEV;

policy->cpuinfo.transition_latency = transition_latency;
- policy->cur = cur_freq;

return cpufreq_table_validate_and_show(policy, pmac_cpu_freqs);
}
diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c
index 7679990..63f9642 100644
--- a/drivers/cpufreq/pmac64-cpufreq.c
+++ b/drivers/cpufreq/pmac64-cpufreq.c
@@ -338,7 +338,6 @@ static unsigned int g5_cpufreq_get_speed(unsigned int cpu)
static int g5_cpufreq_cpu_init(struct cpufreq_policy *policy)
{
policy->cpuinfo.transition_latency = transition_latency;
- policy->cur = g5_cpu_freqs[g5_query_freq()].frequency;
/* secondary CPUs are tied to the primary one by the
* cpufreq core if in the secondary policy we tell it that
* it actually must be one policy together with all others. */
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:35:53

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 24/37] cpufreq: pcc: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/pcc-cpufreq.c | 7 -------
1 file changed, 7 deletions(-)

diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c
index d81c4e5..0624bee 100644
--- a/drivers/cpufreq/pcc-cpufreq.c
+++ b/drivers/cpufreq/pcc-cpufreq.c
@@ -560,13 +560,6 @@ static int pcc_cpufreq_cpu_init(struct cpufreq_policy *policy)
ioread32(&pcch_hdr->nominal) * 1000;
policy->min = policy->cpuinfo.min_freq =
ioread32(&pcch_hdr->minimum_frequency) * 1000;
- policy->cur = pcc_get_freq(cpu);
-
- if (!policy->cur) {
- pr_debug("init: Unable to get current CPU frequency\n");
- result = -EINVAL;
- goto out;
- }

pr_debug("init: policy->max is %d, policy->min is %d\n",
policy->max, policy->min);
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:36:08

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 26/37] cpufreq: powernow: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/powernow-k6.c | 1 -
drivers/cpufreq/powernow-k7.c | 2 --
drivers/cpufreq/powernow-k8.c | 3 ---
3 files changed, 6 deletions(-)

diff --git a/drivers/cpufreq/powernow-k6.c b/drivers/cpufreq/powernow-k6.c
index cb19fb8..643e795 100644
--- a/drivers/cpufreq/powernow-k6.c
+++ b/drivers/cpufreq/powernow-k6.c
@@ -126,7 +126,6 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy)

/* cpuinfo and default policy values */
policy->cpuinfo.transition_latency = 200000;
- policy->cur = busfreq * max_multiplier;

return cpufreq_table_validate_and_show(policy, clock_ratio);
}
diff --git a/drivers/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c
index 7c76f03..946708a 100644
--- a/drivers/cpufreq/powernow-k7.c
+++ b/drivers/cpufreq/powernow-k7.c
@@ -659,8 +659,6 @@ static int powernow_cpu_init(struct cpufreq_policy *policy)
policy->cpuinfo.transition_latency =
cpufreq_scale(2000000UL, fsb, latency);

- policy->cur = powernow_get(0);
-
return cpufreq_table_validate_and_show(policy, powernow_table);
}

diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c
index 80bc606..62a1ce4 100644
--- a/drivers/cpufreq/powernow-k8.c
+++ b/drivers/cpufreq/powernow-k8.c
@@ -1133,9 +1133,6 @@ static int powernowk8_cpu_init(struct cpufreq_policy *pol)
cpumask_copy(pol->cpus, cpu_core_mask(pol->cpu));
data->available_cores = pol->cpus;

- pol->cur = find_khz_freq_from_fid(data->currfid);
- pr_debug("policy current frequency %d kHz\n", pol->cur);
-
/* min/max the cpu is capable of */
if (cpufreq_table_validate_and_show(pol, data->powernow_table)) {
printk(KERN_ERR FW_BUG PFX "invalid powernow_table\n");
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:36:15

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 27/37] cpufreq: ppc: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/ppc-corenet-cpufreq.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/cpufreq/ppc-corenet-cpufreq.c b/drivers/cpufreq/ppc-corenet-cpufreq.c
index 243a396..79d8e9c 100644
--- a/drivers/cpufreq/ppc-corenet-cpufreq.c
+++ b/drivers/cpufreq/ppc-corenet-cpufreq.c
@@ -217,8 +217,6 @@ static int corenet_cpufreq_cpu_init(struct cpufreq_policy *policy)
per_cpu(cpu_data, i) = data;

policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
- policy->cur = corenet_cpufreq_get_speed(policy->cpu);
-
of_node_put(np);

return 0;
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:36:24

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 28/37] cpufreq: pxa: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Eric Miao <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/pxa2xx-cpufreq.c | 2 --
drivers/cpufreq/pxa3xx-cpufreq.c | 7 +++----
2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c
index a91274a..183bc13 100644
--- a/drivers/cpufreq/pxa2xx-cpufreq.c
+++ b/drivers/cpufreq/pxa2xx-cpufreq.c
@@ -388,8 +388,6 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy)

/* set default policy and cpuinfo */
policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */
- policy->cur = get_clk_frequency_khz(0); /* current freq */
- policy->min = policy->max = policy->cur;

/* Generate pxa25x the run cpufreq_frequency_table struct */
for (i = 0; i < NUM_PXA25x_RUN_FREQS; i++) {
diff --git a/drivers/cpufreq/pxa3xx-cpufreq.c b/drivers/cpufreq/pxa3xx-cpufreq.c
index 61e3e6a..132e37d 100644
--- a/drivers/cpufreq/pxa3xx-cpufreq.c
+++ b/drivers/cpufreq/pxa3xx-cpufreq.c
@@ -190,11 +190,10 @@ static int pxa3xx_cpufreq_init(struct cpufreq_policy *policy)
int ret = -EINVAL;

/* set default policy and cpuinfo */
- policy->cpuinfo.min_freq = 104000;
- policy->cpuinfo.max_freq = (cpu_is_pxa320()) ? 806000 : 624000;
+ policy->min = policy->cpuinfo.min_freq = 104000;
+ policy->max = policy->cpuinfo.max_freq =
+ (cpu_is_pxa320()) ? 806000 : 624000;
policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */
- policy->max = pxa3xx_get_clk_frequency_khz(0);
- policy->cur = policy->min = policy->max;

if (cpu_is_pxa300() || cpu_is_pxa310())
ret = setup_freqs_table(policy, pxa300_freqs,
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:36:36

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 30/37] cpufreq: s5pv210: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Kukjin Kim <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/s5pv210-cpufreq.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/cpufreq/s5pv210-cpufreq.c b/drivers/cpufreq/s5pv210-cpufreq.c
index bdffc3d..76a4177 100644
--- a/drivers/cpufreq/s5pv210-cpufreq.c
+++ b/drivers/cpufreq/s5pv210-cpufreq.c
@@ -515,8 +515,6 @@ static int __init s5pv210_cpu_init(struct cpufreq_policy *policy)
s5pv210_dram_conf[1].refresh = (__raw_readl(S5P_VA_DMC1 + 0x30) * 1000);
s5pv210_dram_conf[1].freq = clk_get_rate(dmc1_clk);

- policy->cur = policy->min = policy->max = s5pv210_getspeed(0);
-
policy->cpuinfo.transition_latency = 40000;

return cpufreq_table_validate_and_show(policy, s5pv210_freq_table);
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:36:31

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 29/37] cpufreq: s3c: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Kukjin Kim <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/s3c2416-cpufreq.c | 2 --
drivers/cpufreq/s3c24xx-cpufreq.c | 5 -----
drivers/cpufreq/s3c64xx-cpufreq.c | 2 --
3 files changed, 9 deletions(-)

diff --git a/drivers/cpufreq/s3c2416-cpufreq.c b/drivers/cpufreq/s3c2416-cpufreq.c
index 90efbf5..9b22cc4 100644
--- a/drivers/cpufreq/s3c2416-cpufreq.c
+++ b/drivers/cpufreq/s3c2416-cpufreq.c
@@ -467,8 +467,6 @@ static int __init s3c2416_cpufreq_driver_init(struct cpufreq_policy *policy)
freq++;
}

- policy->cur = clk_get_rate(s3c_freq->armclk) / 1000;
-
/* Datasheet says PLL stabalisation time must be at least 300us,
* so but add some fudge. (reference in LOCKCON0 register description)
*/
diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c
index 027dec1..e0fbaef 100644
--- a/drivers/cpufreq/s3c24xx-cpufreq.c
+++ b/drivers/cpufreq/s3c24xx-cpufreq.c
@@ -378,11 +378,6 @@ static int s3c_cpufreq_init(struct cpufreq_policy *policy)
if (policy->cpu != 0)
return -EINVAL;

- policy->cur = s3c_cpufreq_get(0);
- policy->min = policy->cpuinfo.min_freq = 0;
- policy->max = policy->cpuinfo.max_freq = cpu_cur.info->max.fclk / 1000;
- policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
-
/* feed the latency information from the cpu driver */
policy->cpuinfo.transition_latency = cpu_cur.info->latency;

diff --git a/drivers/cpufreq/s3c64xx-cpufreq.c b/drivers/cpufreq/s3c64xx-cpufreq.c
index 72f733b..5357dc4 100644
--- a/drivers/cpufreq/s3c64xx-cpufreq.c
+++ b/drivers/cpufreq/s3c64xx-cpufreq.c
@@ -225,8 +225,6 @@ static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy)
freq++;
}

- policy->cur = clk_get_rate(armclk) / 1000;
-
/* Datasheet says PLL stabalisation time (if we were to use
* the PLLs, which we don't currently) is ~300us worst case,
* but add some fudge.
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:36:43

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 31/37] cpufreq: sa11x0: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Russell King <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/sa1100-cpufreq.c | 1 -
drivers/cpufreq/sa1110-cpufreq.c | 1 -
2 files changed, 2 deletions(-)

diff --git a/drivers/cpufreq/sa1100-cpufreq.c b/drivers/cpufreq/sa1100-cpufreq.c
index b9e131e..aa49a08 100644
--- a/drivers/cpufreq/sa1100-cpufreq.c
+++ b/drivers/cpufreq/sa1100-cpufreq.c
@@ -204,7 +204,6 @@ static int __init sa1100_cpu_init(struct cpufreq_policy *policy)
{
if (policy->cpu != 0)
return -EINVAL;
- policy->cur = sa11x0_getspeed(0);
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;

return cpufreq_table_validate_and_show(policy, sa11x0_freq_table);
diff --git a/drivers/cpufreq/sa1110-cpufreq.c b/drivers/cpufreq/sa1110-cpufreq.c
index fb69553..c00cf2b 100644
--- a/drivers/cpufreq/sa1110-cpufreq.c
+++ b/drivers/cpufreq/sa1110-cpufreq.c
@@ -316,7 +316,6 @@ static int __init sa1110_cpu_init(struct cpufreq_policy *policy)
{
if (policy->cpu != 0)
return -EINVAL;
- policy->cur = sa11x0_getspeed(0);
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;

return cpufreq_table_validate_and_show(policy, sa11x0_freq_table);
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:37:00

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 33/37] cpufreq: sh: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Paul Mundt <[email protected]>
Cc: [email protected]
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/sh-cpufreq.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/cpufreq/sh-cpufreq.c b/drivers/cpufreq/sh-cpufreq.c
index 91c6446..018348b 100644
--- a/drivers/cpufreq/sh-cpufreq.c
+++ b/drivers/cpufreq/sh-cpufreq.c
@@ -114,8 +114,6 @@ static int sh_cpufreq_cpu_init(struct cpufreq_policy *policy)
return PTR_ERR(cpuclk);
}

- policy->cur = sh_cpufreq_get(cpu);
-
freq_table = cpuclk->nr_freqs ? cpuclk->freq_table : NULL;
if (freq_table) {
int result;
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:36:49

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 32/37] cpufreq: sc520_freq: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/sc520_freq.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/sc520_freq.c b/drivers/cpufreq/sc520_freq.c
index cd62472..6c86452 100644
--- a/drivers/cpufreq/sc520_freq.c
+++ b/drivers/cpufreq/sc520_freq.c
@@ -94,7 +94,6 @@ static int sc520_freq_cpu_init(struct cpufreq_policy *policy)

/* cpuinfo and default policy values */
policy->cpuinfo.transition_latency = 1000000; /* 1ms */
- policy->cur = sc520_freq_get_cpu_frequency(0);

return cpufreq_table_validate_and_show(policy, sc520_freq_table);
}
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:37:05

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 34/37] cpufreq: spear: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: [email protected]
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/spear-cpufreq.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c
index 88aa5cf..efacfa1 100644
--- a/drivers/cpufreq/spear-cpufreq.c
+++ b/drivers/cpufreq/spear-cpufreq.c
@@ -176,8 +176,6 @@ static int spear_cpufreq_init(struct cpufreq_policy *policy)
}

policy->cpuinfo.transition_latency = spear_cpufreq.transition_latency;
- policy->cur = spear_cpufreq_get(0);
-
cpumask_setall(policy->cpus);

return 0;
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:37:15

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 35/37] cpufreq: speedstep: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: David S. Miller <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/speedstep-centrino.c | 5 -----
drivers/cpufreq/speedstep-ich.c | 15 +--------------
drivers/cpufreq/speedstep-smi.c | 13 -------------
3 files changed, 1 insertion(+), 32 deletions(-)

diff --git a/drivers/cpufreq/speedstep-centrino.c b/drivers/cpufreq/speedstep-centrino.c
index b309774..b7a2f8d 100644
--- a/drivers/cpufreq/speedstep-centrino.c
+++ b/drivers/cpufreq/speedstep-centrino.c
@@ -343,7 +343,6 @@ static unsigned int get_cur_freq(unsigned int cpu)
static int centrino_cpu_init(struct cpufreq_policy *policy)
{
struct cpuinfo_x86 *cpu = &cpu_data(policy->cpu);
- unsigned freq;
unsigned l, h;
int i;

@@ -394,12 +393,8 @@ static int centrino_cpu_init(struct cpufreq_policy *policy)
}
}

- freq = get_cur_freq(policy->cpu);
policy->cpuinfo.transition_latency = 10000;
/* 10uS transition latency */
- policy->cur = freq;
-
- pr_debug("centrino_cpu_init: cur=%dkHz\n", policy->cur);

return cpufreq_table_validate_and_show(policy,
per_cpu(centrino_model, policy->cpu)->op_points);
diff --git a/drivers/cpufreq/speedstep-ich.c b/drivers/cpufreq/speedstep-ich.c
index be63486..707721e 100644
--- a/drivers/cpufreq/speedstep-ich.c
+++ b/drivers/cpufreq/speedstep-ich.c
@@ -296,7 +296,7 @@ static void get_freqs_on_cpu(void *_get_freqs)

static int speedstep_cpu_init(struct cpufreq_policy *policy)
{
- unsigned int policy_cpu, speed;
+ unsigned int policy_cpu;
struct get_freqs gf;

/* only run on CPU to be set, or on its sibling */
@@ -311,19 +311,6 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
if (gf.ret)
return gf.ret;

- /* get current speed setting */
- speed = speedstep_get(policy_cpu);
- if (!speed)
- return -EIO;
-
- pr_debug("currently at %s speed setting - %i MHz\n",
- (speed == speedstep_freqs[SPEEDSTEP_LOW].frequency)
- ? "low" : "high",
- (speed / 1000));
-
- /* cpuinfo and default policy values */
- policy->cur = speed;
-
return cpufreq_table_validate_and_show(policy, speedstep_freqs);
}

diff --git a/drivers/cpufreq/speedstep-smi.c b/drivers/cpufreq/speedstep-smi.c
index 878e64b..19446e4 100644
--- a/drivers/cpufreq/speedstep-smi.c
+++ b/drivers/cpufreq/speedstep-smi.c
@@ -257,7 +257,6 @@ static int speedstep_target(struct cpufreq_policy *policy, unsigned int index)
static int speedstep_cpu_init(struct cpufreq_policy *policy)
{
int result;
- unsigned int speed, state;
unsigned int *low, *high;

/* capability check */
@@ -293,19 +292,7 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
pr_debug("workaround worked.\n");
}

- /* get current speed setting */
- state = speedstep_get_state();
- speed = speedstep_freqs[state].frequency;
-
- pr_debug("currently at %s speed setting - %i MHz\n",
- (speed == speedstep_freqs[SPEEDSTEP_LOW].frequency)
- ? "low" : "high",
- (speed / 1000));
-
- /* cpuinfo and default policy values */
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
- policy->cur = speed;
-
return cpufreq_table_validate_and_show(policy, speedstep_freqs);
}

--
1.7.12.rc2.18.g61b472e

2013-08-14 13:37:25

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 36/37] cpufreq: tegra: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Stephen Warren <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/tegra-cpufreq.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/cpufreq/tegra-cpufreq.c b/drivers/cpufreq/tegra-cpufreq.c
index ee2cf8f3..3c2b12b 100644
--- a/drivers/cpufreq/tegra-cpufreq.c
+++ b/drivers/cpufreq/tegra-cpufreq.c
@@ -205,8 +205,7 @@ static int tegra_cpu_init(struct cpufreq_policy *policy)
clk_prepare_enable(cpu_clk);

cpufreq_table_validate_and_show(policy, freq_table);
- policy->cur = tegra_getspeed(policy->cpu);
- target_cpu_speed[policy->cpu] = policy->cur;
+ target_cpu_speed[policy->cpu] = tegra_getspeed(policy->cpu);

/* FIXME: what's the actual transition time? */
policy->cpuinfo.transition_latency = 300 * 1000;
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:37:49

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 37/37] cpufreq: unicore2: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/unicore2-cpufreq.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/unicore2-cpufreq.c b/drivers/cpufreq/unicore2-cpufreq.c
index b225f04..79ca32e 100644
--- a/drivers/cpufreq/unicore2-cpufreq.c
+++ b/drivers/cpufreq/unicore2-cpufreq.c
@@ -68,7 +68,6 @@ static int __init ucv2_cpu_init(struct cpufreq_policy *policy)
{
if (policy->cpu != 0)
return -EINVAL;
- policy->cur = ucv2_getspeed(0);
policy->min = policy->cpuinfo.min_freq = 250000;
policy->max = policy->cpuinfo.max_freq = 1000000;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
--
1.7.12.rc2.18.g61b472e

2013-08-14 13:41:07

by Viresh Kumar

[permalink] [raw]
Subject: [PATCH 17/37] cpufreq: integrator: don't initialize part of policy that is set by core too

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Russell King <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
---
drivers/cpufreq/integrator-cpufreq.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/cpufreq/integrator-cpufreq.c b/drivers/cpufreq/integrator-cpufreq.c
index f7c99df..6391dd3 100644
--- a/drivers/cpufreq/integrator-cpufreq.c
+++ b/drivers/cpufreq/integrator-cpufreq.c
@@ -186,10 +186,9 @@ static int integrator_cpufreq_init(struct cpufreq_policy *policy)
{

/* set default policy and cpuinfo */
- policy->cpuinfo.max_freq = 160000;
- policy->cpuinfo.min_freq = 12000;
+ policy->max = policy->cpuinfo.max_freq = 160000;
+ policy->min = policy->cpuinfo.min_freq = 12000;
policy->cpuinfo.transition_latency = 1000000; /* 1 ms, assumed */
- policy->cur = policy->min = policy->max = integrator_get(policy->cpu);

return 0;
}
--
1.7.12.rc2.18.g61b472e

Subject: Re: [PATCH 04/37] cpufreq: at32ap: don't initialize part of policy that is set by core too

Around Wed 14 Aug 2013 19:01:53 +0530 or thereabout, Viresh Kumar wrote:
> Many common initializations of struct policy are moved to core now and hence
> this driver doesn't need to do it. This patch removes such code.
>
> Most recent of those changes is to call ->get() in the core after calling
> ->init().

It would be easier to review if you add me to CC on the new APIs you
implement as well. Now I had to look up what the ->get() call did.

> Cc: Hans-Christian Egtvedt <[email protected]>
> Signed-off-by: Viresh Kumar <[email protected]>
> ---
> drivers/cpufreq/at32ap-cpufreq.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)

Assuming the core get() call replaces the content:

Acked-by: Hans-Christian Egtvedt <[email protected]>

--
mvh
Hans-Christian Egtvedt

2013-08-14 14:37:47

by Viresh Kumar

[permalink] [raw]
Subject: Re: [PATCH 04/37] cpufreq: at32ap: don't initialize part of policy that is set by core too

On 14 August 2013 20:05, Hans-Christian Egtvedt <[email protected]> wrote:
> Around Wed 14 Aug 2013 19:01:53 +0530 or thereabout, Viresh Kumar wrote:
>> Many common initializations of struct policy are moved to core now and hence
>> this driver doesn't need to do it. This patch removes such code.
>>
>> Most recent of those changes is to call ->get() in the core after calling
>> ->init().
>
> It would be easier to review if you add me to CC on the new APIs you
> implement as well. Now I had to look up what the ->get() call did.

I know my track record hasn't been impressive on this subject but I am
sure I am following this since sometime now :)

https://lkml.org/lkml/2013/8/14/285

Subject: Re: [PATCH 04/37] cpufreq: at32ap: don't initialize part of policy that is set by core too

Around Wed 14 Aug 2013 20:07:44 +0530 or thereabout, Viresh Kumar wrote:
> On 14 August 2013 20:05, Hans-Christian Egtvedt <[email protected]> wrote:
>> Around Wed 14 Aug 2013 19:01:53 +0530 or thereabout, Viresh Kumar wrote:
>>> Many common initializations of struct policy are moved to core now and hence
>>> this driver doesn't need to do it. This patch removes such code.
>>>
>>> Most recent of those changes is to call ->get() in the core after calling
>>> ->init().
>>
>> It would be easier to review if you add me to CC on the new APIs you
>> implement as well. Now I had to look up what the ->get() call did.
>
> I know my track record hasn't been impressive on this subject but I am
> sure I am following this since sometime now :)
>
> https://lkml.org/lkml/2013/8/14/285

Sorry, my bad, I actually had gotten it, it was just so too short to notice.

--
mvh
Hans-Christian Egtvedt

2013-08-18 10:50:23

by amit daniel kachhap

[permalink] [raw]
Subject: Re: [PATCH 13/37] cpufreq: exynos: don't initialize part of policy that is set by core too

On Wed, Aug 14, 2013 at 7:02 PM, Viresh Kumar <[email protected]> wrote:
> Many common initializations of struct policy are moved to core now and hence
> this driver doesn't need to do it. This patch removes such code.
>
> Most recent of those changes is to call ->get() in the core after calling
> ->init().
>
> Cc: Kukjin Kim <[email protected]>
> Signed-off-by: Viresh Kumar <[email protected]>
This consolidation work looks fine,
Acked-By: Amit Daniel Kachhap <[email protected]>

Thanks,
Amit
> ---
> drivers/cpufreq/exynos-cpufreq.c | 2 --
> drivers/cpufreq/exynos5440-cpufreq.c | 1 -
> 2 files changed, 3 deletions(-)
>
> diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c
> index 79b869b..b1db082 100644
> --- a/drivers/cpufreq/exynos-cpufreq.c
> +++ b/drivers/cpufreq/exynos-cpufreq.c
> @@ -226,8 +226,6 @@ static struct notifier_block exynos_cpufreq_nb = {
>
> static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy)
> {
> - policy->cur = policy->min = policy->max = exynos_getspeed(policy->cpu);
> -
> /* set the transition latency value */
> policy->cpuinfo.transition_latency = 100000;
>
> diff --git a/drivers/cpufreq/exynos5440-cpufreq.c b/drivers/cpufreq/exynos5440-cpufreq.c
> index 9a5ed485..91a64d6 100644
> --- a/drivers/cpufreq/exynos5440-cpufreq.c
> +++ b/drivers/cpufreq/exynos5440-cpufreq.c
> @@ -316,7 +316,6 @@ static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy)
> return ret;
> }
>
> - policy->cur = dvfs_info->cur_frequency;
> policy->cpuinfo.transition_latency = dvfs_info->latency;
> cpumask_setall(policy->cpus);
>
> --
> 1.7.12.rc2.18.g61b472e
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

2013-08-18 21:58:35

by Kukjin Kim

[permalink] [raw]
Subject: RE: [PATCH 13/37] cpufreq: exynos: don't initialize part of policy that is set by core too

amit daniel kachhap wrote:
>
> On Wed, Aug 14, 2013 at 7:02 PM, Viresh Kumar <[email protected]>
> wrote:
> > Many common initializations of struct policy are moved to core now and
> hence
> > this driver doesn't need to do it. This patch removes such code.
> >
> > Most recent of those changes is to call ->get() in the core after
> calling
> > ->init().
> >
> > Cc: Kukjin Kim <[email protected]>

Acked-by: Kukjin Kim <[email protected]>

Thanks,
Kukjin

> > Signed-off-by: Viresh Kumar <[email protected]>
> This consolidation work looks fine,
> Acked-By: Amit Daniel Kachhap <[email protected]>
>
> Thanks,
> Amit
> > ---
> > drivers/cpufreq/exynos-cpufreq.c | 2 --
> > drivers/cpufreq/exynos5440-cpufreq.c | 1 -
> > 2 files changed, 3 deletions(-)
> >
> > diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-
> cpufreq.c
> > index 79b869b..b1db082 100644
> > --- a/drivers/cpufreq/exynos-cpufreq.c
> > +++ b/drivers/cpufreq/exynos-cpufreq.c
> > @@ -226,8 +226,6 @@ static struct notifier_block exynos_cpufreq_nb = {
> >
> > static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy)
> > {
> > - policy->cur = policy->min = policy->max =
exynos_getspeed(policy-
> >cpu);
> > -
> > /* set the transition latency value */
> > policy->cpuinfo.transition_latency = 100000;
> >
> > diff --git a/drivers/cpufreq/exynos5440-cpufreq.c
> b/drivers/cpufreq/exynos5440-cpufreq.c
> > index 9a5ed485..91a64d6 100644
> > --- a/drivers/cpufreq/exynos5440-cpufreq.c
> > +++ b/drivers/cpufreq/exynos5440-cpufreq.c
> > @@ -316,7 +316,6 @@ static int exynos_cpufreq_cpu_init(struct
> cpufreq_policy *policy)
> > return ret;
> > }
> >
> > - policy->cur = dvfs_info->cur_frequency;
> > policy->cpuinfo.transition_latency = dvfs_info->latency;
> > cpumask_setall(policy->cpus);
> >
> > --
> > 1.7.12.rc2.18.g61b472e