* [PATCH] cpufreq-dt: add suspend frequency support
@ 2015-09-02 16:42 Bartlomiej Zolnierkiewicz
2015-09-03 2:50 ` Viresh Kumar
0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2015-09-02 16:42 UTC (permalink / raw)
To: linux-arm-kernel
Add suspend frequency support and set it to the boot frequency,
this matches what the old exynos-cpufreq driver has been doing.
This patch fixes suspend/resume support on Exynos4412 based
Trats2 board and reboot hang on Exynos4412 based Odroid U3
board.
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Thomas Abraham <thomas.ab@samsung.com>
Cc: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
This patch supersedes "[PATCH] ARM: dts: exynos4412-odroid-*: add
workaround for CPUfreq/reboot issue" one from yesterday.
drivers/cpufreq/cpufreq-dt.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
index c3583cd..c9138c7 100644
--- a/drivers/cpufreq/cpufreq-dt.c
+++ b/drivers/cpufreq/cpufreq-dt.c
@@ -329,6 +329,10 @@ static int cpufreq_init(struct cpufreq_policy *policy)
policy->driver_data = priv;
policy->clk = cpu_clk;
+
+ /* capture boot frequency */
+ policy->suspend_freq = clk_get_rate(cpu_clk) / 1000;;
+
ret = cpufreq_table_validate_and_show(policy, freq_table);
if (ret) {
dev_err(cpu_dev, "%s: invalid frequency table: %d\n", __func__,
@@ -419,6 +423,9 @@ static struct cpufreq_driver dt_cpufreq_driver = {
.ready = cpufreq_ready,
.name = "cpufreq-dt",
.attr = cpufreq_dt_attr,
+#ifdef CONFIG_PM
+ .suspend = cpufreq_generic_suspend,
+#endif
};
static int dt_cpufreq_probe(struct platform_device *pdev)
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH] cpufreq-dt: add suspend frequency support
2015-09-02 16:42 [PATCH] cpufreq-dt: add suspend frequency support Bartlomiej Zolnierkiewicz
@ 2015-09-03 2:50 ` Viresh Kumar
0 siblings, 0 replies; 2+ messages in thread
From: Viresh Kumar @ 2015-09-03 2:50 UTC (permalink / raw)
To: linux-arm-kernel
On 02-09-15, 18:42, Bartlomiej Zolnierkiewicz wrote:
> Add suspend frequency support and set it to the boot frequency,
> this matches what the old exynos-cpufreq driver has been doing.
>
> This patch fixes suspend/resume support on Exynos4412 based
> Trats2 board and reboot hang on Exynos4412 based Odroid U3
> board.
>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: Thomas Abraham <thomas.ab@samsung.com>
> Cc: Javier Martinez Canillas <javier@osg.samsung.com>
> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> Cc: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---
> This patch supersedes "[PATCH] ARM: dts: exynos4412-odroid-*: add
> workaround for CPUfreq/reboot issue" one from yesterday.
>
> drivers/cpufreq/cpufreq-dt.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
> index c3583cd..c9138c7 100644
> --- a/drivers/cpufreq/cpufreq-dt.c
> +++ b/drivers/cpufreq/cpufreq-dt.c
> @@ -329,6 +329,10 @@ static int cpufreq_init(struct cpufreq_policy *policy)
> policy->driver_data = priv;
>
> policy->clk = cpu_clk;
> +
> + /* capture boot frequency */
> + policy->suspend_freq = clk_get_rate(cpu_clk) / 1000;;
We should be using opp-v2's suspend-opp thing for this now..
--
viresh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-03 2:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-02 16:42 [PATCH] cpufreq-dt: add suspend frequency support Bartlomiej Zolnierkiewicz
2015-09-03 2:50 ` Viresh Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).