From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH] ARM: mach-shmobile: sh73a0 CPGA fix for PLL CFG bit
Date: Thu, 20 Jan 2011 08:11:11 +0000 [thread overview]
Message-ID: <20110120081111.9368.87160.sendpatchset@t400s> (raw)
In-Reply-To: <20101222061405.25163.82564.sendpatchset@t400s>
From: Magnus Damm <damm@opensource.se>
PLL1 and PLL2 in the sh73a0 CPGA has a CFG bit that
must be taken into account to correctly calculate the
frequency.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/arm/mach-shmobile/clock-sh73a0.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
--- 0001/arch/arm/mach-shmobile/clock-sh73a0.c
+++ work/arch/arm/mach-shmobile/clock-sh73a0.c 2011-01-20 15:23:06.000000000 +0900
@@ -118,8 +118,16 @@ static unsigned long pll_recalc(struct c
{
unsigned long mult = 1;
- if (__raw_readl(PLLECR) & (1 << clk->enable_bit))
+ if (__raw_readl(PLLECR) & (1 << clk->enable_bit)) {
mult = (((__raw_readl(clk->enable_reg) >> 24) & 0x3f) + 1);
+ /* handle CFG bit for PLL1 and PLL2 */
+ switch (clk->enable_bit) {
+ case 1:
+ case 2:
+ if (__raw_readl(clk->enable_reg) & (1 << 20))
+ mult *= 2;
+ }
+ }
return clk->parent->rate * mult;
}
next prev parent reply other threads:[~2011-01-20 8:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-22 6:14 [PATCH] ARM: mach-shmobile: sh73a0 CPGA fix for KEYSC Magnus Damm
2010-12-22 7:36 ` Paul Mundt
2011-01-18 8:48 ` [PATCH] ARM: mach-shmobile: sh73a0 CPGA fix for IrDA MSTP Magnus Damm
2011-01-18 8:53 ` [PATCH] ARM: mach-shmobile: sh73a0 CPGA fix for FRQCRA M3 Magnus Damm
2011-01-18 10:59 ` [PATCH] ARM: mach-shmobile: sh73a0 CPGA fix for IrDA MSTP Paul Mundt
2011-01-20 8:11 ` Magnus Damm [this message]
2011-01-20 12:32 ` [PATCH] ARM: mach-shmobile: sh73a0 CPGA fix for PLL CFG bit Paul Mundt
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=20110120081111.9368.87160.sendpatchset@t400s \
--to=magnus.damm@gmail.com \
--cc=linux-sh@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 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).