aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-06 18:39:28 -0500
committerGreg Ungerer <gerg@uclinux.org>2011-03-15 07:01:52 -0400
commit2730158ab2dd5c5df863da8135c07bb10acac60f (patch)
tree8351303db8c4ef757b2446efa9340471a5c9f9f7
parentbe497ddfd0d8a0aa3a84c41bb84bf10d2cb7cb7d (diff)
m68knommu: Convert 5272 intc irq_chip to new functions
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
-rw-r--r--arch/m68knommu/platform/5272/intc.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/arch/m68knommu/platform/5272/intc.c b/arch/m68knommu/platform/5272/intc.c
index 2833909abfe8..969ff0a467c6 100644
--- a/arch/m68knommu/platform/5272/intc.c
+++ b/arch/m68knommu/platform/5272/intc.c
@@ -78,8 +78,10 @@ static struct irqmap intc_irqmap[MCFINT_VECMAX - MCFINT_VECBASE] = {
78 * an interrupt on this irq (for the external irqs). So this mask function 78 * an interrupt on this irq (for the external irqs). So this mask function
79 * is also an ack_mask function. 79 * is also an ack_mask function.
80 */ 80 */
81static void intc_irq_mask(unsigned int irq) 81static void intc_irq_mask(struct irq_data *d)
82{ 82{
83 unsigned int irq = d->irq;
84
83 if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) { 85 if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) {
84 u32 v; 86 u32 v;
85 irq -= MCFINT_VECBASE; 87 irq -= MCFINT_VECBASE;
@@ -88,8 +90,10 @@ static void intc_irq_mask(unsigned int irq)
88 } 90 }
89} 91}
90 92
91static void intc_irq_unmask(unsigned int irq) 93static void intc_irq_unmask(struct irq_data *d)
92{ 94{
95 unsigned int irq = d->irq;
96
93 if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) { 97 if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) {
94 u32 v; 98 u32 v;
95 irq -= MCFINT_VECBASE; 99 irq -= MCFINT_VECBASE;
@@ -98,8 +102,10 @@ static void intc_irq_unmask(unsigned int irq)
98 } 102 }
99} 103}
100 104
101static void intc_irq_ack(unsigned int irq) 105static void intc_irq_ack(struct irq_data *d)
102{ 106{
107 unsigned int irq = d->irq;
108
103 /* Only external interrupts are acked */ 109 /* Only external interrupts are acked */
104 if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) { 110 if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) {
105 irq -= MCFINT_VECBASE; 111 irq -= MCFINT_VECBASE;
@@ -113,8 +119,10 @@ static void intc_irq_ack(unsigned int irq)
113 } 119 }
114} 120}
115 121
116static int intc_irq_set_type(unsigned int irq, unsigned int type) 122static int intc_irq_set_type(struct irq_data *d, unsigned int type)
117{ 123{
124 unsigned int irq = d->irq;
125
118 if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) { 126 if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) {
119 irq -= MCFINT_VECBASE; 127 irq -= MCFINT_VECBASE;
120 if (intc_irqmap[irq].ack) { 128 if (intc_irqmap[irq].ack) {
@@ -137,17 +145,17 @@ static int intc_irq_set_type(unsigned int irq, unsigned int type)
137 */ 145 */
138static void intc_external_irq(unsigned int irq, struct irq_desc *desc) 146static void intc_external_irq(unsigned int irq, struct irq_desc *desc)
139{ 147{
140 desc->chip->ack(irq); 148 get_irq_desc_chip(desc)->irq_ack(&desc->irq_data);
141 handle_simple_irq(irq, desc); 149 handle_simple_irq(irq, desc);
142} 150}
143 151
144static struct irq_chip intc_irq_chip = { 152static struct irq_chip intc_irq_chip = {
145 .name = "CF-INTC", 153 .name = "CF-INTC",
146 .mask = intc_irq_mask, 154 .irq_mask = intc_irq_mask,
147 .unmask = intc_irq_unmask, 155 .irq_unmask = intc_irq_unmask,
148 .mask_ack = intc_irq_mask, 156 .irq_mask_ack = intc_irq_mask,
149 .ack = intc_irq_ack, 157 .irq_ack = intc_irq_ack,
150 .set_type = intc_irq_set_type, 158 .irq_set_type = intc_irq_set_type,
151}; 159};
152 160
153void __init init_IRQ(void) 161void __init init_IRQ(void)