mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Teresa Gámez" <t.gamez@phytec.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/2] ARM pcm043: Use PDR0 to change cpu freq
Date: Thu, 28 Jul 2011 15:14:14 +0200	[thread overview]
Message-ID: <1311858854-23434-2-git-send-email-t.gamez@phytec.de> (raw)
In-Reply-To: <1311858854-23434-1-git-send-email-t.gamez@phytec.de>

Instead of changing the MPCTL to set an other cpu frequency,
use the post divider.

This prevents freezing when changing the clock from 399MHz to 532MHz.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
---
 arch/arm/boards/pcm043/pcm043.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boards/pcm043/pcm043.c b/arch/arm/boards/pcm043/pcm043.c
index 3bd6402..8629ae6 100644
--- a/arch/arm/boards/pcm043/pcm043.c
+++ b/arch/arm/boards/pcm043/pcm043.c
@@ -308,8 +308,8 @@ static int pcm043_core_setup(void)
 
 core_initcall(pcm043_core_setup);
 
-#define MPCTL_PARAM_399     (IMX_PLL_PD(0) | IMX_PLL_MFD(15) | IMX_PLL_MFI(8) | IMX_PLL_MFN(5))
-#define MPCTL_PARAM_532     ((1 << 31) | IMX_PLL_PD(0) | IMX_PLL_MFD(11) | IMX_PLL_MFI(11) | IMX_PLL_MFN(1))
+#define	CCM_PDR0_PARAM_399	((1 << 12) | (1 << 16))
+#define	CCM_PDR0_PARAM_532	(1 << 12)
 
 static int do_cpufreq(struct command *cmdtp, int argc, char *argv[])
 {
@@ -322,10 +322,10 @@ static int do_cpufreq(struct command *cmdtp, int argc, char *argv[])
 
 	switch (freq) {
 	case 399:
-		writel(MPCTL_PARAM_399, IMX_CCM_BASE + CCM_MPCTL);
+		writel(CCM_PDR0_PARAM_399, IMX_CCM_BASE + CCM_PDR0);
 		break;
 	case 532:
-		writel(MPCTL_PARAM_532, IMX_CCM_BASE + CCM_MPCTL);
+		writel(CCM_PDR0_PARAM_532, IMX_CCM_BASE + CCM_PDR0);
 		break;
 	default:
 		return COMMAND_ERROR_USAGE;
-- 
1.7.0.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-07-28 13:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-28 13:14 [PATCH 1/2] ARM pcm043: New RAM timings Teresa Gámez
2011-07-28 13:14 ` Teresa Gámez [this message]
2011-07-28 14:11   ` [PATCH 2/2] ARM pcm043: Use PDR0 to change cpu freq Marc Kleine-Budde
2011-07-28 13:43 ` [PATCH 1/2] ARM pcm043: New RAM timings Sascha Hauer
2011-08-22 13:49   ` Teresa Gamez

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=1311858854-23434-2-git-send-email-t.gamez@phytec.de \
    --to=t.gamez@phytec.de \
    --cc=barebox@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