From: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
To: linux-samsung-soc@vger.kernel.org
Cc: linux-pm@vger.kernel.org, m.reichl@fivetechno.de,
myungjoo.ham@gmail.com, cw00.choi@samsung.com,
Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Subject: [RFC 2/4] PM / devfreq: suspend subsystem on system suspend/hibernate
Date: Wed, 23 Nov 2016 14:51:25 +0100 [thread overview]
Message-ID: <1479909087-22659-3-git-send-email-tjakobi@math.uni-bielefeld.de> (raw)
In-Reply-To: <1479909087-22659-1-git-send-email-tjakobi@math.uni-bielefeld.de>
On the Exynos4412 SoC the DevFreq subsystem adjusts frequency
of the various internal busses and corresponding voltages.
E.g. the clock of the DMC (dynamic memory controller) bus
together with the voltage of the MIF regulator are controlled
by this.
If DMC activity is low and DevFreq has set a lower OPP, the
following can happen.
If the system is restarted or goes into a suspend/resume-cycle,
the first-stage (BL0) bootloader takes over, which also
initializes clocks to default values. Since the PMIC is an
external component and not part of the SoC, the BL0 doesn't
set any default voltages. Upon setting the default clocks
for the DMC bus, the BL0 hangs because the corresponding
voltage is too low.
To fix this, we make sure to only go into suspend with a 'safe'
DevFreq configuration.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
---
drivers/base/power/main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 5a94dfa..9cd7e06 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -32,6 +32,7 @@
#include <trace/events/power.h>
#include <linux/cpufreq.h>
#include <linux/cpuidle.h>
+#include <linux/devfreq.h>
#include <linux/timer.h>
#include "../base.h"
@@ -943,6 +944,7 @@ void dpm_resume(pm_message_t state)
dpm_show_time(starttime, state, NULL);
cpufreq_resume();
+ devfreq_resume();
trace_suspend_resume(TPS("dpm_resume"), state.event, false);
}
@@ -1582,6 +1584,7 @@ int dpm_suspend(pm_message_t state)
trace_suspend_resume(TPS("dpm_suspend"), state.event, true);
might_sleep();
+ devfreq_suspend();
cpufreq_suspend();
mutex_lock(&dpm_list_mtx);
--
2.7.3
next prev parent reply other threads:[~2016-11-23 13:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-23 13:51 [RFC 0/4] PM / devfreq: draft for OPP suspend impl Tobias Jakobi
2016-11-23 13:51 ` [RFC 1/4] PM / devfreq: Add DevFreq subsystem suspend/resume Tobias Jakobi
2016-11-24 1:34 ` Chanwoo Choi
2016-11-24 8:20 ` Chanwoo Choi
2016-11-24 14:20 ` Tobias Jakobi
2016-11-23 13:51 ` Tobias Jakobi [this message]
2016-11-24 1:35 ` [RFC 2/4] PM / devfreq: suspend subsystem on system suspend/hibernate Chanwoo Choi
2016-11-23 13:51 ` [RFC 3/4] PM / devfreq: exynos-bus: add support for suspend OPP Tobias Jakobi
2016-11-24 1:38 ` Chanwoo Choi
2016-11-24 14:22 ` Tobias Jakobi
2016-11-23 13:51 ` [RFC 4/4] ARM: dts: exynos4x12: add suspend OPP for DMC and leftbus Tobias Jakobi
2016-11-24 1:41 ` Chanwoo Choi
2016-11-24 14:27 ` Tobias Jakobi
2016-11-24 23:44 ` Chanwoo Choi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1479909087-22659-3-git-send-email-tjakobi@math.uni-bielefeld.de \
--to=tjakobi@math.uni-bielefeld.de \
--cc=cw00.choi@samsung.com \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.reichl@fivetechno.de \
--cc=myungjoo.ham@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).