]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/ppc4xx.h
ppc4xx: Enable Primordial Stack for 40x and Unify ECC Handling
[karo-tx-uboot.git] / include / ppc4xx.h
index 76fe8727f5646e2879bc2f5341a345f62be81e58..4a6eb86f419e096026d1928f43bb27388e57c38b 100644 (file)
 #include <ppc405.h>
 #endif
 
+/*
+ * Macro for generating register field mnemonics
+ */
+#define        PPC_REG_BITS            32
+#define        PPC_REG_VAL(bit, value) ((value) << ((PPC_REG_BITS - 1) - (bit)))
+
+/*
+ * Elide casts when assembling register mnemonics
+ */
+#ifndef __ASSEMBLY__
+#define        static_cast(type, val)  (type)(val)
+#else
+#define        static_cast(type, val)  (val)
+#endif
+
 /*
  * Common stuff for 4xx (405 and 440)
  */