]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/asm-mips/cpu.h
[MIPS] Clean up asm-mips/mach-generic/spaces.h
[karo-tx-linux.git] / include / asm-mips / cpu.h
index dff2a0a52f8f300e6979b79a2848c88c71b42cd6..2924069075e0a3b3a3342868d593de128ed880cc 100644 (file)
 #define PRID_REV_VR4181A       0x0070  /* Same as VR4122 */
 #define PRID_REV_VR4130                0x0080
 
+/*
+ * Older processors used to encode processor version and revision in two
+ * 4-bit bitfields, the 4K seems to simply count up and even newer MTI cores
+ * have switched to use the 8-bits as 3:3:2 bitfield with the last field as
+ * the patch number.  *ARGH*
+ */
+#define PRID_REV_ENCODE_44(ver, rev)                                   \
+       ((ver) << 4 | (rev))
+#define PRID_REV_ENCODE_332(ver, rev, patch)                           \
+       ((ver) << 5 | (rev) << 2 | (patch))
+
 /*
  * FPU implementation/revision register (CP1 control register 0).
  *
 #define MIPS_CPU_EJTAG         0x00008000 /* EJTAG exception */
 #define MIPS_CPU_NOFPUEX       0x00010000 /* no FPU exception */
 #define MIPS_CPU_LLSC          0x00020000 /* CPU has ll/sc instructions */
-#define MIPS_CPU_SUBSET_CACHES 0x00040000 /* P-cache subset enforced */
+#define MIPS_CPU_INCLUSIVE_CACHES      0x00040000 /* P-cache subset enforced */
 #define MIPS_CPU_PREFETCH      0x00080000 /* CPU has usable prefetch */
 #define MIPS_CPU_VINT          0x00100000 /* CPU supports MIPSR2 vectored interrupts */
 #define MIPS_CPU_VEIC          0x00200000 /* CPU supports MIPSR2 external interrupt controller mode */