summaryrefslogtreecommitdiff
path: root/cpu/mpc8xx/cpu.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-01-31 20:06:54 +0000
committerwdenk <wdenk>2004-01-31 20:06:54 +0000
commit75d1ea7f6aa00c280c495a1ff6502f091c4244fe (patch)
treebb1ee058f8886ae42cb85a6b2c82f3d6b18661bf /cpu/mpc8xx/cpu.c
parent6876609446980c3055bbd32c195a63330e21d8e6 (diff)
downloadu-boot-imx-75d1ea7f6aa00c280c495a1ff6502f091c4244fe.zip
u-boot-imx-75d1ea7f6aa00c280c495a1ff6502f091c4244fe.tar.gz
u-boot-imx-75d1ea7f6aa00c280c495a1ff6502f091c4244fe.tar.bz2
Fix variable CPU clock for MPC859/866 systems for low CPU clocks
Diffstat (limited to 'cpu/mpc8xx/cpu.c')
-rw-r--r--cpu/mpc8xx/cpu.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/cpu/mpc8xx/cpu.c b/cpu/mpc8xx/cpu.c
index 3fb97b0..81d2047 100644
--- a/cpu/mpc8xx/cpu.c
+++ b/cpu/mpc8xx/cpu.c
@@ -123,10 +123,22 @@ static int check_CPU (long clock, uint pvr, uint immr)
else
printf ("unknown M%s (0x%08x)", id_str, k);
- printf (" at %s MHz:", strmhz (buf, clock));
- printf (" %u kB I-Cache", checkicache () >> 10);
- printf (" %u kB D-Cache", checkdcache () >> 10);
+#if defined(CFG_866_CPUCLK_MIN) && defined(CFG_866_CPUCLK_MAX)
+ printf (" at %s MHz [%d.%d...%d.%d MHz]\n ",
+ strmhz (buf, clock),
+ CFG_866_CPUCLK_MIN / 1000000,
+ ((CFG_866_CPUCLK_MIN % 1000000) + 50000) / 100000,
+ CFG_866_CPUCLK_MAX / 1000000,
+ ((CFG_866_CPUCLK_MAX % 1000000) + 50000) / 100000
+ );
+#else
+ printf (" at %s MHz: ", strmhz (buf, clock));
+#endif
+ printf ("%u kB I-Cache %u kB D-Cache",
+ checkicache () >> 10,
+ checkdcache () >> 10
+ );
/* do we have a FEC (860T/P or 852/859/866)? */