diff options
author | Paul Mackerras <paulus@samba.org> | 2006-12-11 00:31:42 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-11 00:31:42 -0500 |
commit | 973c1fabc70deb10f12a0eaab2f50c2263784257 (patch) | |
tree | 5b0ef183757049d241d0709f0cea9e370627b687 /include/asm-ppc/reg_booke.h | |
parent | 4383162c8f2fa75d916c4901b0d1ebcac7aeaf74 (diff) | |
parent | d10f73480b991da2aa1c000ed38eda3e4a987292 (diff) |
Merge branch 'for_paulus' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc
Diffstat (limited to 'include/asm-ppc/reg_booke.h')
-rw-r--r-- | include/asm-ppc/reg_booke.h | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/include/asm-ppc/reg_booke.h b/include/asm-ppc/reg_booke.h index 602fbadeaf48..a263fc1e65c4 100644 --- a/include/asm-ppc/reg_booke.h +++ b/include/asm-ppc/reg_booke.h | |||
@@ -9,41 +9,9 @@ | |||
9 | #ifndef __ASM_PPC_REG_BOOKE_H__ | 9 | #ifndef __ASM_PPC_REG_BOOKE_H__ |
10 | #define __ASM_PPC_REG_BOOKE_H__ | 10 | #define __ASM_PPC_REG_BOOKE_H__ |
11 | 11 | ||
12 | #ifndef __ASSEMBLY__ | 12 | #include <asm/dcr.h> |
13 | /* Device Control Registers */ | ||
14 | void __mtdcr(int reg, unsigned int val); | ||
15 | unsigned int __mfdcr(int reg); | ||
16 | #define mfdcr(rn) \ | ||
17 | ({unsigned int rval; \ | ||
18 | if (__builtin_constant_p(rn)) \ | ||
19 | asm volatile("mfdcr %0," __stringify(rn) \ | ||
20 | : "=r" (rval)); \ | ||
21 | else \ | ||
22 | rval = __mfdcr(rn); \ | ||
23 | rval;}) | ||
24 | |||
25 | #define mtdcr(rn, v) \ | ||
26 | do { \ | ||
27 | if (__builtin_constant_p(rn)) \ | ||
28 | asm volatile("mtdcr " __stringify(rn) ",%0" \ | ||
29 | : : "r" (v)); \ | ||
30 | else \ | ||
31 | __mtdcr(rn, v); \ | ||
32 | } while (0) | ||
33 | |||
34 | /* R/W of indirect DCRs make use of standard naming conventions for DCRs */ | ||
35 | #define mfdcri(base, reg) \ | ||
36 | ({ \ | ||
37 | mtdcr(base ## _CFGADDR, base ## _ ## reg); \ | ||
38 | mfdcr(base ## _CFGDATA); \ | ||
39 | }) | ||
40 | |||
41 | #define mtdcri(base, reg, data) \ | ||
42 | do { \ | ||
43 | mtdcr(base ## _CFGADDR, base ## _ ## reg); \ | ||
44 | mtdcr(base ## _CFGDATA, data); \ | ||
45 | } while (0) | ||
46 | 13 | ||
14 | #ifndef __ASSEMBLY__ | ||
47 | /* Performance Monitor Registers */ | 15 | /* Performance Monitor Registers */ |
48 | #define mfpmr(rn) ({unsigned int rval; \ | 16 | #define mfpmr(rn) ({unsigned int rval; \ |
49 | asm volatile("mfpmr %0," __stringify(rn) \ | 17 | asm volatile("mfpmr %0," __stringify(rn) \ |