diff options
Diffstat (limited to 'arch/arc/include/asm/arcregs.h')
-rw-r--r-- | arch/arc/include/asm/arcregs.h | 127 |
1 files changed, 10 insertions, 117 deletions
diff --git a/arch/arc/include/asm/arcregs.h b/arch/arc/include/asm/arcregs.h index 1b907c465666..355cb470c2a4 100644 --- a/arch/arc/include/asm/arcregs.h +++ b/arch/arc/include/asm/arcregs.h | |||
@@ -20,7 +20,6 @@ | |||
20 | #define ARC_REG_PERIBASE_BCR 0x69 | 20 | #define ARC_REG_PERIBASE_BCR 0x69 |
21 | #define ARC_REG_FP_BCR 0x6B /* Single-Precision FPU */ | 21 | #define ARC_REG_FP_BCR 0x6B /* Single-Precision FPU */ |
22 | #define ARC_REG_DPFP_BCR 0x6C /* Dbl Precision FPU */ | 22 | #define ARC_REG_DPFP_BCR 0x6C /* Dbl Precision FPU */ |
23 | #define ARC_REG_MMU_BCR 0x6f | ||
24 | #define ARC_REG_DCCM_BCR 0x74 /* DCCM Present + SZ */ | 23 | #define ARC_REG_DCCM_BCR 0x74 /* DCCM Present + SZ */ |
25 | #define ARC_REG_TIMERS_BCR 0x75 | 24 | #define ARC_REG_TIMERS_BCR 0x75 |
26 | #define ARC_REG_ICCM_BCR 0x78 | 25 | #define ARC_REG_ICCM_BCR 0x78 |
@@ -34,22 +33,12 @@ | |||
34 | #define ARC_REG_D_UNCACH_BCR 0x6A | 33 | #define ARC_REG_D_UNCACH_BCR 0x6A |
35 | 34 | ||
36 | /* status32 Bits Positions */ | 35 | /* status32 Bits Positions */ |
37 | #define STATUS_H_BIT 0 /* CPU Halted */ | ||
38 | #define STATUS_E1_BIT 1 /* Int 1 enable */ | ||
39 | #define STATUS_E2_BIT 2 /* Int 2 enable */ | ||
40 | #define STATUS_A1_BIT 3 /* Int 1 active */ | ||
41 | #define STATUS_A2_BIT 4 /* Int 2 active */ | ||
42 | #define STATUS_AE_BIT 5 /* Exception active */ | 36 | #define STATUS_AE_BIT 5 /* Exception active */ |
43 | #define STATUS_DE_BIT 6 /* PC is in delay slot */ | 37 | #define STATUS_DE_BIT 6 /* PC is in delay slot */ |
44 | #define STATUS_U_BIT 7 /* User/Kernel mode */ | 38 | #define STATUS_U_BIT 7 /* User/Kernel mode */ |
45 | #define STATUS_L_BIT 12 /* Loop inhibit */ | 39 | #define STATUS_L_BIT 12 /* Loop inhibit */ |
46 | 40 | ||
47 | /* These masks correspond to the status word(STATUS_32) bits */ | 41 | /* These masks correspond to the status word(STATUS_32) bits */ |
48 | #define STATUS_H_MASK (1<<STATUS_H_BIT) | ||
49 | #define STATUS_E1_MASK (1<<STATUS_E1_BIT) | ||
50 | #define STATUS_E2_MASK (1<<STATUS_E2_BIT) | ||
51 | #define STATUS_A1_MASK (1<<STATUS_A1_BIT) | ||
52 | #define STATUS_A2_MASK (1<<STATUS_A2_BIT) | ||
53 | #define STATUS_AE_MASK (1<<STATUS_AE_BIT) | 42 | #define STATUS_AE_MASK (1<<STATUS_AE_BIT) |
54 | #define STATUS_DE_MASK (1<<STATUS_DE_BIT) | 43 | #define STATUS_DE_MASK (1<<STATUS_DE_BIT) |
55 | #define STATUS_U_MASK (1<<STATUS_U_BIT) | 44 | #define STATUS_U_MASK (1<<STATUS_U_BIT) |
@@ -71,6 +60,7 @@ | |||
71 | #define ECR_V_ITLB_MISS 0x21 | 60 | #define ECR_V_ITLB_MISS 0x21 |
72 | #define ECR_V_DTLB_MISS 0x22 | 61 | #define ECR_V_DTLB_MISS 0x22 |
73 | #define ECR_V_PROTV 0x23 | 62 | #define ECR_V_PROTV 0x23 |
63 | #define ECR_V_TRAP 0x25 | ||
74 | 64 | ||
75 | /* Protection Violation Exception Cause Code Values */ | 65 | /* Protection Violation Exception Cause Code Values */ |
76 | #define ECR_C_PROTV_INST_FETCH 0x00 | 66 | #define ECR_C_PROTV_INST_FETCH 0x00 |
@@ -79,94 +69,23 @@ | |||
79 | #define ECR_C_PROTV_XCHG 0x03 | 69 | #define ECR_C_PROTV_XCHG 0x03 |
80 | #define ECR_C_PROTV_MISALIG_DATA 0x04 | 70 | #define ECR_C_PROTV_MISALIG_DATA 0x04 |
81 | 71 | ||
72 | #define ECR_C_BIT_PROTV_MISALIG_DATA 10 | ||
73 | |||
74 | /* Machine Check Cause Code Values */ | ||
75 | #define ECR_C_MCHK_DUP_TLB 0x01 | ||
76 | |||
82 | /* DTLB Miss Exception Cause Code Values */ | 77 | /* DTLB Miss Exception Cause Code Values */ |
83 | #define ECR_C_BIT_DTLB_LD_MISS 8 | 78 | #define ECR_C_BIT_DTLB_LD_MISS 8 |
84 | #define ECR_C_BIT_DTLB_ST_MISS 9 | 79 | #define ECR_C_BIT_DTLB_ST_MISS 9 |
85 | 80 | ||
81 | /* Dummy ECR values for Interrupts */ | ||
82 | #define event_IRQ1 0x0031abcd | ||
83 | #define event_IRQ2 0x0032abcd | ||
86 | 84 | ||
87 | /* Auxiliary registers */ | 85 | /* Auxiliary registers */ |
88 | #define AUX_IDENTITY 4 | 86 | #define AUX_IDENTITY 4 |
89 | #define AUX_INTR_VEC_BASE 0x25 | 87 | #define AUX_INTR_VEC_BASE 0x25 |
90 | #define AUX_IRQ_LEV 0x200 /* IRQ Priority: L1 or L2 */ | ||
91 | #define AUX_IRQ_HINT 0x201 /* For generating Soft Interrupts */ | ||
92 | #define AUX_IRQ_LV12 0x43 /* interrupt level register */ | ||
93 | |||
94 | #define AUX_IENABLE 0x40c | ||
95 | #define AUX_ITRIGGER 0x40d | ||
96 | #define AUX_IPULSE 0x415 | ||
97 | |||
98 | /* Timer related Aux registers */ | ||
99 | #define ARC_REG_TIMER0_LIMIT 0x23 /* timer 0 limit */ | ||
100 | #define ARC_REG_TIMER0_CTRL 0x22 /* timer 0 control */ | ||
101 | #define ARC_REG_TIMER0_CNT 0x21 /* timer 0 count */ | ||
102 | #define ARC_REG_TIMER1_LIMIT 0x102 /* timer 1 limit */ | ||
103 | #define ARC_REG_TIMER1_CTRL 0x101 /* timer 1 control */ | ||
104 | #define ARC_REG_TIMER1_CNT 0x100 /* timer 1 count */ | ||
105 | |||
106 | #define TIMER_CTRL_IE (1 << 0) /* Interupt when Count reachs limit */ | ||
107 | #define TIMER_CTRL_NH (1 << 1) /* Count only when CPU NOT halted */ | ||
108 | |||
109 | /* MMU Management regs */ | ||
110 | #define ARC_REG_TLBPD0 0x405 | ||
111 | #define ARC_REG_TLBPD1 0x406 | ||
112 | #define ARC_REG_TLBINDEX 0x407 | ||
113 | #define ARC_REG_TLBCOMMAND 0x408 | ||
114 | #define ARC_REG_PID 0x409 | ||
115 | #define ARC_REG_SCRATCH_DATA0 0x418 | ||
116 | |||
117 | /* Bits in MMU PID register */ | ||
118 | #define MMU_ENABLE (1 << 31) /* Enable MMU for process */ | ||
119 | |||
120 | /* Error code if probe fails */ | ||
121 | #define TLB_LKUP_ERR 0x80000000 | ||
122 | |||
123 | /* TLB Commands */ | ||
124 | #define TLBWrite 0x1 | ||
125 | #define TLBRead 0x2 | ||
126 | #define TLBGetIndex 0x3 | ||
127 | #define TLBProbe 0x4 | ||
128 | |||
129 | #if (CONFIG_ARC_MMU_VER >= 2) | ||
130 | #define TLBWriteNI 0x5 /* write JTLB without inv uTLBs */ | ||
131 | #define TLBIVUTLB 0x6 /* explicitly inv uTLBs */ | ||
132 | #else | ||
133 | #undef TLBWriteNI /* These cmds don't exist on older MMU */ | ||
134 | #undef TLBIVUTLB | ||
135 | #endif | ||
136 | 88 | ||
137 | /* Instruction cache related Auxiliary registers */ | ||
138 | #define ARC_REG_IC_BCR 0x77 /* Build Config reg */ | ||
139 | #define ARC_REG_IC_IVIC 0x10 | ||
140 | #define ARC_REG_IC_CTRL 0x11 | ||
141 | #define ARC_REG_IC_IVIL 0x19 | ||
142 | #if (CONFIG_ARC_MMU_VER > 2) | ||
143 | #define ARC_REG_IC_PTAG 0x1E | ||
144 | #endif | ||
145 | |||
146 | /* Bit val in IC_CTRL */ | ||
147 | #define IC_CTRL_CACHE_DISABLE 0x1 | ||
148 | |||
149 | /* Data cache related Auxiliary registers */ | ||
150 | #define ARC_REG_DC_BCR 0x72 | ||
151 | #define ARC_REG_DC_IVDC 0x47 | ||
152 | #define ARC_REG_DC_CTRL 0x48 | ||
153 | #define ARC_REG_DC_IVDL 0x4A | ||
154 | #define ARC_REG_DC_FLSH 0x4B | ||
155 | #define ARC_REG_DC_FLDL 0x4C | ||
156 | #if (CONFIG_ARC_MMU_VER > 2) | ||
157 | #define ARC_REG_DC_PTAG 0x5C | ||
158 | #endif | ||
159 | |||
160 | /* Bit val in DC_CTRL */ | ||
161 | #define DC_CTRL_INV_MODE_FLUSH 0x40 | ||
162 | #define DC_CTRL_FLUSH_STATUS 0x100 | ||
163 | |||
164 | /* MMU Management regs */ | ||
165 | #define ARC_REG_PID 0x409 | ||
166 | #define ARC_REG_SCRATCH_DATA0 0x418 | ||
167 | |||
168 | /* Bits in MMU PID register */ | ||
169 | #define MMU_ENABLE (1 << 31) /* Enable MMU for process */ | ||
170 | 89 | ||
171 | /* | 90 | /* |
172 | * Floating Pt Registers | 91 | * Floating Pt Registers |
@@ -293,24 +212,6 @@ struct bcr_identity { | |||
293 | #endif | 212 | #endif |
294 | }; | 213 | }; |
295 | 214 | ||
296 | struct bcr_mmu_1_2 { | ||
297 | #ifdef CONFIG_CPU_BIG_ENDIAN | ||
298 | unsigned int ver:8, ways:4, sets:4, u_itlb:8, u_dtlb:8; | ||
299 | #else | ||
300 | unsigned int u_dtlb:8, u_itlb:8, sets:4, ways:4, ver:8; | ||
301 | #endif | ||
302 | }; | ||
303 | |||
304 | struct bcr_mmu_3 { | ||
305 | #ifdef CONFIG_CPU_BIG_ENDIAN | ||
306 | unsigned int ver:8, ways:4, sets:4, osm:1, reserv:3, pg_sz:4, | ||
307 | u_itlb:4, u_dtlb:4; | ||
308 | #else | ||
309 | unsigned int u_dtlb:4, u_itlb:4, pg_sz:4, reserv:3, osm:1, sets:4, | ||
310 | ways:4, ver:8; | ||
311 | #endif | ||
312 | }; | ||
313 | |||
314 | #define EXTN_SWAP_VALID 0x1 | 215 | #define EXTN_SWAP_VALID 0x1 |
315 | #define EXTN_NORM_VALID 0x2 | 216 | #define EXTN_NORM_VALID 0x2 |
316 | #define EXTN_MINMAX_VALID 0x2 | 217 | #define EXTN_MINMAX_VALID 0x2 |
@@ -343,14 +244,6 @@ struct bcr_extn_xymem { | |||
343 | #endif | 244 | #endif |
344 | }; | 245 | }; |
345 | 246 | ||
346 | struct bcr_cache { | ||
347 | #ifdef CONFIG_CPU_BIG_ENDIAN | ||
348 | unsigned int pad:12, line_len:4, sz:4, config:4, ver:8; | ||
349 | #else | ||
350 | unsigned int ver:8, config:4, sz:4, line_len:4, pad:12; | ||
351 | #endif | ||
352 | }; | ||
353 | |||
354 | struct bcr_perip { | 247 | struct bcr_perip { |
355 | #ifdef CONFIG_CPU_BIG_ENDIAN | 248 | #ifdef CONFIG_CPU_BIG_ENDIAN |
356 | unsigned int start:8, pad2:8, sz:8, pad:8; | 249 | unsigned int start:8, pad2:8, sz:8, pad:8; |
@@ -403,7 +296,7 @@ struct cpuinfo_arc_mmu { | |||
403 | }; | 296 | }; |
404 | 297 | ||
405 | struct cpuinfo_arc_cache { | 298 | struct cpuinfo_arc_cache { |
406 | unsigned int has_aliasing, sz, line_len, assoc, ver; | 299 | unsigned int sz, line_len, assoc, ver; |
407 | }; | 300 | }; |
408 | 301 | ||
409 | struct cpuinfo_arc_ccm { | 302 | struct cpuinfo_arc_ccm { |