summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2009-05-31 14:53:18 +0200
committerWolfgang Denk <wd@denx.de>2009-06-12 20:45:46 +0200
commitb2403589b4d9996394bafc73eca3623f43ac2c31 (patch)
tree59b97ba4801ba3e2a66929edf39d19dfa285048a /cpu
parentb32e189079fa16e1b647ac6b949fd4e0a9435343 (diff)
downloadu-boot-imx-b2403589b4d9996394bafc73eca3623f43ac2c31.zip
u-boot-imx-b2403589b4d9996394bafc73eca3623f43ac2c31.tar.gz
u-boot-imx-b2403589b4d9996394bafc73eca3623f43ac2c31.tar.bz2
at91: move cpu info print to cpu
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'cpu')
-rw-r--r--cpu/arm926ejs/at91/cpu.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/cpu/arm926ejs/at91/cpu.c b/cpu/arm926ejs/at91/cpu.c
index 2ae97fe..f2f7b62 100644
--- a/cpu/arm926ejs/at91/cpu.c
+++ b/cpu/arm926ejs/at91/cpu.c
@@ -21,17 +21,34 @@
* MA 02111-1307 USA
*/
-#include <config.h>
+#include <common.h>
#include <asm/arch/hardware.h>
#include <asm/arch/at91_pmc.h>
#include <asm/arch/clk.h>
#include <asm/arch/io.h>
+#ifndef AT91_MAIN_CLOCK
+#define AT91_MAIN_CLOCK 0
+#endif
+
int arch_cpu_init(void)
{
-#ifdef AT91_MAIN_CLOCK
return at91_clock_init(AT91_MAIN_CLOCK);
-#else
- return at91_clock_init(0);
-#endif
}
+
+#if defined(CONFIG_DISPLAY_CPUINFO)
+int print_cpuinfo(void)
+{
+ char buf[32];
+
+ printf("CPU: %s\n", AT91_CPU_NAME);
+ printf("Crystal frequency: %8s MHz\n",
+ strmhz(buf, get_main_clk_rate()));
+ printf("CPU clock : %8s MHz\n",
+ strmhz(buf, get_cpu_clk_rate()));
+ printf("Master clock : %8s MHz\n",
+ strmhz(buf, get_mck_clk_rate()));
+
+ return 0;
+}
+#endif