]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
at91: move cpu info print to cpu
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Sun, 31 May 2009 12:53:18 +0000 (14:53 +0200)
committerWolfgang Denk <wd@denx.de>
Fri, 12 Jun 2009 18:45:46 +0000 (20:45 +0200)
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
board/ronetix/pm9263/pm9263.c
cpu/arm926ejs/at91/cpu.c
include/configs/pm9263.h

index d24ef9a76ee052342f2fab0336571f1012c3aa2e..d2598a06807f75548b958604ce25a3b41f9d5ba6 100644 (file)
@@ -382,15 +382,8 @@ int board_eth_init(bd_t *bis)
 int checkboard (void)
 {
        char *ss;
-       char buf[32];
 
        printf ("Board : Ronetix PM9263\n");
-       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()));
 
        switch (gd->fb_base) {
        case PHYS_PSRAM:
index 2ae97fe497c552a0c853f87b423996c35af9719a..f2f7b625509d9c153659ca8c87779d98df9b30f6 100644 (file)
  * 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
index d60c417a11315c166953fcbefc662b68206cc229..f0dbe81d140298e780a7b448662d7bd3d6213148 100644 (file)
@@ -29,6 +29,7 @@
 #define __CONFIG_H
 
 /* ARM asynchronous clock */
+#define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
 
 #define MASTER_PLL_DIV         15