[rtems commit] bsps/powerpc: Fix e200 check

Sebastian Huber sebh at rtems.org
Wed Feb 6 14:31:40 UTC 2013


Module:    rtems
Branch:    master
Commit:    302061471cbe17b0869cc9bd9de48372a4f16fa3
Changeset: http://git.rtems.org/rtems/commit/?id=302061471cbe17b0869cc9bd9de48372a4f16fa3

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Feb  5 16:59:36 2013 +0100

bsps/powerpc: Fix e200 check

---

 c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h
index 8087767..cb9607e 100644
--- a/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h
+++ b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h
@@ -57,7 +57,7 @@ typedef enum
   PPC_e300c3  = 0x8085, /* e300c3  core */
   PPC_e200z0  = 0x8170,
   PPC_e200z1  = 0x8140,
-  PPC_e200z4  = 0x8155,
+  PPC_e200z4  = 0x8150,
   PPC_e200z6  = 0x8110,
   PPC_e200z7  = 0x8160,
   PPC_PSIM    = 0xfffe,  /* GDB PowerPC simulator -- fake version */
@@ -121,9 +121,7 @@ static inline ppc_cpu_id_t ppc_cpu_current(void)
 
 static inline bool ppc_cpu_is_e200(void)
 {
-	return ppc_cpu_current() == PPC_e200z0
-		|| ppc_cpu_current() == PPC_e200z1
-		|| ppc_cpu_current() == PPC_e200z6;
+	return (ppc_cpu_current() & 0xff80) == 0x8100;
 }
 
 static inline bool ppc_cpu_is_e300(void)




More information about the vc mailing list