From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] i.MX35: Fix arm/ahb clock calculation
Date: Fri, 23 Apr 2010 09:40:25 +0200 [thread overview]
Message-ID: <1272008426-14435-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1272008426-14435-1-git-send-email-s.hauer@pengutronix.de>
The correct divider for the reference clock if arm_sel is 1 is
3/4 and not 2/3. Also, the ahb clock is also affected by this divider.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-mx3/clock-imx35.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c
index 9f3e943..5c87338 100644
--- a/arch/arm/mach-mx3/clock-imx35.c
+++ b/arch/arm/mach-mx3/clock-imx35.c
@@ -155,7 +155,7 @@ static unsigned long get_rate_arm(void)
aad = &clk_consumer[(pdr0 >> 16) & 0xf];
if (aad->sel)
- fref = fref * 2 / 3;
+ fref = fref * 3 / 4;
return fref / aad->arm;
}
@@ -167,6 +167,8 @@ static unsigned long get_rate_ahb(struct clk *clk)
unsigned long fref = get_rate_mpll();
aad = &clk_consumer[(pdr0 >> 16) & 0xf];
+ if (aad->sel)
+ fref = fref * 3 / 4;
return fref / aad->ahb;
}
--
1.7.0
next prev parent reply other threads:[~2010-04-23 7:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-23 7:40 i.MX35 Clock patches Sascha Hauer
2010-04-23 7:40 ` Sascha Hauer [this message]
2010-04-23 7:40 ` [PATCH 2/2] i.MX35: remove get_3_3_div helper function Sascha Hauer
2010-04-23 10:12 ` Sergei Shtylyov
2010-04-23 12:38 ` Sascha Hauer
2010-04-23 13:20 ` Sergei Shtylyov
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=1272008426-14435-2-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--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).