diff options
Diffstat (limited to 'arch/openrisc/kernel/irq.c')
-rw-r--r-- | arch/openrisc/kernel/irq.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/arch/openrisc/kernel/irq.c b/arch/openrisc/kernel/irq.c index e935b9d8eee1..8ec77bc9f1e7 100644 --- a/arch/openrisc/kernel/irq.c +++ b/arch/openrisc/kernel/irq.c | |||
@@ -46,19 +46,19 @@ EXPORT_SYMBOL(arch_local_irq_restore); | |||
46 | 46 | ||
47 | static void or1k_pic_mask(struct irq_data *data) | 47 | static void or1k_pic_mask(struct irq_data *data) |
48 | { | 48 | { |
49 | mtspr(SPR_PICMR, mfspr(SPR_PICMR) & ~(1UL << data->irq)); | 49 | mtspr(SPR_PICMR, mfspr(SPR_PICMR) & ~(1UL << data->hwirq)); |
50 | } | 50 | } |
51 | 51 | ||
52 | static void or1k_pic_unmask(struct irq_data *data) | 52 | static void or1k_pic_unmask(struct irq_data *data) |
53 | { | 53 | { |
54 | mtspr(SPR_PICMR, mfspr(SPR_PICMR) | (1UL << data->irq)); | 54 | mtspr(SPR_PICMR, mfspr(SPR_PICMR) | (1UL << data->hwirq)); |
55 | } | 55 | } |
56 | 56 | ||
57 | static void or1k_pic_ack(struct irq_data *data) | 57 | static void or1k_pic_ack(struct irq_data *data) |
58 | { | 58 | { |
59 | /* EDGE-triggered interrupts need to be ack'ed in order to clear | 59 | /* EDGE-triggered interrupts need to be ack'ed in order to clear |
60 | * the latch. | 60 | * the latch. |
61 | * LEVER-triggered interrupts do not need to be ack'ed; however, | 61 | * LEVEL-triggered interrupts do not need to be ack'ed; however, |
62 | * ack'ing the interrupt has no ill-effect and is quicker than | 62 | * ack'ing the interrupt has no ill-effect and is quicker than |
63 | * trying to figure out what type it is... | 63 | * trying to figure out what type it is... |
64 | */ | 64 | */ |
@@ -75,10 +75,10 @@ static void or1k_pic_ack(struct irq_data *data) | |||
75 | * as opposed to a 1 as mandated by the spec | 75 | * as opposed to a 1 as mandated by the spec |
76 | */ | 76 | */ |
77 | 77 | ||
78 | mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->irq)); | 78 | mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->hwirq)); |
79 | #else | 79 | #else |
80 | WARN(1, "Interrupt handling possibily broken\n"); | 80 | WARN(1, "Interrupt handling possibly broken\n"); |
81 | mtspr(SPR_PICSR, (1UL << irq)); | 81 | mtspr(SPR_PICSR, (1UL << data->hwirq)); |
82 | #endif | 82 | #endif |
83 | } | 83 | } |
84 | 84 | ||
@@ -87,10 +87,12 @@ static void or1k_pic_mask_ack(struct irq_data *data) | |||
87 | /* Comments for pic_ack apply here, too */ | 87 | /* Comments for pic_ack apply here, too */ |
88 | 88 | ||
89 | #ifdef CONFIG_OR1K_1200 | 89 | #ifdef CONFIG_OR1K_1200 |
90 | mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->irq)); | 90 | mtspr(SPR_PICMR, mfspr(SPR_PICMR) & ~(1UL << data->hwirq)); |
91 | mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->hwirq)); | ||
91 | #else | 92 | #else |
92 | WARN(1, "Interrupt handling possibily broken\n"); | 93 | WARN(1, "Interrupt handling possibly broken\n"); |
93 | mtspr(SPR_PICSR, (1UL << irq)); | 94 | mtspr(SPR_PICMR, (1UL << data->hwirq)); |
95 | mtspr(SPR_PICSR, (1UL << data->hwirq)); | ||
94 | #endif | 96 | #endif |
95 | } | 97 | } |
96 | 98 | ||