1
2
3
4
5
6 #ifdef __KERNEL__
7 #ifndef __ASM_POWERPC_REG_FSL_EMB_H__
8 #define __ASM_POWERPC_REG_FSL_EMB_H__
9
10 #include <linux/stringify.h>
11
12 #ifndef __ASSEMBLY__
13
14 #define mfpmr(rn) ({unsigned int rval; \
15 asm volatile("mfpmr %0," __stringify(rn) \
16 : "=r" (rval)); rval;})
17 #define mtpmr(rn, v) asm volatile("mtpmr " __stringify(rn) ",%0" : : "r" (v))
18 #endif
19
20
21 #define PMRN_PMC0 0x010
22 #define PMRN_PMC1 0x011
23 #define PMRN_PMC2 0x012
24 #define PMRN_PMC3 0x013
25 #define PMRN_PMC4 0x014
26 #define PMRN_PMC5 0x015
27 #define PMRN_PMLCA0 0x090
28 #define PMRN_PMLCA1 0x091
29 #define PMRN_PMLCA2 0x092
30 #define PMRN_PMLCA3 0x093
31 #define PMRN_PMLCA4 0x094
32 #define PMRN_PMLCA5 0x095
33
34 #define PMLCA_FC 0x80000000
35 #define PMLCA_FCS 0x40000000
36 #define PMLCA_FCU 0x20000000
37 #define PMLCA_FCM1 0x10000000
38 #define PMLCA_FCM0 0x08000000
39 #define PMLCA_CE 0x04000000
40 #define PMLCA_FGCS1 0x00000002
41 #define PMLCA_FGCS0 0x00000001
42
43 #define PMLCA_EVENT_MASK 0x01ff0000
44 #define PMLCA_EVENT_SHIFT 16
45
46 #define PMRN_PMLCB0 0x110
47 #define PMRN_PMLCB1 0x111
48 #define PMRN_PMLCB2 0x112
49 #define PMRN_PMLCB3 0x113
50 #define PMRN_PMLCB4 0x114
51 #define PMRN_PMLCB5 0x115
52
53 #define PMLCB_THRESHMUL_MASK 0x0700
54 #define PMLCB_THRESHMUL_SHIFT 8
55
56 #define PMLCB_THRESHOLD_MASK 0x003f
57 #define PMLCB_THRESHOLD_SHIFT 0
58
59 #define PMRN_PMGC0 0x190
60
61 #define PMGC0_FAC 0x80000000
62 #define PMGC0_PMIE 0x40000000
63 #define PMGC0_FCECE 0x20000000
64
65
66
67 #define PMRN_UPMC0 0x000
68 #define PMRN_UPMC1 0x001
69 #define PMRN_UPMC2 0x002
70 #define PMRN_UPMC3 0x003
71 #define PMRN_UPMC4 0x004
72 #define PMRN_UPMC5 0x005
73 #define PMRN_UPMLCA0 0x080
74 #define PMRN_UPMLCA1 0x081
75 #define PMRN_UPMLCA2 0x082
76 #define PMRN_UPMLCA3 0x083
77 #define PMRN_UPMLCA4 0x084
78 #define PMRN_UPMLCA5 0x085
79 #define PMRN_UPMLCB0 0x100
80 #define PMRN_UPMLCB1 0x101
81 #define PMRN_UPMLCB2 0x102
82 #define PMRN_UPMLCB3 0x103
83 #define PMRN_UPMLCB4 0x104
84 #define PMRN_UPMLCB5 0x105
85 #define PMRN_UPMGC0 0x180
86
87
88 #endif
89 #endif