diff options
Diffstat (limited to 'arch/arm/mach-iop33x/irq.c')
-rw-r--r-- | arch/arm/mach-iop33x/irq.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/arch/arm/mach-iop33x/irq.c b/arch/arm/mach-iop33x/irq.c index bcffc33a5be8..d667439c8573 100644 --- a/arch/arm/mach-iop33x/irq.c +++ b/arch/arm/mach-iop33x/irq.c | |||
@@ -28,25 +28,33 @@ static u32 iop331_mask1 = 0; | |||
28 | static inline void intctl_write0(u32 val) | 28 | static inline void intctl_write0(u32 val) |
29 | { | 29 | { |
30 | // INTCTL0 | 30 | // INTCTL0 |
31 | iop3xx_cp6_enable(); | ||
31 | asm volatile("mcr p6,0,%0,c0,c0,0"::"r" (val)); | 32 | asm volatile("mcr p6,0,%0,c0,c0,0"::"r" (val)); |
33 | iop3xx_cp6_disable(); | ||
32 | } | 34 | } |
33 | 35 | ||
34 | static inline void intctl_write1(u32 val) | 36 | static inline void intctl_write1(u32 val) |
35 | { | 37 | { |
36 | // INTCTL1 | 38 | // INTCTL1 |
39 | iop3xx_cp6_enable(); | ||
37 | asm volatile("mcr p6,0,%0,c1,c0,0"::"r" (val)); | 40 | asm volatile("mcr p6,0,%0,c1,c0,0"::"r" (val)); |
41 | iop3xx_cp6_disable(); | ||
38 | } | 42 | } |
39 | 43 | ||
40 | static inline void intstr_write0(u32 val) | 44 | static inline void intstr_write0(u32 val) |
41 | { | 45 | { |
42 | // INTSTR0 | 46 | // INTSTR0 |
47 | iop3xx_cp6_enable(); | ||
43 | asm volatile("mcr p6,0,%0,c2,c0,0"::"r" (val)); | 48 | asm volatile("mcr p6,0,%0,c2,c0,0"::"r" (val)); |
49 | iop3xx_cp6_disable(); | ||
44 | } | 50 | } |
45 | 51 | ||
46 | static inline void intstr_write1(u32 val) | 52 | static inline void intstr_write1(u32 val) |
47 | { | 53 | { |
48 | // INTSTR1 | 54 | // INTSTR1 |
55 | iop3xx_cp6_enable(); | ||
49 | asm volatile("mcr p6,0,%0,c3,c0,0"::"r" (val)); | 56 | asm volatile("mcr p6,0,%0,c3,c0,0"::"r" (val)); |
57 | iop3xx_cp6_disable(); | ||
50 | } | 58 | } |
51 | 59 | ||
52 | static void | 60 | static void |
@@ -93,24 +101,7 @@ struct irq_chip iop331_irqchip2 = { | |||
93 | 101 | ||
94 | void __init iop331_init_irq(void) | 102 | void __init iop331_init_irq(void) |
95 | { | 103 | { |
96 | unsigned int i, tmp; | 104 | unsigned int i; |
97 | |||
98 | /* Enable access to coprocessor 6 for dealing with IRQs. | ||
99 | * From RMK: | ||
100 | * Basically, the Intel documentation here is poor. It appears that | ||
101 | * you need to set the bit to be able to access the coprocessor from | ||
102 | * SVC mode. Whether that allows access from user space or not is | ||
103 | * unclear. | ||
104 | */ | ||
105 | asm volatile ( | ||
106 | "mrc p15, 0, %0, c15, c1, 0\n\t" | ||
107 | "orr %0, %0, %1\n\t" | ||
108 | "mcr p15, 0, %0, c15, c1, 0\n\t" | ||
109 | /* The action is delayed, so we have to do this: */ | ||
110 | "mrc p15, 0, %0, c15, c1, 0\n\t" | ||
111 | "mov %0, %0\n\t" | ||
112 | "sub pc, pc, #4" | ||
113 | : "=r" (tmp) : "i" (1 << 6) ); | ||
114 | 105 | ||
115 | intctl_write0(0); // disable all interrupts | 106 | intctl_write0(0); // disable all interrupts |
116 | intctl_write1(0); | 107 | intctl_write1(0); |