Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 696c2b9f authored by Kumar Gala's avatar Kumar Gala Committed by Linus Torvalds
Browse files

[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: default avatarKumar Gala <kumar.gala@freescale.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 075d6eb1
Loading
Loading
Loading
Loading
+18 −19
Original line number Diff line number Diff line
@@ -221,6 +221,12 @@ int show_cpuinfo(struct seq_file *m, void *v)
			return err;
	}

	/* If we are a Freescale core do a simple check so
	 * we dont have to keep adding cases in the future */
	if ((PVR_VER(pvr) & 0x8000) == 0x8000) {
		maj = PVR_MAJ(pvr);
		min = PVR_MIN(pvr);
	} else {
		switch (PVR_VER(pvr)) {
			case 0x0020:	/* 403 family */
				maj = PVR_MAJ(pvr) + 1;
@@ -230,19 +236,12 @@ int show_cpuinfo(struct seq_file *m, void *v)
				maj = ((pvr >> 8) & 0xFF) - 1;
				min = pvr & 0xFF;
				break;
	case 0x8083:	/* e300 */
		maj = PVR_MAJ(pvr);
		min = PVR_MIN(pvr);
		break;
	case 0x8020:	/* e500 */
		maj = PVR_MAJ(pvr);
		min = PVR_MIN(pvr);
		break;
			default:
				maj = (pvr >> 8) & 0xFF;
				min = pvr & 0xFF;
				break;
		}
	}

	seq_printf(m, "revision\t: %hd.%hd (pvr %04x %04x)\n",
		   maj, min, PVR_VER(pvr), PVR_REV(pvr));