From: josephl@nvidia.com (Joseph Lo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V3 3/8] clk: tegra114: add LP1 suspend/resume support
Date: Mon, 12 Aug 2013 17:40:02 +0800 [thread overview]
Message-ID: <1376300407-14750-4-git-send-email-josephl@nvidia.com> (raw)
In-Reply-To: <1376300407-14750-1-git-send-email-josephl@nvidia.com>
When the system suspends to LP1, the CPU clock source is switched to
CLK_M (12MHz Oscillator) during suspend/resume flow. The CPU clock
source is controlled by the CCLKG_BURST_POLICY register, and hence this
register must be restored during LP1 resume.
Cc: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Joseph Lo <josephl@nvidia.com>
---
V3:
* move the CCLKG burst policy resume code to tegra_cpu_car_ops
V2:
* update the commit message
---
drivers/clk/tegra/clk-tegra114.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/clk/tegra/clk-tegra114.c b/drivers/clk/tegra/clk-tegra114.c
index f74ed19..806d803 100644
--- a/drivers/clk/tegra/clk-tegra114.c
+++ b/drivers/clk/tegra/clk-tegra114.c
@@ -293,6 +293,8 @@
#ifdef CONFIG_PM_SLEEP
static struct cpu_clk_suspend_context {
u32 clk_csite_src;
+ u32 cclkg_burst;
+ u32 cclkg_divider;
} tegra114_cpu_clk_sctx;
#endif
@@ -2155,12 +2157,22 @@ static void tegra114_cpu_clock_suspend(void)
tegra114_cpu_clk_sctx.clk_csite_src =
readl(clk_base + CLK_SOURCE_CSITE);
writel(3 << 30, clk_base + CLK_SOURCE_CSITE);
+
+ tegra114_cpu_clk_sctx.cclkg_burst =
+ readl(clk_base + CCLKG_BURST_POLICY);
+ tegra114_cpu_clk_sctx.cclkg_divider =
+ readl(clk_base + CCLKG_BURST_POLICY + 4);
}
static void tegra114_cpu_clock_resume(void)
{
writel(tegra114_cpu_clk_sctx.clk_csite_src,
clk_base + CLK_SOURCE_CSITE);
+
+ writel(tegra114_cpu_clk_sctx.cclkg_burst,
+ clk_base + CCLKG_BURST_POLICY);
+ writel(tegra114_cpu_clk_sctx.cclkg_divider,
+ clk_base + CCLKG_BURST_POLICY + 4);
}
#endif
--
1.8.3.4
next prev parent reply other threads:[~2013-08-12 9:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-12 9:39 [PATCH V3 0/8] ARM: tegra: support LP1 suspend mode Joseph Lo
2013-08-12 9:40 ` [PATCH V3 1/8] ARM: tegra: add common resume handling code for LP1 resuming Joseph Lo
2013-08-12 9:40 ` [PATCH V3 2/8] ARM: tegra: config the polarity of the request of sys clock Joseph Lo
2013-08-12 9:40 ` Joseph Lo [this message]
2013-08-12 9:40 ` [PATCH V3 4/8] ARM: tegra: add common LP1 suspend support Joseph Lo
2013-08-12 19:24 ` Stephen Warren
2013-08-13 6:58 ` Joseph Lo
2013-08-12 9:40 ` [PATCH V3 5/8] ARM: tegra: add LP1 suspend support for Tegra30 Joseph Lo
2013-08-12 9:40 ` [PATCH V3 6/8] ARM: tegra: add LP1 suspend support for Tegra20 Joseph Lo
2013-08-12 9:40 ` [PATCH V3 7/8] ARM: tegra: add LP1 suspend support for Tegra114 Joseph Lo
2013-08-12 9:40 ` [PATCH V3 8/8] ARM: tegra: enable LP1 suspend mode Joseph Lo
2013-08-12 19:40 ` [PATCH V3 0/8] ARM: tegra: support " Stephen Warren
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=1376300407-14750-4-git-send-email-josephl@nvidia.com \
--to=josephl@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).