aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel/irq_pyxis.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/alpha/kernel/irq_pyxis.c')
-rw-r--r--arch/alpha/kernel/irq_pyxis.c39
1 files changed, 11 insertions, 28 deletions
diff --git a/arch/alpha/kernel/irq_pyxis.c b/arch/alpha/kernel/irq_pyxis.c
index 989ce46a0cf3..13c97a5b31e8 100644
--- a/arch/alpha/kernel/irq_pyxis.c
+++ b/arch/alpha/kernel/irq_pyxis.c
@@ -29,35 +29,21 @@ pyxis_update_irq_hw(unsigned long mask)
29} 29}
30 30
31static inline void 31static inline void
32pyxis_enable_irq(unsigned int irq) 32pyxis_enable_irq(struct irq_data *d)
33{ 33{
34 pyxis_update_irq_hw(cached_irq_mask |= 1UL << (irq - 16)); 34 pyxis_update_irq_hw(cached_irq_mask |= 1UL << (d->irq - 16));
35} 35}
36 36
37static void 37static void
38pyxis_disable_irq(unsigned int irq) 38pyxis_disable_irq(struct irq_data *d)
39{ 39{
40 pyxis_update_irq_hw(cached_irq_mask &= ~(1UL << (irq - 16))); 40 pyxis_update_irq_hw(cached_irq_mask &= ~(1UL << (d->irq - 16)));
41}
42
43static unsigned int
44pyxis_startup_irq(unsigned int irq)
45{
46 pyxis_enable_irq(irq);
47 return 0;
48}
49
50static void
51pyxis_end_irq(unsigned int irq)
52{
53 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
54 pyxis_enable_irq(irq);
55} 41}
56 42
57static void 43static void
58pyxis_mask_and_ack_irq(unsigned int irq) 44pyxis_mask_and_ack_irq(struct irq_data *d)
59{ 45{
60 unsigned long bit = 1UL << (irq - 16); 46 unsigned long bit = 1UL << (d->irq - 16);
61 unsigned long mask = cached_irq_mask &= ~bit; 47 unsigned long mask = cached_irq_mask &= ~bit;
62 48
63 /* Disable the interrupt. */ 49 /* Disable the interrupt. */
@@ -72,12 +58,9 @@ pyxis_mask_and_ack_irq(unsigned int irq)
72 58
73static struct irq_chip pyxis_irq_type = { 59static struct irq_chip pyxis_irq_type = {
74 .name = "PYXIS", 60 .name = "PYXIS",
75 .startup = pyxis_startup_irq, 61 .irq_mask_ack = pyxis_mask_and_ack_irq,
76 .shutdown = pyxis_disable_irq, 62 .irq_mask = pyxis_disable_irq,
77 .enable = pyxis_enable_irq, 63 .irq_unmask = pyxis_enable_irq,
78 .disable = pyxis_disable_irq,
79 .ack = pyxis_mask_and_ack_irq,
80 .end = pyxis_end_irq,
81}; 64};
82 65
83void 66void
@@ -119,8 +102,8 @@ init_pyxis_irqs(unsigned long ignore_mask)
119 for (i = 16; i < 48; ++i) { 102 for (i = 16; i < 48; ++i) {
120 if ((ignore_mask >> i) & 1) 103 if ((ignore_mask >> i) & 1)
121 continue; 104 continue;
122 irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 105 irq_set_chip_and_handler(i, &pyxis_irq_type, handle_level_irq);
123 irq_desc[i].chip = &pyxis_irq_type; 106 irq_set_status_flags(i, IRQ_LEVEL);
124 } 107 }
125 108
126 setup_irq(16+7, &isa_cascade_irqaction); 109 setup_irq(16+7, &isa_cascade_irqaction);