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/mpc5xxx/speed.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cpu/mpc5xxx/speed.c') diff --git a/cpu/mpc5xxx/speed.c b/cpu/mpc5xxx/speed.c index 7847adc..0e3e552 100644 --- a/cpu/mpc5xxx/speed.c +++ b/cpu/mpc5xxx/speed.c @@ -47,15 +47,15 @@ int get_clocks (void) { ulong val, vco; -#if !defined(CFG_MPC5XXX_CLKIN) -#error clock measuring not implemented yet - define CFG_MPC5XXX_CLKIN +#if !defined(CONFIG_SYS_MPC5XXX_CLKIN) +#error clock measuring not implemented yet - define CONFIG_SYS_MPC5XXX_CLKIN #endif val = *(vu_long *)MPC5XXX_CDM_PORCFG; if (val & (1 << 6)) { - vco = CFG_MPC5XXX_CLKIN * 12; + vco = CONFIG_SYS_MPC5XXX_CLKIN * 12; } else { - vco = CFG_MPC5XXX_CLKIN * 16; + vco = CONFIG_SYS_MPC5XXX_CLKIN * 16; } if (val & (1 << 5)) { gd->bus_clk = vco / 8; -- cgit v1.1 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/mpc5xxx/speed.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'cpu/mpc5xxx/speed.c') diff --git a/cpu/mpc5xxx/speed.c b/cpu/mpc5xxx/speed.c index 0e3e552..8027d3e 100644 --- a/cpu/mpc5xxx/speed.c +++ b/cpu/mpc5xxx/speed.c @@ -81,10 +81,13 @@ int get_clocks (void) int prt_mpc5xxx_clks (void) { - printf(" Bus %ld MHz, IPB %ld MHz, PCI %ld MHz\n", - gd->bus_clk / 1000000, gd->ipb_clk / 1000000, - gd->pci_clk / 1000000); + char buf1[32], buf2[32], buf3[32]; + printf (" Bus %s MHz, IPB %s MHz, PCI %s MHz\n", + strmhz(buf1, gd->bus_clk), + strmhz(buf2, gd->ipb_clk), + strmhz(buf3, gd->pci_clk) + ); return (0); } -- cgit v1.1