aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKumar Gala <galak@freescale.com>2005-05-05 19:15:10 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-05 19:36:32 -0400
commit696c2b9f97c2439e9fb299650041ec750df46865 (patch)
tree09a2c0df780b1739324f25c9ee19e00334d37b30
parent075d6eb16d273dab7b7b4b83fcee8bce4ee387ed (diff)
[PATCH] ppc32: Simplified PPC core revision report
We can identify new Freescale PPC cores by the fact that the MSB of the PVR is set. If we are a new Freescale core the decode of major/minor revision numbers is simplified so we dont have to add new case checks for a every new Freescale core. Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/ppc/kernel/setup.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
index e97ce635b99e..5dfb42f1a152 100644
--- a/arch/ppc/kernel/setup.c
+++ b/arch/ppc/kernel/setup.c
@@ -221,27 +221,26 @@ int show_cpuinfo(struct seq_file *m, void *v)
221 return err; 221 return err;
222 } 222 }
223 223
224 switch (PVR_VER(pvr)) { 224 /* If we are a Freescale core do a simple check so
225 case 0x0020: /* 403 family */ 225 * we dont have to keep adding cases in the future */
226 maj = PVR_MAJ(pvr) + 1; 226 if ((PVR_VER(pvr) & 0x8000) == 0x8000) {
227 min = PVR_MIN(pvr);
228 break;
229 case 0x1008: /* 740P/750P ?? */
230 maj = ((pvr >> 8) & 0xFF) - 1;
231 min = pvr & 0xFF;
232 break;
233 case 0x8083: /* e300 */
234 maj = PVR_MAJ(pvr);
235 min = PVR_MIN(pvr);
236 break;
237 case 0x8020: /* e500 */
238 maj = PVR_MAJ(pvr); 227 maj = PVR_MAJ(pvr);
239 min = PVR_MIN(pvr); 228 min = PVR_MIN(pvr);
240 break; 229 } else {
241 default: 230 switch (PVR_VER(pvr)) {
242 maj = (pvr >> 8) & 0xFF; 231 case 0x0020: /* 403 family */
243 min = pvr & 0xFF; 232 maj = PVR_MAJ(pvr) + 1;
244 break; 233 min = PVR_MIN(pvr);
234 break;
235 case 0x1008: /* 740P/750P ?? */
236 maj = ((pvr >> 8) & 0xFF) - 1;
237 min = pvr & 0xFF;
238 break;
239 default:
240 maj = (pvr >> 8) & 0xFF;
241 min = pvr & 0xFF;
242 break;
243 }
245 } 244 }
246 245
247 seq_printf(m, "revision\t: %hd.%hd (pvr %04x %04x)\n", 246 seq_printf(m, "revision\t: %hd.%hd (pvr %04x %04x)\n",