File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change 30
30
pa; \
31
31
})
32
32
33
+ #define CR_EIEM 15 /* External Interrupt Enable Mask */
34
+ #define CR_CR16 16 /* CR16 Interval Timer */
35
+ #define CR_EIRR 23 /* External Interrupt Request Register */
36
+
33
37
#define mfctl (reg ) ({ \
34
38
unsigned long cr; \
35
39
__asm__ __volatile__( \
36
- "mfctl " #reg " ,%0" : \
37
- "=r" (cr) \
40
+ "mfctl %1 ,%0" : \
41
+ "=r" (cr) : "i" (reg) \
38
42
); \
39
43
cr; \
40
44
})
44
48
: /* no outputs */ \
45
49
: "r " (gr), "i" (cr) : "memory")
46
50
47
- /* these are here to de-mystefy the calling code, and to provide hooks */
48
- /* which I needed for debugging EIEM problems -PB */
49
- #define get_eiem () mfctl(15)
50
- static inline void set_eiem (unsigned long val )
51
- {
52
- mtctl (val , 15 );
53
- }
51
+ #define get_eiem () mfctl(CR_EIEM)
52
+ #define set_eiem (val ) mtctl(val, CR_EIEM)
54
53
55
54
#define mfsp (reg ) ({ \
56
55
unsigned long cr; \
You can’t perform that action at this time.
0 commit comments