diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2010-11-29 04:33:49 -0500 |
---|---|---|
committer | Lennert Buytenhek <buytenh@wantstofly.org> | 2011-01-13 11:18:40 -0500 |
commit | ee04087add7fa429fd1e4256705479cd1386adec (patch) | |
tree | 329fd2993f5f2596bdd0876942d4fafb38ffde94 /arch/arm/mach-ixp4xx | |
parent | c1d065e696b8a1e0486a25fa2a804da0d2d6d98c (diff) |
ARM: ixp4xx: irq_data conversion.
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Diffstat (limited to 'arch/arm/mach-ixp4xx')
-rw-r--r-- | arch/arm/mach-ixp4xx/common.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index 4dbfcbb9163c..4dc68d6bb6be 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c | |||
@@ -128,9 +128,9 @@ int irq_to_gpio(unsigned int irq) | |||
128 | } | 128 | } |
129 | EXPORT_SYMBOL(irq_to_gpio); | 129 | EXPORT_SYMBOL(irq_to_gpio); |
130 | 130 | ||
131 | static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type) | 131 | static int ixp4xx_set_irq_type(struct irq_data *d, unsigned int type) |
132 | { | 132 | { |
133 | int line = irq2gpio[irq]; | 133 | int line = irq2gpio[d->irq]; |
134 | u32 int_style; | 134 | u32 int_style; |
135 | enum ixp4xx_irq_type irq_type; | 135 | enum ixp4xx_irq_type irq_type; |
136 | volatile u32 *int_reg; | 136 | volatile u32 *int_reg; |
@@ -167,9 +167,9 @@ static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type) | |||
167 | } | 167 | } |
168 | 168 | ||
169 | if (irq_type == IXP4XX_IRQ_EDGE) | 169 | if (irq_type == IXP4XX_IRQ_EDGE) |
170 | ixp4xx_irq_edge |= (1 << irq); | 170 | ixp4xx_irq_edge |= (1 << d->irq); |
171 | else | 171 | else |
172 | ixp4xx_irq_edge &= ~(1 << irq); | 172 | ixp4xx_irq_edge &= ~(1 << d->irq); |
173 | 173 | ||
174 | if (line >= 8) { /* pins 8-15 */ | 174 | if (line >= 8) { /* pins 8-15 */ |
175 | line -= 8; | 175 | line -= 8; |
@@ -188,22 +188,22 @@ static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type) | |||
188 | *int_reg |= (int_style << (line * IXP4XX_GPIO_STYLE_SIZE)); | 188 | *int_reg |= (int_style << (line * IXP4XX_GPIO_STYLE_SIZE)); |
189 | 189 | ||
190 | /* Configure the line as an input */ | 190 | /* Configure the line as an input */ |
191 | gpio_line_config(irq2gpio[irq], IXP4XX_GPIO_IN); | 191 | gpio_line_config(irq2gpio[d->irq], IXP4XX_GPIO_IN); |
192 | 192 | ||
193 | return 0; | 193 | return 0; |
194 | } | 194 | } |
195 | 195 | ||
196 | static void ixp4xx_irq_mask(unsigned int irq) | 196 | static void ixp4xx_irq_mask(struct irq_data *d) |
197 | { | 197 | { |
198 | if ((cpu_is_ixp46x() || cpu_is_ixp43x()) && irq >= 32) | 198 | if ((cpu_is_ixp46x() || cpu_is_ixp43x()) && d->irq >= 32) |
199 | *IXP4XX_ICMR2 &= ~(1 << (irq - 32)); | 199 | *IXP4XX_ICMR2 &= ~(1 << (d->irq - 32)); |
200 | else | 200 | else |
201 | *IXP4XX_ICMR &= ~(1 << irq); | 201 | *IXP4XX_ICMR &= ~(1 << d->irq); |
202 | } | 202 | } |
203 | 203 | ||
204 | static void ixp4xx_irq_ack(unsigned int irq) | 204 | static void ixp4xx_irq_ack(struct irq_data *d) |
205 | { | 205 | { |
206 | int line = (irq < 32) ? irq2gpio[irq] : -1; | 206 | int line = (d->irq < 32) ? irq2gpio[d->irq] : -1; |
207 | 207 | ||
208 | if (line >= 0) | 208 | if (line >= 0) |
209 | *IXP4XX_GPIO_GPISR = (1 << line); | 209 | *IXP4XX_GPIO_GPISR = (1 << line); |
@@ -213,23 +213,23 @@ static void ixp4xx_irq_ack(unsigned int irq) | |||
213 | * Level triggered interrupts on GPIO lines can only be cleared when the | 213 | * Level triggered interrupts on GPIO lines can only be cleared when the |
214 | * interrupt condition disappears. | 214 | * interrupt condition disappears. |
215 | */ | 215 | */ |
216 | static void ixp4xx_irq_unmask(unsigned int irq) | 216 | static void ixp4xx_irq_unmask(struct irq_data *d) |
217 | { | 217 | { |
218 | if (!(ixp4xx_irq_edge & (1 << irq))) | 218 | if (!(ixp4xx_irq_edge & (1 << d->irq))) |
219 | ixp4xx_irq_ack(irq); | 219 | ixp4xx_irq_ack(d); |
220 | 220 | ||
221 | if ((cpu_is_ixp46x() || cpu_is_ixp43x()) && irq >= 32) | 221 | if ((cpu_is_ixp46x() || cpu_is_ixp43x()) && d->irq >= 32) |
222 | *IXP4XX_ICMR2 |= (1 << (irq - 32)); | 222 | *IXP4XX_ICMR2 |= (1 << (d->irq - 32)); |
223 | else | 223 | else |
224 | *IXP4XX_ICMR |= (1 << irq); | 224 | *IXP4XX_ICMR |= (1 << d->irq); |
225 | } | 225 | } |
226 | 226 | ||
227 | static struct irq_chip ixp4xx_irq_chip = { | 227 | static struct irq_chip ixp4xx_irq_chip = { |
228 | .name = "IXP4xx", | 228 | .name = "IXP4xx", |
229 | .ack = ixp4xx_irq_ack, | 229 | .irq_ack = ixp4xx_irq_ack, |
230 | .mask = ixp4xx_irq_mask, | 230 | .irq_mask = ixp4xx_irq_mask, |
231 | .unmask = ixp4xx_irq_unmask, | 231 | .irq_unmask = ixp4xx_irq_unmask, |
232 | .set_type = ixp4xx_set_irq_type, | 232 | .irq_set_type = ixp4xx_set_irq_type, |
233 | }; | 233 | }; |
234 | 234 | ||
235 | void __init ixp4xx_init_irq(void) | 235 | void __init ixp4xx_init_irq(void) |