diff options
Diffstat (limited to 'arch/arm/mach-ixp2000')
-rw-r--r-- | arch/arm/mach-ixp2000/core.c | 70 | ||||
-rw-r--r-- | arch/arm/mach-ixp2000/ixdp2x00.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-ixp2000/ixdp2x01.c | 18 |
3 files changed, 56 insertions, 50 deletions
diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c index e24e3d05397f..5fc4e064b650 100644 --- a/arch/arm/mach-ixp2000/core.c +++ b/arch/arm/mach-ixp2000/core.c | |||
@@ -309,9 +309,9 @@ static void ixp2000_GPIO_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
309 | } | 309 | } |
310 | } | 310 | } |
311 | 311 | ||
312 | static int ixp2000_GPIO_irq_type(unsigned int irq, unsigned int type) | 312 | static int ixp2000_GPIO_irq_type(struct irq_data *d, unsigned int type) |
313 | { | 313 | { |
314 | int line = irq - IRQ_IXP2000_GPIO0; | 314 | int line = d->irq - IRQ_IXP2000_GPIO0; |
315 | 315 | ||
316 | /* | 316 | /* |
317 | * First, configure this GPIO line as an input. | 317 | * First, configure this GPIO line as an input. |
@@ -342,8 +342,10 @@ static int ixp2000_GPIO_irq_type(unsigned int irq, unsigned int type) | |||
342 | return 0; | 342 | return 0; |
343 | } | 343 | } |
344 | 344 | ||
345 | static void ixp2000_GPIO_irq_mask_ack(unsigned int irq) | 345 | static void ixp2000_GPIO_irq_mask_ack(struct irq_data *d) |
346 | { | 346 | { |
347 | unsigned int irq = d->irq; | ||
348 | |||
347 | ixp2000_reg_write(IXP2000_GPIO_INCR, (1 << (irq - IRQ_IXP2000_GPIO0))); | 349 | ixp2000_reg_write(IXP2000_GPIO_INCR, (1 << (irq - IRQ_IXP2000_GPIO0))); |
348 | 350 | ||
349 | ixp2000_reg_write(IXP2000_GPIO_EDSR, (1 << (irq - IRQ_IXP2000_GPIO0))); | 351 | ixp2000_reg_write(IXP2000_GPIO_EDSR, (1 << (irq - IRQ_IXP2000_GPIO0))); |
@@ -351,38 +353,42 @@ static void ixp2000_GPIO_irq_mask_ack(unsigned int irq) | |||
351 | ixp2000_reg_wrb(IXP2000_GPIO_INST, (1 << (irq - IRQ_IXP2000_GPIO0))); | 353 | ixp2000_reg_wrb(IXP2000_GPIO_INST, (1 << (irq - IRQ_IXP2000_GPIO0))); |
352 | } | 354 | } |
353 | 355 | ||
354 | static void ixp2000_GPIO_irq_mask(unsigned int irq) | 356 | static void ixp2000_GPIO_irq_mask(struct irq_data *d) |
355 | { | 357 | { |
358 | unsigned int irq = d->irq; | ||
359 | |||
356 | ixp2000_reg_wrb(IXP2000_GPIO_INCR, (1 << (irq - IRQ_IXP2000_GPIO0))); | 360 | ixp2000_reg_wrb(IXP2000_GPIO_INCR, (1 << (irq - IRQ_IXP2000_GPIO0))); |
357 | } | 361 | } |
358 | 362 | ||
359 | static void ixp2000_GPIO_irq_unmask(unsigned int irq) | 363 | static void ixp2000_GPIO_irq_unmask(struct irq_data *d) |
360 | { | 364 | { |
365 | unsigned int irq = d->irq; | ||
366 | |||
361 | ixp2000_reg_write(IXP2000_GPIO_INSR, (1 << (irq - IRQ_IXP2000_GPIO0))); | 367 | ixp2000_reg_write(IXP2000_GPIO_INSR, (1 << (irq - IRQ_IXP2000_GPIO0))); |
362 | } | 368 | } |
363 | 369 | ||
364 | static struct irq_chip ixp2000_GPIO_irq_chip = { | 370 | static struct irq_chip ixp2000_GPIO_irq_chip = { |
365 | .ack = ixp2000_GPIO_irq_mask_ack, | 371 | .irq_ack = ixp2000_GPIO_irq_mask_ack, |
366 | .mask = ixp2000_GPIO_irq_mask, | 372 | .irq_mask = ixp2000_GPIO_irq_mask, |
367 | .unmask = ixp2000_GPIO_irq_unmask, | 373 | .irq_unmask = ixp2000_GPIO_irq_unmask, |
368 | .set_type = ixp2000_GPIO_irq_type, | 374 | .irq_set_type = ixp2000_GPIO_irq_type, |
369 | }; | 375 | }; |
370 | 376 | ||
371 | static void ixp2000_pci_irq_mask(unsigned int irq) | 377 | static void ixp2000_pci_irq_mask(struct irq_data *d) |
372 | { | 378 | { |
373 | unsigned long temp = *IXP2000_PCI_XSCALE_INT_ENABLE; | 379 | unsigned long temp = *IXP2000_PCI_XSCALE_INT_ENABLE; |
374 | if (irq == IRQ_IXP2000_PCIA) | 380 | if (d->irq == IRQ_IXP2000_PCIA) |
375 | ixp2000_reg_wrb(IXP2000_PCI_XSCALE_INT_ENABLE, (temp & ~(1 << 26))); | 381 | ixp2000_reg_wrb(IXP2000_PCI_XSCALE_INT_ENABLE, (temp & ~(1 << 26))); |
376 | else if (irq == IRQ_IXP2000_PCIB) | 382 | else if (d->irq == IRQ_IXP2000_PCIB) |
377 | ixp2000_reg_wrb(IXP2000_PCI_XSCALE_INT_ENABLE, (temp & ~(1 << 27))); | 383 | ixp2000_reg_wrb(IXP2000_PCI_XSCALE_INT_ENABLE, (temp & ~(1 << 27))); |
378 | } | 384 | } |
379 | 385 | ||
380 | static void ixp2000_pci_irq_unmask(unsigned int irq) | 386 | static void ixp2000_pci_irq_unmask(struct irq_data *d) |
381 | { | 387 | { |
382 | unsigned long temp = *IXP2000_PCI_XSCALE_INT_ENABLE; | 388 | unsigned long temp = *IXP2000_PCI_XSCALE_INT_ENABLE; |
383 | if (irq == IRQ_IXP2000_PCIA) | 389 | if (d->irq == IRQ_IXP2000_PCIA) |
384 | ixp2000_reg_write(IXP2000_PCI_XSCALE_INT_ENABLE, (temp | (1 << 26))); | 390 | ixp2000_reg_write(IXP2000_PCI_XSCALE_INT_ENABLE, (temp | (1 << 26))); |
385 | else if (irq == IRQ_IXP2000_PCIB) | 391 | else if (d->irq == IRQ_IXP2000_PCIB) |
386 | ixp2000_reg_write(IXP2000_PCI_XSCALE_INT_ENABLE, (temp | (1 << 27))); | 392 | ixp2000_reg_write(IXP2000_PCI_XSCALE_INT_ENABLE, (temp | (1 << 27))); |
387 | } | 393 | } |
388 | 394 | ||
@@ -401,44 +407,44 @@ static void ixp2000_err_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
401 | } | 407 | } |
402 | } | 408 | } |
403 | 409 | ||
404 | static void ixp2000_err_irq_mask(unsigned int irq) | 410 | static void ixp2000_err_irq_mask(struct irq_data *d) |
405 | { | 411 | { |
406 | ixp2000_reg_write(IXP2000_IRQ_ERR_ENABLE_CLR, | 412 | ixp2000_reg_write(IXP2000_IRQ_ERR_ENABLE_CLR, |
407 | (1 << (irq - IRQ_IXP2000_DRAM0_MIN_ERR))); | 413 | (1 << (d->irq - IRQ_IXP2000_DRAM0_MIN_ERR))); |
408 | } | 414 | } |
409 | 415 | ||
410 | static void ixp2000_err_irq_unmask(unsigned int irq) | 416 | static void ixp2000_err_irq_unmask(struct irq_data *d) |
411 | { | 417 | { |
412 | ixp2000_reg_write(IXP2000_IRQ_ERR_ENABLE_SET, | 418 | ixp2000_reg_write(IXP2000_IRQ_ERR_ENABLE_SET, |
413 | (1 << (irq - IRQ_IXP2000_DRAM0_MIN_ERR))); | 419 | (1 << (d->irq - IRQ_IXP2000_DRAM0_MIN_ERR))); |
414 | } | 420 | } |
415 | 421 | ||
416 | static struct irq_chip ixp2000_err_irq_chip = { | 422 | static struct irq_chip ixp2000_err_irq_chip = { |
417 | .ack = ixp2000_err_irq_mask, | 423 | .irq_ack = ixp2000_err_irq_mask, |
418 | .mask = ixp2000_err_irq_mask, | 424 | .irq_mask = ixp2000_err_irq_mask, |
419 | .unmask = ixp2000_err_irq_unmask | 425 | .irq_unmask = ixp2000_err_irq_unmask |
420 | }; | 426 | }; |
421 | 427 | ||
422 | static struct irq_chip ixp2000_pci_irq_chip = { | 428 | static struct irq_chip ixp2000_pci_irq_chip = { |
423 | .ack = ixp2000_pci_irq_mask, | 429 | .irq_ack = ixp2000_pci_irq_mask, |
424 | .mask = ixp2000_pci_irq_mask, | 430 | .irq_mask = ixp2000_pci_irq_mask, |
425 | .unmask = ixp2000_pci_irq_unmask | 431 | .irq_unmask = ixp2000_pci_irq_unmask |
426 | }; | 432 | }; |
427 | 433 | ||
428 | static void ixp2000_irq_mask(unsigned int irq) | 434 | static void ixp2000_irq_mask(struct irq_data *d) |
429 | { | 435 | { |
430 | ixp2000_reg_wrb(IXP2000_IRQ_ENABLE_CLR, (1 << irq)); | 436 | ixp2000_reg_wrb(IXP2000_IRQ_ENABLE_CLR, (1 << d->irq)); |
431 | } | 437 | } |
432 | 438 | ||
433 | static void ixp2000_irq_unmask(unsigned int irq) | 439 | static void ixp2000_irq_unmask(struct irq_data *d) |
434 | { | 440 | { |
435 | ixp2000_reg_write(IXP2000_IRQ_ENABLE_SET, (1 << irq)); | 441 | ixp2000_reg_write(IXP2000_IRQ_ENABLE_SET, (1 << d->irq)); |
436 | } | 442 | } |
437 | 443 | ||
438 | static struct irq_chip ixp2000_irq_chip = { | 444 | static struct irq_chip ixp2000_irq_chip = { |
439 | .ack = ixp2000_irq_mask, | 445 | .irq_ack = ixp2000_irq_mask, |
440 | .mask = ixp2000_irq_mask, | 446 | .irq_mask = ixp2000_irq_mask, |
441 | .unmask = ixp2000_irq_unmask | 447 | .irq_unmask = ixp2000_irq_unmask |
442 | }; | 448 | }; |
443 | 449 | ||
444 | void __init ixp2000_init_irq(void) | 450 | void __init ixp2000_init_irq(void) |
diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c index 91fffb9b2084..7d90d3f13ee8 100644 --- a/arch/arm/mach-ixp2000/ixdp2x00.c +++ b/arch/arm/mach-ixp2000/ixdp2x00.c | |||
@@ -63,7 +63,7 @@ static struct slowport_cfg slowport_cpld_cfg = { | |||
63 | }; | 63 | }; |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | static void ixdp2x00_irq_mask(unsigned int irq) | 66 | static void ixdp2x00_irq_mask(struct irq_data *d) |
67 | { | 67 | { |
68 | unsigned long dummy; | 68 | unsigned long dummy; |
69 | static struct slowport_cfg old_cfg; | 69 | static struct slowport_cfg old_cfg; |
@@ -78,7 +78,7 @@ static void ixdp2x00_irq_mask(unsigned int irq) | |||
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | dummy = *board_irq_mask; | 80 | dummy = *board_irq_mask; |
81 | dummy |= IXP2000_BOARD_IRQ_MASK(irq); | 81 | dummy |= IXP2000_BOARD_IRQ_MASK(d->irq); |
82 | ixp2000_reg_wrb(board_irq_mask, dummy); | 82 | ixp2000_reg_wrb(board_irq_mask, dummy); |
83 | 83 | ||
84 | #ifdef CONFIG_ARCH_IXDP2400 | 84 | #ifdef CONFIG_ARCH_IXDP2400 |
@@ -87,7 +87,7 @@ static void ixdp2x00_irq_mask(unsigned int irq) | |||
87 | #endif | 87 | #endif |
88 | } | 88 | } |
89 | 89 | ||
90 | static void ixdp2x00_irq_unmask(unsigned int irq) | 90 | static void ixdp2x00_irq_unmask(struct irq_data *d) |
91 | { | 91 | { |
92 | unsigned long dummy; | 92 | unsigned long dummy; |
93 | static struct slowport_cfg old_cfg; | 93 | static struct slowport_cfg old_cfg; |
@@ -98,7 +98,7 @@ static void ixdp2x00_irq_unmask(unsigned int irq) | |||
98 | #endif | 98 | #endif |
99 | 99 | ||
100 | dummy = *board_irq_mask; | 100 | dummy = *board_irq_mask; |
101 | dummy &= ~IXP2000_BOARD_IRQ_MASK(irq); | 101 | dummy &= ~IXP2000_BOARD_IRQ_MASK(d->irq); |
102 | ixp2000_reg_wrb(board_irq_mask, dummy); | 102 | ixp2000_reg_wrb(board_irq_mask, dummy); |
103 | 103 | ||
104 | if (machine_is_ixdp2400()) | 104 | if (machine_is_ixdp2400()) |
@@ -111,7 +111,7 @@ static void ixdp2x00_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
111 | static struct slowport_cfg old_cfg; | 111 | static struct slowport_cfg old_cfg; |
112 | int i; | 112 | int i; |
113 | 113 | ||
114 | desc->chip->mask(irq); | 114 | desc->irq_data.chip->irq_mask(&desc->irq_data); |
115 | 115 | ||
116 | #ifdef CONFIG_ARCH_IXDP2400 | 116 | #ifdef CONFIG_ARCH_IXDP2400 |
117 | if (machine_is_ixdp2400()) | 117 | if (machine_is_ixdp2400()) |
@@ -133,13 +133,13 @@ static void ixdp2x00_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
133 | } | 133 | } |
134 | } | 134 | } |
135 | 135 | ||
136 | desc->chip->unmask(irq); | 136 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
137 | } | 137 | } |
138 | 138 | ||
139 | static struct irq_chip ixdp2x00_cpld_irq_chip = { | 139 | static struct irq_chip ixdp2x00_cpld_irq_chip = { |
140 | .ack = ixdp2x00_irq_mask, | 140 | .irq_ack = ixdp2x00_irq_mask, |
141 | .mask = ixdp2x00_irq_mask, | 141 | .irq_mask = ixdp2x00_irq_mask, |
142 | .unmask = ixdp2x00_irq_unmask | 142 | .irq_unmask = ixdp2x00_irq_unmask |
143 | }; | 143 | }; |
144 | 144 | ||
145 | void __init ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigned long *mask_reg, unsigned long nr_of_irqs) | 145 | void __init ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigned long *mask_reg, unsigned long nr_of_irqs) |
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c index 6c121bdbe311..34b1b2af37c8 100644 --- a/arch/arm/mach-ixp2000/ixdp2x01.c +++ b/arch/arm/mach-ixp2000/ixdp2x01.c | |||
@@ -48,16 +48,16 @@ | |||
48 | /************************************************************************* | 48 | /************************************************************************* |
49 | * IXDP2x01 IRQ Handling | 49 | * IXDP2x01 IRQ Handling |
50 | *************************************************************************/ | 50 | *************************************************************************/ |
51 | static void ixdp2x01_irq_mask(unsigned int irq) | 51 | static void ixdp2x01_irq_mask(struct irq_data *d) |
52 | { | 52 | { |
53 | ixp2000_reg_wrb(IXDP2X01_INT_MASK_SET_REG, | 53 | ixp2000_reg_wrb(IXDP2X01_INT_MASK_SET_REG, |
54 | IXP2000_BOARD_IRQ_MASK(irq)); | 54 | IXP2000_BOARD_IRQ_MASK(d->irq)); |
55 | } | 55 | } |
56 | 56 | ||
57 | static void ixdp2x01_irq_unmask(unsigned int irq) | 57 | static void ixdp2x01_irq_unmask(struct irq_data *d) |
58 | { | 58 | { |
59 | ixp2000_reg_write(IXDP2X01_INT_MASK_CLR_REG, | 59 | ixp2000_reg_write(IXDP2X01_INT_MASK_CLR_REG, |
60 | IXP2000_BOARD_IRQ_MASK(irq)); | 60 | IXP2000_BOARD_IRQ_MASK(d->irq)); |
61 | } | 61 | } |
62 | 62 | ||
63 | static u32 valid_irq_mask; | 63 | static u32 valid_irq_mask; |
@@ -67,7 +67,7 @@ static void ixdp2x01_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
67 | u32 ex_interrupt; | 67 | u32 ex_interrupt; |
68 | int i; | 68 | int i; |
69 | 69 | ||
70 | desc->chip->mask(irq); | 70 | desc->irq_data.chip->irq_mask(&desc->irq_data); |
71 | 71 | ||
72 | ex_interrupt = *IXDP2X01_INT_STAT_REG & valid_irq_mask; | 72 | ex_interrupt = *IXDP2X01_INT_STAT_REG & valid_irq_mask; |
73 | 73 | ||
@@ -83,13 +83,13 @@ static void ixdp2x01_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
83 | } | 83 | } |
84 | } | 84 | } |
85 | 85 | ||
86 | desc->chip->unmask(irq); | 86 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
87 | } | 87 | } |
88 | 88 | ||
89 | static struct irq_chip ixdp2x01_irq_chip = { | 89 | static struct irq_chip ixdp2x01_irq_chip = { |
90 | .mask = ixdp2x01_irq_mask, | 90 | .irq_mask = ixdp2x01_irq_mask, |
91 | .ack = ixdp2x01_irq_mask, | 91 | .irq_ack = ixdp2x01_irq_mask, |
92 | .unmask = ixdp2x01_irq_unmask | 92 | .irq_unmask = ixdp2x01_irq_unmask |
93 | }; | 93 | }; |
94 | 94 | ||
95 | /* | 95 | /* |