]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
mpc83xx: replace elaborate boottime verbosity with 'clocks' command
authorKim Phillips <kim.phillips@freescale.com>
Mon, 30 Apr 2007 20:26:21 +0000 (15:26 -0500)
committerKim Phillips <kim.phillips@freescale.com>
Tue, 1 May 2007 17:08:36 +0000 (12:08 -0500)
and fix CPU: to align with Board: display text.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
cpu/mpc83xx/cpu.c
cpu/mpc83xx/speed.c
include/common.h
lib_ppc/board.c

index 332afaad9f585b8ef1c2cfe68adc2abc1d92ed43..e078f27a23d56e91dd8d8f59cf9e2b1552a8405a 100644 (file)
@@ -52,7 +52,7 @@ int checkcpu(void)
 
        immr = (immap_t *)CFG_IMMR;
 
-       puts("CPU: ");
+       puts("CPU:   ");
 
        switch (pvr & 0xffff0000) {
                case PVR_E300C1:
@@ -158,10 +158,12 @@ int checkcpu(void)
        /* Multiple revisons of 834x processors may have the same SPRIDR value.
         * So use PVR to identify the revision number.
         */
-       printf("Rev: %02x at %s MHz\n", PVR_MAJ(pvr)<<4 | PVR_MIN(pvr), strmhz(buf, clock));
+       printf("Rev: %02x at %s MHz", PVR_MAJ(pvr)<<4 | PVR_MIN(pvr), strmhz(buf, clock));
 #else
-       printf("Rev: %02x at %s MHz\n", spridr & 0x0000FFFF, strmhz(buf, clock));
+       printf("Rev: %02x at %s MHz", spridr & 0x0000FFFF, strmhz(buf, clock));
 #endif
+       printf(", CSB: %4d MHz\n", gd->csb_clk / 1000000);
+
        return 0;
 }
 
index 1a440310e5ed7eb5303108d0d3f2f0967f4faa3a..bf30616548e93812947f4a8c09d4c9c335bd621d 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <common.h>
 #include <mpc83xx.h>
+#include <command.h>
 #include <asm/processor.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -365,11 +366,11 @@ ulong get_bus_freq(ulong dummy)
        return gd->csb_clk;
 }
 
-int print_clock_conf(void)
+int do_clocks (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 {
        printf("Clock configuration:\n");
-       printf("  Coherent System Bus: %4d MHz\n", gd->csb_clk / 1000000);
        printf("  Core:                %4d MHz\n", gd->core_clk / 1000000);
+       printf("  Coherent System Bus: %4d MHz\n", gd->csb_clk / 1000000);
 #if defined(CONFIG_MPC8360) || defined(CONFIG_MPC832X)
        printf("  QE:                  %4d MHz\n", gd->qe_clk / 1000000);
        printf("  BRG:                 %4d MHz\n", gd->brg_clk / 1000000);
@@ -395,3 +396,8 @@ int print_clock_conf(void)
 #endif
        return 0;
 }
+
+U_BOOT_CMD(clocks, 1, 0, do_clocks,
+       "clocks  - print clock configuration\n",
+       "    clocks\n"
+);
index b162dbd7cfc421592dc3cf4afa37f5930113d36d..c4fc2b3448c8252475b25025c194d44a7d7aea3e 100644 (file)
@@ -440,8 +440,6 @@ int sdram_adjust_866 (void);
 int    adjust_sdram_tbs_8xx (void);
 #if defined(CONFIG_8260)
 int    prt_8260_clks (void);
-#elif defined(CONFIG_MPC83XX)
-int print_clock_conf(void);
 #elif defined(CONFIG_MPC5xxx)
 int    prt_mpc5xxx_clks (void);
 #endif
index 24e8e970b367f3c6e2707453161734d8619eb409..1e7f172d6710df8d26a99473adefa7adf3b8751a 100644 (file)
@@ -310,10 +310,6 @@ init_fnc_t *init_sequence[] = {
        prt_8260_clks,
 #endif /* CONFIG_8260 */
 
-#if defined(CONFIG_MPC83XX)
-       print_clock_conf,
-#endif
-
        checkcpu,
 #if defined(CONFIG_MPC5xxx)
        prt_mpc5xxx_clks,