diff options
author | Jerone Young <jyoung5@us.ibm.com> | 2008-06-06 15:09:05 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2008-06-16 10:56:18 -0400 |
commit | bccaea8fe287454d70f5b2546910561e9f884053 (patch) | |
tree | 965aaf6cb1e0cbd8c932ef471c1122f40e623285 /include/asm-powerpc/reg_booke.h | |
parent | fec6a82282cc38397ba1c4a7b5b99d70eea06532 (diff) |
powerpc/booke: Fix definitions for dbcr[1-2] and dbsr registers
This takes values from the PowerPC ISA BookIII-E specifications that are
for DBCR0. Many of these values are different from those currently
specified, which are for the ppc405. Also added some bookE definitions
for DBCR1 & DBCR2.
[ galak@kernel.crashing.org: Added aliases to 40x DBCR0 to match Book-E,
Added enhanced debug DBCR0/DBSR _CIRPT and _CRET defines and DBSR
IRPT and RET. ]
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'include/asm-powerpc/reg_booke.h')
-rw-r--r-- | include/asm-powerpc/reg_booke.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/include/asm-powerpc/reg_booke.h b/include/asm-powerpc/reg_booke.h index cf54a3f31753..a1ab2ba8f1b2 100644 --- a/include/asm-powerpc/reg_booke.h +++ b/include/asm-powerpc/reg_booke.h | |||
@@ -210,6 +210,7 @@ | |||
210 | #ifdef CONFIG_BOOKE | 210 | #ifdef CONFIG_BOOKE |
211 | #define DBSR_IC 0x08000000 /* Instruction Completion */ | 211 | #define DBSR_IC 0x08000000 /* Instruction Completion */ |
212 | #define DBSR_BT 0x04000000 /* Branch Taken */ | 212 | #define DBSR_BT 0x04000000 /* Branch Taken */ |
213 | #define DBSR_IRPT 0x02000000 /* Exception Debug Event */ | ||
213 | #define DBSR_TIE 0x01000000 /* Trap Instruction Event */ | 214 | #define DBSR_TIE 0x01000000 /* Trap Instruction Event */ |
214 | #define DBSR_IAC1 0x00800000 /* Instr Address Compare 1 Event */ | 215 | #define DBSR_IAC1 0x00800000 /* Instr Address Compare 1 Event */ |
215 | #define DBSR_IAC2 0x00400000 /* Instr Address Compare 2 Event */ | 216 | #define DBSR_IAC2 0x00400000 /* Instr Address Compare 2 Event */ |
@@ -219,10 +220,14 @@ | |||
219 | #define DBSR_DAC1W 0x00040000 /* Data Addr Compare 1 Write Event */ | 220 | #define DBSR_DAC1W 0x00040000 /* Data Addr Compare 1 Write Event */ |
220 | #define DBSR_DAC2R 0x00020000 /* Data Addr Compare 2 Read Event */ | 221 | #define DBSR_DAC2R 0x00020000 /* Data Addr Compare 2 Read Event */ |
221 | #define DBSR_DAC2W 0x00010000 /* Data Addr Compare 2 Write Event */ | 222 | #define DBSR_DAC2W 0x00010000 /* Data Addr Compare 2 Write Event */ |
223 | #define DBSR_RET 0x00008000 /* Return Debug Event */ | ||
224 | #define DBSR_CIRPT 0x00000040 /* Critical Interrupt Taken Event */ | ||
225 | #define DBSR_CRET 0x00000020 /* Critical Return Debug Event */ | ||
222 | #endif | 226 | #endif |
223 | #ifdef CONFIG_40x | 227 | #ifdef CONFIG_40x |
224 | #define DBSR_IC 0x80000000 /* Instruction Completion */ | 228 | #define DBSR_IC 0x80000000 /* Instruction Completion */ |
225 | #define DBSR_BT 0x40000000 /* Branch taken */ | 229 | #define DBSR_BT 0x40000000 /* Branch taken */ |
230 | #define DBSR_IRPT 0x20000000 /* Exception Debug Event */ | ||
226 | #define DBSR_TIE 0x10000000 /* Trap Instruction debug Event */ | 231 | #define DBSR_TIE 0x10000000 /* Trap Instruction debug Event */ |
227 | #define DBSR_IAC1 0x04000000 /* Instruction Address Compare 1 Event */ | 232 | #define DBSR_IAC1 0x04000000 /* Instruction Address Compare 1 Event */ |
228 | #define DBSR_IAC2 0x02000000 /* Instruction Address Compare 2 Event */ | 233 | #define DBSR_IAC2 0x02000000 /* Instruction Address Compare 2 Event */ |
@@ -253,6 +258,7 @@ | |||
253 | #define ESR_BO 0x00020000 /* Byte Ordering */ | 258 | #define ESR_BO 0x00020000 /* Byte Ordering */ |
254 | 259 | ||
255 | /* Bit definitions related to the DBCR0. */ | 260 | /* Bit definitions related to the DBCR0. */ |
261 | #if defined(CONFIG_40x) | ||
256 | #define DBCR0_EDM 0x80000000 /* External Debug Mode */ | 262 | #define DBCR0_EDM 0x80000000 /* External Debug Mode */ |
257 | #define DBCR0_IDM 0x40000000 /* Internal Debug Mode */ | 263 | #define DBCR0_IDM 0x40000000 /* Internal Debug Mode */ |
258 | #define DBCR0_RST 0x30000000 /* all the bits in the RST field */ | 264 | #define DBCR0_RST 0x30000000 /* all the bits in the RST field */ |
@@ -261,20 +267,69 @@ | |||
261 | #define DBCR0_RST_CORE 0x10000000 /* Core Reset */ | 267 | #define DBCR0_RST_CORE 0x10000000 /* Core Reset */ |
262 | #define DBCR0_RST_NONE 0x00000000 /* No Reset */ | 268 | #define DBCR0_RST_NONE 0x00000000 /* No Reset */ |
263 | #define DBCR0_IC 0x08000000 /* Instruction Completion */ | 269 | #define DBCR0_IC 0x08000000 /* Instruction Completion */ |
270 | #define DBCR0_ICMP DBCR0_IC | ||
264 | #define DBCR0_BT 0x04000000 /* Branch Taken */ | 271 | #define DBCR0_BT 0x04000000 /* Branch Taken */ |
272 | #define DBCR0_BRT DBCR0_BT | ||
265 | #define DBCR0_EDE 0x02000000 /* Exception Debug Event */ | 273 | #define DBCR0_EDE 0x02000000 /* Exception Debug Event */ |
274 | #define DBCR0_IRPT DBCR0_EDE | ||
266 | #define DBCR0_TDE 0x01000000 /* TRAP Debug Event */ | 275 | #define DBCR0_TDE 0x01000000 /* TRAP Debug Event */ |
267 | #define DBCR0_IA1 0x00800000 /* Instr Addr compare 1 enable */ | 276 | #define DBCR0_IA1 0x00800000 /* Instr Addr compare 1 enable */ |
277 | #define DBCR0_IAC1 DBCR0_IA1 | ||
268 | #define DBCR0_IA2 0x00400000 /* Instr Addr compare 2 enable */ | 278 | #define DBCR0_IA2 0x00400000 /* Instr Addr compare 2 enable */ |
279 | #define DBCR0_IAC2 DBCR0_IA2 | ||
269 | #define DBCR0_IA12 0x00200000 /* Instr Addr 1-2 range enable */ | 280 | #define DBCR0_IA12 0x00200000 /* Instr Addr 1-2 range enable */ |
270 | #define DBCR0_IA12X 0x00100000 /* Instr Addr 1-2 range eXclusive */ | 281 | #define DBCR0_IA12X 0x00100000 /* Instr Addr 1-2 range eXclusive */ |
271 | #define DBCR0_IA3 0x00080000 /* Instr Addr compare 3 enable */ | 282 | #define DBCR0_IA3 0x00080000 /* Instr Addr compare 3 enable */ |
283 | #define DBCR0_IAC3 DBCR0_IA3 | ||
272 | #define DBCR0_IA4 0x00040000 /* Instr Addr compare 4 enable */ | 284 | #define DBCR0_IA4 0x00040000 /* Instr Addr compare 4 enable */ |
285 | #define DBCR0_IAC4 DBCR0_IA4 | ||
273 | #define DBCR0_IA34 0x00020000 /* Instr Addr 3-4 range Enable */ | 286 | #define DBCR0_IA34 0x00020000 /* Instr Addr 3-4 range Enable */ |
274 | #define DBCR0_IA34X 0x00010000 /* Instr Addr 3-4 range eXclusive */ | 287 | #define DBCR0_IA34X 0x00010000 /* Instr Addr 3-4 range eXclusive */ |
275 | #define DBCR0_IA12T 0x00008000 /* Instr Addr 1-2 range Toggle */ | 288 | #define DBCR0_IA12T 0x00008000 /* Instr Addr 1-2 range Toggle */ |
276 | #define DBCR0_IA34T 0x00004000 /* Instr Addr 3-4 range Toggle */ | 289 | #define DBCR0_IA34T 0x00004000 /* Instr Addr 3-4 range Toggle */ |
277 | #define DBCR0_FT 0x00000001 /* Freeze Timers on debug event */ | 290 | #define DBCR0_FT 0x00000001 /* Freeze Timers on debug event */ |
291 | #elif defined(CONFIG_BOOKE) | ||
292 | #define DBCR0_EDM 0x80000000 /* External Debug Mode */ | ||
293 | #define DBCR0_IDM 0x40000000 /* Internal Debug Mode */ | ||
294 | #define DBCR0_RST 0x30000000 /* all the bits in the RST field */ | ||
295 | /* DBCR0_RST_* is 44x specific and not followed in fsl booke */ | ||
296 | #define DBCR0_RST_SYSTEM 0x30000000 /* System Reset */ | ||
297 | #define DBCR0_RST_CHIP 0x20000000 /* Chip Reset */ | ||
298 | #define DBCR0_RST_CORE 0x10000000 /* Core Reset */ | ||
299 | #define DBCR0_RST_NONE 0x00000000 /* No Reset */ | ||
300 | #define DBCR0_ICMP 0x08000000 /* Instruction Completion */ | ||
301 | #define DBCR0_IC DBCR0_ICMP | ||
302 | #define DBCR0_BRT 0x04000000 /* Branch Taken */ | ||
303 | #define DBCR0_BT DBCR0_BRT | ||
304 | #define DBCR0_IRPT 0x02000000 /* Exception Debug Event */ | ||
305 | #define DBCR0_TDE 0x01000000 /* TRAP Debug Event */ | ||
306 | #define DBCR0_TIE DBCR0_TDE | ||
307 | #define DBCR0_IAC1 0x00800000 /* Instr Addr compare 1 enable */ | ||
308 | #define DBCR0_IAC2 0x00400000 /* Instr Addr compare 2 enable */ | ||
309 | #define DBCR0_IAC3 0x00200000 /* Instr Addr compare 3 enable */ | ||
310 | #define DBCR0_IAC4 0x00100000 /* Instr Addr compare 4 enable */ | ||
311 | #define DBCR0_DAC1R 0x00080000 /* DAC 1 Read enable */ | ||
312 | #define DBCR0_DAC1W 0x00040000 /* DAC 1 Write enable */ | ||
313 | #define DBCR0_DAC2R 0x00020000 /* DAC 2 Read enable */ | ||
314 | #define DBCR0_DAC2W 0x00010000 /* DAC 2 Write enable */ | ||
315 | #define DBCR0_RET 0x00008000 /* Return Debug Event */ | ||
316 | #define DBCR0_CIRPT 0x00000040 /* Critical Interrupt Taken Event */ | ||
317 | #define DBCR0_CRET 0x00000020 /* Critical Return Debug Event */ | ||
318 | #define DBCR0_FT 0x00000001 /* Freeze Timers on debug event */ | ||
319 | |||
320 | /* Bit definitions related to the DBCR1. */ | ||
321 | #define DBCR1_IAC12M 0x00800000 /* Instr Addr 1-2 range enable */ | ||
322 | #define DBCR1_IAC12MX 0x00C00000 /* Instr Addr 1-2 range eXclusive */ | ||
323 | #define DBCR1_IAC12AT 0x00010000 /* Instr Addr 1-2 range Toggle */ | ||
324 | #define DBCR1_IAC34M 0x00000080 /* Instr Addr 3-4 range enable */ | ||
325 | #define DBCR1_IAC34MX 0x000000C0 /* Instr Addr 3-4 range eXclusive */ | ||
326 | #define DBCR1_IAC34AT 0x00000001 /* Instr Addr 3-4 range Toggle */ | ||
327 | |||
328 | /* Bit definitions related to the DBCR2. */ | ||
329 | #define DBCR2_DAC12M 0x00800000 /* DAC 1-2 range enable */ | ||
330 | #define DBCR2_DAC12MX 0x00C00000 /* DAC 1-2 range eXclusive */ | ||
331 | #define DBCR2_DAC12A 0x00200000 /* DAC 1-2 Asynchronous */ | ||
332 | #endif | ||
278 | 333 | ||
279 | /* Bit definitions related to the TCR. */ | 334 | /* Bit definitions related to the TCR. */ |
280 | #define TCR_WP(x) (((x)&0x3)<<30) /* WDT Period */ | 335 | #define TCR_WP(x) (((x)&0x3)<<30) /* WDT Period */ |