From: Paul Walmsley <paul@pwsan.com>
To: linux-omap@vger.kernel.org
Cc: Paul Walmsley <paul@pwsan.com>
Subject: [PATCH 6/6] OMAP3 clock: recalculate DPLL subtree after bypass entry/exit
Date: Tue, 16 Sep 2008 06:16:55 -0600 [thread overview]
Message-ID: <20080916121650.4666.40964.stgit@localhost.localdomain> (raw)
In-Reply-To: <20080916121521.4666.61245.stgit@localhost.localdomain>
The DPLL's rate changes when it enters or leaves bypass, so the DPLL's
rate and the rates of all dependent clocks need to be recalculated
when this happens.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
arch/arm/mach-omap2/clock34xx.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
index a2b8d1e..6dbaac6 100644
--- a/arch/arm/mach-omap2/clock34xx.c
+++ b/arch/arm/mach-omap2/clock34xx.c
@@ -180,7 +180,7 @@ static int _omap3_noncore_dpll_lock(struct clk *clk)
}
/*
- * omap3_noncore_dpll_bypass - instruct a DPLL to bypass and wait for readiness
+ * _omap3_noncore_dpll_bypass - instruct a DPLL to bypass and wait for readiness
* @clk: pointer to a DPLL struct clk
*
* Instructs a non-CORE DPLL to enter low-power bypass mode. In
@@ -270,15 +270,21 @@ static int _omap3_noncore_dpll_stop(struct clk *clk)
static int omap3_noncore_dpll_enable(struct clk *clk)
{
int r;
+ long rate;
if (clk == &dpll3_ck)
return -EINVAL;
- if (clk->parent->rate == omap2_get_dpll_rate(clk))
+ rate = omap2_get_dpll_rate(clk);
+
+ if (clk->parent->rate == rate)
r = _omap3_noncore_dpll_bypass(clk);
else
r = _omap3_noncore_dpll_lock(clk);
+ if (!r)
+ clk->rate = rate;
+
return r;
}
@@ -397,6 +403,8 @@ static int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate)
(clk->dpll_data->modes & (1 << DPLL_LOW_POWER_BYPASS))) {
ret = _omap3_noncore_dpll_bypass(clk);
+ if (!ret)
+ clk->rate = rate;
} else {
prev parent reply other threads:[~2008-09-16 12:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-16 12:16 [PATCH 0/6] OMAP2/3 clock: revise DPLL bypass handling in clock tree Paul Walmsley
2008-09-16 12:16 ` [PATCH 1/6] OMAP2/3 clock: convert dpll_data.idlest_bit to idlest_mask Paul Walmsley
2008-09-16 12:16 ` [PATCH 2/6] OMAP3 clock: add idlest_reg, idlest_mask for DPLL3 Paul Walmsley
2008-09-16 12:16 ` [PATCH 3/6] OMAP2/3 clock: move DPLL bypass rate calculation into omap2_get_dpll_rate() Paul Walmsley
2008-09-16 12:16 ` [PATCH 4/6] OMAP3 clock: omap3_clkoutx2_recalc() should test DPLL IDLEST to determine if DPLL is bypassed Paul Walmsley
2008-09-16 12:16 ` [PATCH 5/6] OMAP3 clock: DPLLs should enter bypass if new rate is sys_ck Paul Walmsley
2008-09-16 12:16 ` Paul Walmsley [this message]
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=20080916121650.4666.40964.stgit@localhost.localdomain \
--to=paul@pwsan.com \
--cc=linux-omap@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.