From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 2/7] at91: fix cpu clock speed display
Date: Fri, 16 Sep 2011 14:23:43 +0200 [thread overview]
Message-ID: <1316175828-19748-2-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1316175828-19748-1-git-send-email-plagnioj@jcrosoft.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
arch/arm/mach-at91/clock.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c
index 528994f..c9c32b2 100644
--- a/arch/arm/mach-at91/clock.c
+++ b/arch/arm/mach-at91/clock.c
@@ -535,6 +535,7 @@ static void at91_upll_usbfs_clock_init(unsigned long main_clock)
}
static int pll_overclock = 0;
+static u32 cpu_freq = 0;
int at91_clock_init(unsigned long main_clock)
{
@@ -622,6 +623,8 @@ int at91_clock_init(unsigned long main_clock)
mck.rate_hz = freq / (1 << ((mckr & AT91_PMC_MDIV) >> 8)); /* mdiv */
}
+ cpu_freq = freq;
+
/* Register the PMC's standard clocks */
for (i = 0; i < ARRAY_SIZE(standard_pmc_clocks); i++)
at91_clk_add(standard_pmc_clocks[i]);
@@ -649,8 +652,8 @@ static int at91_clock_display(void)
if (pll_overclock)
pr_info("Clocks: PLLA overclocked, %ld MHz\n", plla.rate_hz / 1000000);
- printf("Clocks: CPU %lu MHz, master %u MHz, main %u.%03u MHz\n",
- mck.parent->rate_hz / 1000000, (unsigned) mck.rate_hz / 1000000,
+ printf("Clocks: CPU %u MHz, master %u MHz, main %u.%03u MHz\n",
+ cpu_freq / 1000000, (unsigned) mck.rate_hz / 1000000,
(unsigned) main_clk.rate_hz / 1000000,
((unsigned) main_clk.rate_hz % 1000000) / 1000);
--
1.7.5.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2011-09-16 12:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-16 12:23 [PATCH 1/7] arm: export arch_number to env Jean-Christophe PLAGNIOL-VILLARD
2011-09-16 12:23 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2011-09-16 12:23 ` [PATCH 3/7] at91: Fix uhpck clock rate in upll case Jean-Christophe PLAGNIOL-VILLARD
2011-09-16 12:23 ` [PATCH 4/7] at91/boards: switch to software ecc as in linux kernel Jean-Christophe PLAGNIOL-VILLARD
2011-09-19 9:18 ` Sascha Hauer
2011-09-19 9:37 ` Jean-Christophe PLAGNIOL-VILLARD
2011-09-16 12:23 ` [PATCH 5/7] resource: introduce add_generic_device_res to add multiple resource Jean-Christophe PLAGNIOL-VILLARD
2011-09-16 12:23 ` [PATCH 6/7] at91: nand switch ecc base to resource Jean-Christophe PLAGNIOL-VILLARD
2011-09-16 12:23 ` [PATCH 7/7] usb/core: make print dev like linux lsusb Jean-Christophe PLAGNIOL-VILLARD
2011-09-19 9:14 ` [PATCH 1/7] arm: export arch_number to env Sascha Hauer
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=1316175828-19748-2-git-send-email-plagnioj@jcrosoft.com \
--to=plagnioj@jcrosoft.com \
--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