diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-03-23 17:09:11 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2011-03-25 13:45:19 -0400 |
commit | 9458ea567a72ebd3852c2d764d32c0f2fb61d0df (patch) | |
tree | 375604846035c73ef813b8e355f87dab32384228 /arch/mips | |
parent | efb02da52fe20172acb13f82f12ba36bed690bdc (diff) |
MIPS: IP22/IP28: Convert to new irq_chip functions
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2202/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/sgi-ip22/ip22-int.c | 60 |
1 files changed, 26 insertions, 34 deletions
diff --git a/arch/mips/sgi-ip22/ip22-int.c b/arch/mips/sgi-ip22/ip22-int.c index 383f11d7f442..e6e64750e90a 100644 --- a/arch/mips/sgi-ip22/ip22-int.c +++ b/arch/mips/sgi-ip22/ip22-int.c | |||
@@ -31,88 +31,80 @@ static char lc3msk_to_irqnr[256]; | |||
31 | 31 | ||
32 | extern int ip22_eisa_init(void); | 32 | extern int ip22_eisa_init(void); |
33 | 33 | ||
34 | static void enable_local0_irq(unsigned int irq) | 34 | static void enable_local0_irq(struct irq_data *d) |
35 | { | 35 | { |
36 | /* don't allow mappable interrupt to be enabled from setup_irq, | 36 | /* don't allow mappable interrupt to be enabled from setup_irq, |
37 | * we have our own way to do so */ | 37 | * we have our own way to do so */ |
38 | if (irq != SGI_MAP_0_IRQ) | 38 | if (d->irq != SGI_MAP_0_IRQ) |
39 | sgint->imask0 |= (1 << (irq - SGINT_LOCAL0)); | 39 | sgint->imask0 |= (1 << (d->irq - SGINT_LOCAL0)); |
40 | } | 40 | } |
41 | 41 | ||
42 | static void disable_local0_irq(unsigned int irq) | 42 | static void disable_local0_irq(struct irq_data *d) |
43 | { | 43 | { |
44 | sgint->imask0 &= ~(1 << (irq - SGINT_LOCAL0)); | 44 | sgint->imask0 &= ~(1 << (d->irq - SGINT_LOCAL0)); |
45 | } | 45 | } |
46 | 46 | ||
47 | static struct irq_chip ip22_local0_irq_type = { | 47 | static struct irq_chip ip22_local0_irq_type = { |
48 | .name = "IP22 local 0", | 48 | .name = "IP22 local 0", |
49 | .ack = disable_local0_irq, | 49 | .irq_mask = disable_local0_irq, |
50 | .mask = disable_local0_irq, | 50 | .irq_unmask = enable_local0_irq, |
51 | .mask_ack = disable_local0_irq, | ||
52 | .unmask = enable_local0_irq, | ||
53 | }; | 51 | }; |
54 | 52 | ||
55 | static void enable_local1_irq(unsigned int irq) | 53 | static void enable_local1_irq(struct irq_data *d) |
56 | { | 54 | { |
57 | /* don't allow mappable interrupt to be enabled from setup_irq, | 55 | /* don't allow mappable interrupt to be enabled from setup_irq, |
58 | * we have our own way to do so */ | 56 | * we have our own way to do so */ |
59 | if (irq != SGI_MAP_1_IRQ) | 57 | if (d->irq != SGI_MAP_1_IRQ) |
60 | sgint->imask1 |= (1 << (irq - SGINT_LOCAL1)); | 58 | sgint->imask1 |= (1 << (d->irq - SGINT_LOCAL1)); |
61 | } | 59 | } |
62 | 60 | ||
63 | static void disable_local1_irq(unsigned int irq) | 61 | static void disable_local1_irq(struct irq_data *d) |
64 | { | 62 | { |
65 | sgint->imask1 &= ~(1 << (irq - SGINT_LOCAL1)); | 63 | sgint->imask1 &= ~(1 << (d->irq - SGINT_LOCAL1)); |
66 | } | 64 | } |
67 | 65 | ||
68 | static struct irq_chip ip22_local1_irq_type = { | 66 | static struct irq_chip ip22_local1_irq_type = { |
69 | .name = "IP22 local 1", | 67 | .name = "IP22 local 1", |
70 | .ack = disable_local1_irq, | 68 | .irq_mask = disable_local1_irq, |
71 | .mask = disable_local1_irq, | 69 | .irq_unmask = enable_local1_irq, |
72 | .mask_ack = disable_local1_irq, | ||
73 | .unmask = enable_local1_irq, | ||
74 | }; | 70 | }; |
75 | 71 | ||
76 | static void enable_local2_irq(unsigned int irq) | 72 | static void enable_local2_irq(struct irq_data *d) |
77 | { | 73 | { |
78 | sgint->imask0 |= (1 << (SGI_MAP_0_IRQ - SGINT_LOCAL0)); | 74 | sgint->imask0 |= (1 << (SGI_MAP_0_IRQ - SGINT_LOCAL0)); |
79 | sgint->cmeimask0 |= (1 << (irq - SGINT_LOCAL2)); | 75 | sgint->cmeimask0 |= (1 << (d->irq - SGINT_LOCAL2)); |
80 | } | 76 | } |
81 | 77 | ||
82 | static void disable_local2_irq(unsigned int irq) | 78 | static void disable_local2_irq(struct irq_data *d) |
83 | { | 79 | { |
84 | sgint->cmeimask0 &= ~(1 << (irq - SGINT_LOCAL2)); | 80 | sgint->cmeimask0 &= ~(1 << (d->irq - SGINT_LOCAL2)); |
85 | if (!sgint->cmeimask0) | 81 | if (!sgint->cmeimask0) |
86 | sgint->imask0 &= ~(1 << (SGI_MAP_0_IRQ - SGINT_LOCAL0)); | 82 | sgint->imask0 &= ~(1 << (SGI_MAP_0_IRQ - SGINT_LOCAL0)); |
87 | } | 83 | } |
88 | 84 | ||
89 | static struct irq_chip ip22_local2_irq_type = { | 85 | static struct irq_chip ip22_local2_irq_type = { |
90 | .name = "IP22 local 2", | 86 | .name = "IP22 local 2", |
91 | .ack = disable_local2_irq, | 87 | .irq_mask = disable_local2_irq, |
92 | .mask = disable_local2_irq, | 88 | .irq_unmask = enable_local2_irq, |
93 | .mask_ack = disable_local2_irq, | ||
94 | .unmask = enable_local2_irq, | ||
95 | }; | 89 | }; |
96 | 90 | ||
97 | static void enable_local3_irq(unsigned int irq) | 91 | static void enable_local3_irq(struct irq_data *d) |
98 | { | 92 | { |
99 | sgint->imask1 |= (1 << (SGI_MAP_1_IRQ - SGINT_LOCAL1)); | 93 | sgint->imask1 |= (1 << (SGI_MAP_1_IRQ - SGINT_LOCAL1)); |
100 | sgint->cmeimask1 |= (1 << (irq - SGINT_LOCAL3)); | 94 | sgint->cmeimask1 |= (1 << (d->irq - SGINT_LOCAL3)); |
101 | } | 95 | } |
102 | 96 | ||
103 | static void disable_local3_irq(unsigned int irq) | 97 | static void disable_local3_irq(struct irq_data *d) |
104 | { | 98 | { |
105 | sgint->cmeimask1 &= ~(1 << (irq - SGINT_LOCAL3)); | 99 | sgint->cmeimask1 &= ~(1 << (d->irq - SGINT_LOCAL3)); |
106 | if (!sgint->cmeimask1) | 100 | if (!sgint->cmeimask1) |
107 | sgint->imask1 &= ~(1 << (SGI_MAP_1_IRQ - SGINT_LOCAL1)); | 101 | sgint->imask1 &= ~(1 << (SGI_MAP_1_IRQ - SGINT_LOCAL1)); |
108 | } | 102 | } |
109 | 103 | ||
110 | static struct irq_chip ip22_local3_irq_type = { | 104 | static struct irq_chip ip22_local3_irq_type = { |
111 | .name = "IP22 local 3", | 105 | .name = "IP22 local 3", |
112 | .ack = disable_local3_irq, | 106 | .irq_mask = disable_local3_irq, |
113 | .mask = disable_local3_irq, | 107 | .irq_unmask = enable_local3_irq, |
114 | .mask_ack = disable_local3_irq, | ||
115 | .unmask = enable_local3_irq, | ||
116 | }; | 108 | }; |
117 | 109 | ||
118 | static void indy_local0_irqdispatch(void) | 110 | static void indy_local0_irqdispatch(void) |