Merge branch 'master' of git://git.denx.de/u-boot-i2c
[oweals/u-boot.git] / include / asm-ppc / processor.h
index 5b506791a77a258a31262382f96c5851a43cd677..83e3581f39a463c66b48a8c1fd23595cb31ddc7b 100644 (file)
 /* e500 definitions */
 #define SPRN_L1CFG0    0x203   /* L1 Cache Configuration Register 0 */
 #define SPRN_L1CFG1    0x204   /* L1 Cache Configuration Register 1 */
+#define SPRN_L2CFG0    0x207   /* L2 Cache Configuration Register 0 */
 #define SPRN_L1CSR0    0x3f2   /* L1 Data Cache Control and Status Register 0 */
 #define   L1CSR0_CPE           0x00010000      /* Data Cache Parity Enable */
 #define   L1CSR0_DCFI          0x00000002      /* Data Cache Flash Invalidate */
 #define   L1CSR1_CPE           0x00010000      /* Instruction Cache Parity Enable */
 #define   L1CSR1_ICFI          0x00000002      /* Instruction Cache Flash Invalidate */
 #define   L1CSR1_ICE           0x00000001      /* Instruction Cache Enable */
-
+#define SPRN_L1CSR2    0x25e   /* L1 Data Cache Control and Status Register 2 */
+#define SPRN_L2CSR0    0x3f9   /* L2 Data Cache Control and Status Register 0 */
+#define   L2CSR0_L2E           0x80000000      /* L2 Cache Enable */
+#define   L2CSR0_L2PE          0x40000000      /* L2 Cache Parity/ECC Enable */
+#define   L2CSR0_L2WP          0x1c000000      /* L2 I/D Way Partioning */
+#define   L2CSR0_L2CM          0x03000000      /* L2 Cache Coherency Mode */
+#define   L2CSR0_L2FI          0x00200000      /* L2 Cache Flash Invalidate */
+#define   L2CSR0_L2IO          0x00100000      /* L2 Cache Instruction Only */
+#define   L2CSR0_L2DO          0x00010000      /* L2 Cache Data Only */
+#define   L2CSR0_L2REP         0x00003000      /* L2 Line Replacement Algo */
+#define   L2CSR0_L2FL          0x00000800      /* L2 Cache Flush */
+#define   L2CSR0_L2LFC         0x00000400      /* L2 Cache Lock Flash Clear */
+#define   L2CSR0_L2LOA         0x00000080      /* L2 Cache Lock Overflow Allocate */
+#define   L2CSR0_L2LO          0x00000020      /* L2 Cache Lock Overflow */
+#define SPRN_L2CSR1    0x3fa   /* L2 Data Cache Control and Status Register 1 */
+
+#define SPRN_TLB0CFG   0x2B0   /* TLB 0 Config Register */
+#define SPRN_TLB1CFG   0x2B1   /* TLB 1 Config Register */
 #define SPRN_MMUCSR0   0x3f4   /* MMU control and status register 0 */
 #define SPRN_MAS0      0x270   /* MMU Assist Register 0 */
 #define SPRN_MAS1      0x271   /* MMU Assist Register 1 */
 #define MCSRR1 SPRN_MCSRR1
 #define L1CSR0 SPRN_L1CSR0
 #define L1CSR1 SPRN_L1CSR1
+#define L1CSR2 SPRN_L1CSR2
 #define L1CFG0 SPRN_L1CFG0
 #define L1CFG1 SPRN_L1CFG1
+#define L2CFG0 SPRN_L2CFG0
+#define L2CSR0 SPRN_L2CSR0
+#define L2CSR1 SPRN_L2CSR1
 #define MCSR   SPRN_MCSR
 #define MMUCSR0        SPRN_MMUCSR0
 #define BUCSR  SPRN_BUCSR
 #define PVR_MAJ(pvr)   (((pvr) >>  4) & 0xF)   /* Major revision field */
 #define PVR_MIN(pvr)   (((pvr) >>  0) & 0xF)   /* Minor revision field */
 
+/* e600 core PVR fields */
+
+#define PVR_E600_VER(pvr)      (((pvr) >> 15) & 0xFFFF) /* Version/type */
+#define PVR_E600_TECH(pvr)     (((pvr) >> 12) & 0xF)    /* Technology */
+#define PVR_E600_MAJ(pvr)      (((pvr) >> 8) & 0xF)     /* Major revision */
+#define PVR_E600_MIN(pvr)      (((pvr) >> 0) & 0xFF)    /* Minor revision */
+
 /* Processor Version Numbers */
 
 #define PVR_403GA      0x00200000
 #define PVR_460EX_RA   0x130218A3 /* 460EX rev A without Security Engine */
 #define PVR_460GT_SE_RA        0x130218A0 /* 460GT rev A with Security Engine    */
 #define PVR_460GT_RA   0x130218A1 /* 460GT rev A without Security Engine */
+#define PVR_460SX_RA    0x13541800 /* 460SX rev A                   */
+#define PVR_460SX_RA_V1 0x13541801 /* 460SX rev A Variant 1 Security disabled */
+#define PVR_460GX_RA    0x13541802 /* 460GX rev A                   */
+#define PVR_460GX_RA_V1 0x13541803 /* 460GX rev A Variant 1 Security disabled */
 #define PVR_601                0x00010000
 #define PVR_602                0x00050000
 #define PVR_603                0x00030000
 #define PVR_85xx_REV2  (PVR_85xx | 0x0020)
 
 #define PVR_86xx       0x80040000
-#define PVR_86xx_REV1  (PVR_86xx | 0x0010)
+
+#define PVR_VIRTEX5     0x7ff21912
 
 /*
  * For the 8xx processors, all of them report the same PVR family for
 /* Some parts define SVR[0:23] as the SOC version */
 #define SVR_SOC_VER(svr) (((svr) >> 8) & 0xFFFFFF)     /* SOC Version fields */
 
+/* whether MPC8xxxE (i.e. has SEC) */
+#if defined(CONFIG_MPC85xx)
+#define IS_E_PROCESSOR(svr)    (svr & 0x80000)
+#else
+#if defined(CONFIG_MPC83XX)
+#define IS_E_PROCESSOR(spridr) (!(spridr & 0x00010000))
+#endif
+#endif
+
 /*
  * SVR_SOC_VER() Version Values
  */
 
 #define SVR_8533       0x803400
 #define SVR_8533_E     0x803C00
+#define SVR_8536       0x803700
+#define SVR_8536_E     0x803F00
 #define SVR_8540       0x803000
 #define SVR_8541       0x807200
 #define SVR_8541_E     0x807A00
 #define SVR_8567_E     0x807E00
 #define SVR_8568       0x807500
 #define SVR_8568_E     0x807D00
+#define SVR_8569       0x808000
+#define SVR_8569_E     0x808800
 #define SVR_8572       0x80E000
 #define SVR_8572_E     0x80E800
+#define SVR_P2020      0x80E200
+#define SVR_P2020_E    0x80EA00
 
 #define SVR_8610       0x80A000
 #define SVR_8641       0x809000
@@ -970,8 +1019,15 @@ struct cpu_type {
 
 struct cpu_type *identify_cpu(u32 ver);
 
+#if defined(CONFIG_MPC85xx)
 #define CPU_TYPE_ENTRY(n, v) \
        { .name = #n, .soc_ver = SVR_##v, }
+#else
+#if defined(CONFIG_MPC83XX)
+#define CPU_TYPE_ENTRY(x) {#x, SPR_##x}
+#endif
+#endif
+
 
 #ifndef CONFIG_MACH_SPECIFIC
 extern int _machine;