From 6d0f6bcf337c5261c08fabe12982178c2c489d76 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Thu, 16 Oct 2008 15:01:15 +0200 Subject: rename CFG_ macros to CONFIG_SYS Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- cpu/mpc512x/speed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpu/mpc512x/speed.c') diff --git a/cpu/mpc512x/speed.c b/cpu/mpc512x/speed.c index e62477bc0b..baf6215418 100644 --- a/cpu/mpc512x/speed.c +++ b/cpu/mpc512x/speed.c @@ -62,13 +62,13 @@ static int sys_dividors[][2] = { int get_clocks (void) { - volatile immap_t *im = (immap_t *) CFG_IMMR; + volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR; u8 spmf; u8 cpmf; u8 sys_div; u8 ips_div; u8 pci_div; - u32 ref_clk = CFG_MPC512X_CLKIN; + u32 ref_clk = CONFIG_SYS_MPC512X_CLKIN; u32 spll; u32 sys_clk; u32 core_clk; -- cgit From 08ef89ecd174969b3544f3f0c7cd1de3c57f737b Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sun, 19 Oct 2008 02:35:49 +0200 Subject: Use strmhz() to format clock frequencies Signed-off-by: Wolfgang Denk --- cpu/mpc512x/speed.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'cpu/mpc512x/speed.c') 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; } -- cgit