]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-powerpc/asm-compat.h
i2c: Convert the pca9539 driver to a new-style i2c driver
[linux-2.6-omap-h63xx.git] / include / asm-powerpc / asm-compat.h
index 8b133efc9f7916ef76228e0048091cd870551d5d..8ec2e1da68bf7573f99cf68697b3bf0d54cf2b73 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef _ASM_POWERPC_ASM_COMPAT_H
 #define _ASM_POWERPC_ASM_COMPAT_H
 
-#include <linux/config.h>
 #include <asm/types.h>
 
 #ifdef __ASSEMBLY__
@@ -15,6 +14,7 @@
 #  define ASM_CONST(x)         __ASM_CONST(x)
 #endif
 
+
 #ifdef __powerpc64__
 
 /* operations for longs and pointers */
 #define PPC_STLCX      stringify_in_c(stdcx.)
 #define PPC_CNTLZL     stringify_in_c(cntlzd)
 
+/* Move to CR, single-entry optimized version. Only available
+ * on POWER4 and later.
+ */
+#ifdef CONFIG_POWER4_ONLY
+#define PPC_MTOCRF     stringify_in_c(mtocrf)
+#else
+#define PPC_MTOCRF     stringify_in_c(mtcrf)
+#endif
+
 #else /* 32-bit */
 
 /* operations for longs and pointers */
 #define PPC_LLARX      stringify_in_c(lwarx)
 #define PPC_STLCX      stringify_in_c(stwcx.)
 #define PPC_CNTLZL     stringify_in_c(cntlzw)
+#define PPC_MTOCRF     stringify_in_c(mtcrf)
 
 #endif
 
+#ifdef __KERNEL__
 #ifdef CONFIG_IBM405_ERR77
 /* Erratum #77 on the 405 means we need a sync or dcbt before every
  * stwcx.  The old ATOMIC_SYNC_FIX covered some but not all of this.
@@ -51,5 +62,6 @@
 #define PPC405_ERR77(ra,rb)
 #define PPC405_ERR77_SYNC
 #endif
+#endif
 
 #endif /* _ASM_POWERPC_ASM_COMPAT_H */