diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2011-07-25 09:28:39 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2011-07-29 08:53:39 -0500 |
commit | 8992738db72f817e99f25ec4c675e67d0e702a3d (patch) | |
tree | dc6c404038287ead5b3add299cd3f1bd81dde9a8 /arch/powerpc/cpu/mpc85xx | |
parent | 65bb8b060a873fa4f5188f2951081f6011259614 (diff) | |
download | u-boot-imx-8992738db72f817e99f25ec4c675e67d0e702a3d.zip u-boot-imx-8992738db72f817e99f25ec4c675e67d0e702a3d.tar.gz u-boot-imx-8992738db72f817e99f25ec4c675e67d0e702a3d.tar.bz2 |
powerpc/85xx: Cleanup handling of PVR detection for e500/e500mc/e5500
At some point we broke the detection of e500v1 class cores. Fix that
and simply the code to just utilize PVR_VER() to have a single case
statement.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/cpu/mpc85xx')
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/cpu.c | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index ce59c25..976e86e 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -46,7 +46,6 @@ int checkcpu (void) { sys_info_t sysinfo; uint pvr, svr; - uint fam; uint ver; uint major, minor; struct cpu_type *cpu; @@ -94,30 +93,25 @@ int checkcpu (void) printf(", Version: %d.%d, (0x%08x)\n", major, minor, svr); pvr = get_pvr(); - fam = PVR_FAM(pvr); ver = PVR_VER(pvr); major = PVR_MAJ(pvr); minor = PVR_MIN(pvr); printf("Core: "); - if (PVR_FAM(PVR_85xx)) { - switch(PVR_MEM(pvr)) { - case 0x1: - case 0x2: - puts("E500"); - break; - case 0x3: - puts("E500MC"); - break; - case 0x4: - puts("E5500"); - break; - default: - puts("Unknown"); - break; - } - } else { + switch(ver) { + case PVR_VER_E500_V1: + case PVR_VER_E500_V2: + puts("E500"); + break; + case PVR_VER_E500MC: + puts("E500MC"); + break; + case PVR_VER_E5500: + puts("E5500"); + break; + default: puts("Unknown"); + break; } printf(", Version: %d.%d, (0x%08x)\n", major, minor, pvr); |