diff options
Diffstat (limited to 'arch/arm/mach-iop32x')
-rw-r--r-- | arch/arm/mach-iop32x/irq.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/arch/arm/mach-iop32x/irq.c b/arch/arm/mach-iop32x/irq.c index 76f2d561dbc1..cdd6943ce768 100644 --- a/arch/arm/mach-iop32x/irq.c +++ b/arch/arm/mach-iop32x/irq.c | |||
@@ -27,12 +27,16 @@ static u32 iop321_mask /* = 0 */; | |||
27 | 27 | ||
28 | static inline void intctl_write(u32 val) | 28 | static inline void intctl_write(u32 val) |
29 | { | 29 | { |
30 | iop3xx_cp6_enable(); | ||
30 | asm volatile("mcr p6,0,%0,c0,c0,0"::"r" (val)); | 31 | asm volatile("mcr p6,0,%0,c0,c0,0"::"r" (val)); |
32 | iop3xx_cp6_disable(); | ||
31 | } | 33 | } |
32 | 34 | ||
33 | static inline void intstr_write(u32 val) | 35 | static inline void intstr_write(u32 val) |
34 | { | 36 | { |
37 | iop3xx_cp6_enable(); | ||
35 | asm volatile("mcr p6,0,%0,c4,c0,0"::"r" (val)); | 38 | asm volatile("mcr p6,0,%0,c4,c0,0"::"r" (val)); |
39 | iop3xx_cp6_disable(); | ||
36 | } | 40 | } |
37 | 41 | ||
38 | static void | 42 | static void |
@@ -61,24 +65,7 @@ struct irq_chip ext_chip = { | |||
61 | 65 | ||
62 | void __init iop321_init_irq(void) | 66 | void __init iop321_init_irq(void) |
63 | { | 67 | { |
64 | unsigned int i, tmp; | 68 | unsigned int i; |
65 | |||
66 | /* Enable access to coprocessor 6 for dealing with IRQs. | ||
67 | * From RMK: | ||
68 | * Basically, the Intel documentation here is poor. It appears that | ||
69 | * you need to set the bit to be able to access the coprocessor from | ||
70 | * SVC mode. Whether that allows access from user space or not is | ||
71 | * unclear. | ||
72 | */ | ||
73 | asm volatile ( | ||
74 | "mrc p15, 0, %0, c15, c1, 0\n\t" | ||
75 | "orr %0, %0, %1\n\t" | ||
76 | "mcr p15, 0, %0, c15, c1, 0\n\t" | ||
77 | /* The action is delayed, so we have to do this: */ | ||
78 | "mrc p15, 0, %0, c15, c1, 0\n\t" | ||
79 | "mov %0, %0\n\t" | ||
80 | "sub pc, pc, #4" | ||
81 | : "=r" (tmp) : "i" (1 << 6) ); | ||
82 | 69 | ||
83 | intctl_write(0); // disable all interrupts | 70 | intctl_write(0); // disable all interrupts |
84 | intstr_write(0); // treat all as IRQ | 71 | intstr_write(0); // treat all as IRQ |