From 36c728774edcfca54766f6828173fe24d3d8aa0b Mon Sep 17 00:00:00 2001 From: wdenk Date: Wed, 9 Jun 2004 17:45:32 +0000 Subject: * Patch by Mark Jonas, 08 June 2004: - Make MPC5200 boards evaluate the SVR to print processor name and version in checkcpu() (cpu/mpc5xxx/cpu.c). * Patch by Kai-Uwe Bloem, 06 May 2004: Fix endianess problem in cramfs code --- cpu/mpc5xxx/cpu.c | 20 ++++++++++++++++++-- cpu/mpc5xxx/start.S | 5 +++++ 2 files changed, 23 insertions(+), 2 deletions(-) (limited to 'cpu/mpc5xxx') diff --git a/cpu/mpc5xxx/cpu.c b/cpu/mpc5xxx/cpu.c index 7d6c0b6..2d695d1 100644 --- a/cpu/mpc5xxx/cpu.c +++ b/cpu/mpc5xxx/cpu.c @@ -37,12 +37,28 @@ int checkcpu (void) ulong clock = gd->cpu_clk; char buf[32]; +#ifndef CONFIG_MGT5100 + uint svr; +#endif puts ("CPU: "); - printf (CPU_ID_STR); - +#ifdef CONFIG_MGT5100 + puts (CPU_ID_STR); printf (" (JTAG ID %08lx)", *(vu_long *)MPC5XXX_CDM_JTAGID); +#else + svr = get_svr (); + switch (SVR_VER (svr)) { + case SVR_MPC5200: + printf ("MPC5200"); + break; + default: + printf ("MPC52?? (SVR %08x)", svr); + break; + } + + printf (" v%d.%d", SVR_MJREV (svr), SVR_MNREV (svr)); +#endif printf (" at %s MHz\n", strmhz (buf, clock)); diff --git a/cpu/mpc5xxx/start.S b/cpu/mpc5xxx/start.S index e12eee9..99cad9c 100644 --- a/cpu/mpc5xxx/start.S +++ b/cpu/mpc5xxx/start.S @@ -549,6 +549,11 @@ dcache_status: rlwinm r3, r3, HID0_DCE_BITPOS + 1, 31, 31 blr + .globl get_svr +get_svr: + mfspr r3, SVR + blr + .globl get_pvr get_pvr: mfspr r3, PVR -- cgit v1.1