summaryrefslogtreecommitdiffstats
path: root/cpu/mpc512x
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-10-19 02:35:49 +0200
committerWolfgang Denk <wd@denx.de>2008-10-21 11:25:38 +0200
commit08ef89ecd174969b3544f3f0c7cd1de3c57f737b (patch)
tree3c4f9b6df2d712f18b25733a4648a14eea291bfe /cpu/mpc512x
parentd50c7d4be150b2252c0d2e16cfcf69643bdd6dc9 (diff)
downloadblackbird-obmc-uboot-08ef89ecd174969b3544f3f0c7cd1de3c57f737b.tar.gz
blackbird-obmc-uboot-08ef89ecd174969b3544f3f0c7cd1de3c57f737b.zip
Use strmhz() to format clock frequencies
Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'cpu/mpc512x')
-rw-r--r--cpu/mpc512x/cpu.c7
-rw-r--r--cpu/mpc512x/speed.c12
2 files changed, 11 insertions, 8 deletions
diff --git a/cpu/mpc512x/cpu.c b/cpu/mpc512x/cpu.c
index 9b5973803d..b9069b065e 100644
--- a/cpu/mpc512x/cpu.c
+++ b/cpu/mpc512x/cpu.c
@@ -45,7 +45,7 @@ int checkcpu (void)
ulong clock = gd->cpu_clk;
u32 pvr = get_pvr ();
u32 spridr = immr->sysconf.spridr;
- char buf[32];
+ char buf1[32], buf2[32];
puts ("CPU: ");
@@ -65,8 +65,9 @@ int checkcpu (void)
default:
puts ("unknown ");
}
- printf ("at %s MHz, CSB at %3d MHz\n", strmhz(buf, clock),
- gd->csb_clk / 1000000);
+ printf ("at %s MHz, CSB at %s MHz\n",
+ strmhz(buf1, clock),
+ strmhz(buf2, gd->csb_clk) );
return 0;
}
diff --git a/cpu/mpc512x/speed.c b/cpu/mpc512x/speed.c
index baf6215418..542bf21c77 100644
--- a/cpu/mpc512x/speed.c
+++ b/cpu/mpc512x/speed.c
@@ -125,12 +125,14 @@ ulong get_bus_freq (ulong dummy)
int do_clocks (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
{
+ char buf[32];
+
printf("Clock configuration:\n");
- printf(" CPU: %4ld MHz\n", gd->cpu_clk / 1000000);
- printf(" Coherent System Bus: %4d MHz\n", gd->csb_clk / 1000000);
- printf(" IPS Bus: %4d MHz\n", gd->ips_clk / 1000000);
- printf(" PCI: %4d MHz\n", gd->pci_clk / 1000000);
- printf(" DDR: %4d MHz\n", 2 * gd->csb_clk / 1000000);
+ printf(" CPU: %-4s MHz\n", strmhz(buf, gd->cpu_clk));
+ printf(" Coherent System Bus: %-4s MHz\n", strmhz(buf, gd->csb_clk));
+ printf(" IPS Bus: %-4s MHz\n", strmhz(buf, gd->ips_clk));
+ printf(" PCI: %-4s MHz\n", strmhz(buf, gd->pci_clk));
+ printf(" DDR: %-4s MHz\n", strmhz(buf, 2*gd->csb_clk));
return 0;
}
OpenPOWER on IntegriCloud