summaryrefslogtreecommitdiff
path: root/include/mpc83xx.h
diff options
context:
space:
mode:
authorKim Phillips <kim.phillips@freescale.com>2008-03-28 10:19:07 -0500
committerKim Phillips <kim.phillips@freescale.com>2008-03-28 16:01:06 -0500
commite5c4ade4db1e16d3e5d4a7887f34e10e516ed3a9 (patch)
tree2c75761816373aa02a3e9a5e369f74a4fba4c911 /include/mpc83xx.h
parent81fd52c6c8fd19f0b7856b98217ce37c46c521af (diff)
downloadu-boot-imx-e5c4ade4db1e16d3e5d4a7887f34e10e516ed3a9.zip
u-boot-imx-e5c4ade4db1e16d3e5d4a7887f34e10e516ed3a9.tar.gz
u-boot-imx-e5c4ade4db1e16d3e5d4a7887f34e10e516ed3a9.tar.bz2
mpc83xx: cleanup System Part and Revision ID Register (SPRIDR) code
in the spirit of commit 1ced121600b2060ab2ff9f0fddd9421fd70a0dc6, 85xx's "Update SVR numbers to expand support", simplify SPRIDR processing and processor ID display. Add REVID_{MAJ,MIN}OR macros to make REVID dependent code simpler. Also added PARTID_NO_E and IS_E_PROCESSOR convenience macros. Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Diffstat (limited to 'include/mpc83xx.h')
-rw-r--r--include/mpc83xx.h95
1 files changed, 30 insertions, 65 deletions
diff --git a/include/mpc83xx.h b/include/mpc83xx.h
index 4ee38aa..d2e1e2b 100644
--- a/include/mpc83xx.h
+++ b/include/mpc83xx.h
@@ -48,71 +48,36 @@
/* SPRIDR - System Part and Revision ID Register
*/
-#define SPRIDR_PARTID 0xFFFF0000 /* Part Identification */
-#define SPRIDR_REVID 0x0000FFFF /* Revision Identification */
-
-#define SPR_8349E_REV10 0x80300100
-#define SPR_8349_REV10 0x80310100
-#define SPR_8347E_REV10_TBGA 0x80320100
-#define SPR_8347_REV10_TBGA 0x80330100
-#define SPR_8347E_REV10_PBGA 0x80340100
-#define SPR_8347_REV10_PBGA 0x80350100
-#define SPR_8343E_REV10 0x80360100
-#define SPR_8343_REV10 0x80370100
-
-#define SPR_8349E_REV11 0x80300101
-#define SPR_8349_REV11 0x80310101
-#define SPR_8347E_REV11_TBGA 0x80320101
-#define SPR_8347_REV11_TBGA 0x80330101
-#define SPR_8347E_REV11_PBGA 0x80340101
-#define SPR_8347_REV11_PBGA 0x80350101
-#define SPR_8343E_REV11 0x80360101
-#define SPR_8343_REV11 0x80370101
-
-#define SPR_8349E_REV31 0x80300300
-#define SPR_8349_REV31 0x80310300
-#define SPR_8347E_REV31_TBGA 0x80320300
-#define SPR_8347_REV31_TBGA 0x80330300
-#define SPR_8347E_REV31_PBGA 0x80340300
-#define SPR_8347_REV31_PBGA 0x80350300
-#define SPR_8343E_REV31 0x80360300
-#define SPR_8343_REV31 0x80370300
-
-#define SPR_8360E_REV10 0x80480010
-#define SPR_8360_REV10 0x80490010
-#define SPR_8360E_REV11 0x80480011
-#define SPR_8360_REV11 0x80490011
-#define SPR_8360E_REV12 0x80480012
-#define SPR_8360_REV12 0x80490012
-#define SPR_8360E_REV20 0x80480020
-#define SPR_8360_REV20 0x80490020
-#define SPR_8360E_REV21 0x80480021
-#define SPR_8360_REV21 0x80490021
-
-#define SPR_8323E_REV10 0x80620010
-#define SPR_8323_REV10 0x80630010
-#define SPR_8321E_REV10 0x80660010
-#define SPR_8321_REV10 0x80670010
-#define SPR_8323E_REV11 0x80620011
-#define SPR_8323_REV11 0x80630011
-#define SPR_8321E_REV11 0x80660011
-#define SPR_8321_REV11 0x80670011
-
-#define SPR_8313E_REV10 0x80B00010
-#define SPR_8313_REV10 0x80B10010
-#define SPR_8311E_REV10 0x80B20010
-#define SPR_8311_REV10 0x80B30010
-#define SPR_8315E_REV10 0x80B40010
-#define SPR_8315_REV10 0x80B50010
-#define SPR_8314E_REV10 0x80B60010
-#define SPR_8314_REV10 0x80B70010
-
-#define SPR_8379E_REV10 0x80C20010
-#define SPR_8379_REV10 0x80C30010
-#define SPR_8378E_REV10 0x80C40010
-#define SPR_8378_REV10 0x80C50010
-#define SPR_8377E_REV10 0x80C60010
-#define SPR_8377_REV10 0x80C70010
+#define SPRIDR_PARTID 0xFFFF0000 /* Part Id */
+#define SPRIDR_REVID 0x0000FFFF /* Revision Id */
+
+#if defined(CONFIG_MPC834X)
+#define REVID_MAJOR(spridr) ((spridr & 0x0000FF00) >> 8)
+#define REVID_MINOR(spridr) (spridr & 0x000000FF)
+#else
+#define REVID_MAJOR(spridr) ((spridr & 0x000000F0) >> 4)
+#define REVID_MINOR(spridr) (spridr & 0x0000000F)
+#endif
+
+#define PARTID_NO_E(spridr) ((spridr & 0xFFFE0000) >> 16)
+#define IS_E_PROCESSOR(spridr) (!(spridr & 0x00010000)) /* has SEC */
+
+#define SPR_8311 0x80B2
+#define SPR_8313 0x80B0
+#define SPR_8314 0x80B6
+#define SPR_8315 0x80B4
+#define SPR_8321 0x8066
+#define SPR_8323 0x8062
+#define SPR_8343 0x8036
+#define SPR_8347_TBGA_ 0x8032
+#define SPR_8347_PBGA_ 0x8034
+#define SPR_8349 0x8030
+#define SPR_8358_TBGA_ 0x804A
+#define SPR_8358_PBGA_ 0x804E
+#define SPR_8360 0x8048
+#define SPR_8377 0x80C6
+#define SPR_8378 0x80C4
+#define SPR_8379 0x80C2
/* SPCR - System Priority Configuration Register
*/