aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2011-03-07 08:59:23 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-03-09 19:03:58 -0500
commit5b250889b33bcf06d0d200dbd18d0a3aa5af6ca3 (patch)
treef003ce52f0fe9005f65c428c83dff64ec5269b55 /arch
parent712d5d799a0e099437fc4dd42058a33d4fc37882 (diff)
powerpc: platforms/86xx irq_data conversion.
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/86xx/gef_pic.c22
-rw-r--r--arch/powerpc/platforms/86xx/pic.c5
2 files changed, 15 insertions, 12 deletions
diff --git a/arch/powerpc/platforms/86xx/gef_pic.c b/arch/powerpc/platforms/86xx/gef_pic.c
index 6df9e2561c06..0adfe3b740cd 100644
--- a/arch/powerpc/platforms/86xx/gef_pic.c
+++ b/arch/powerpc/platforms/86xx/gef_pic.c
@@ -95,6 +95,7 @@ static int gef_pic_cascade_irq;
95 95
96void gef_pic_cascade(unsigned int irq, struct irq_desc *desc) 96void gef_pic_cascade(unsigned int irq, struct irq_desc *desc)
97{ 97{
98 struct irq_chip *chip = get_irq_desc_chip(desc);
98 unsigned int cascade_irq; 99 unsigned int cascade_irq;
99 100
100 /* 101 /*
@@ -106,17 +107,16 @@ void gef_pic_cascade(unsigned int irq, struct irq_desc *desc)
106 if (cascade_irq != NO_IRQ) 107 if (cascade_irq != NO_IRQ)
107 generic_handle_irq(cascade_irq); 108 generic_handle_irq(cascade_irq);
108 109
109 desc->chip->eoi(irq); 110 chip->irq_eoi(&desc->irq_data);
110
111} 111}
112 112
113static void gef_pic_mask(unsigned int virq) 113static void gef_pic_mask(struct irq_data *d)
114{ 114{
115 unsigned long flags; 115 unsigned long flags;
116 unsigned int hwirq; 116 unsigned int hwirq;
117 u32 mask; 117 u32 mask;
118 118
119 hwirq = gef_irq_to_hw(virq); 119 hwirq = gef_irq_to_hw(d->irq);
120 120
121 raw_spin_lock_irqsave(&gef_pic_lock, flags); 121 raw_spin_lock_irqsave(&gef_pic_lock, flags);
122 mask = in_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0)); 122 mask = in_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0));
@@ -125,21 +125,21 @@ static void gef_pic_mask(unsigned int virq)
125 raw_spin_unlock_irqrestore(&gef_pic_lock, flags); 125 raw_spin_unlock_irqrestore(&gef_pic_lock, flags);
126} 126}
127 127
128static void gef_pic_mask_ack(unsigned int virq) 128static void gef_pic_mask_ack(struct irq_data *d)
129{ 129{
130 /* Don't think we actually have to do anything to ack an interrupt, 130 /* Don't think we actually have to do anything to ack an interrupt,
131 * we just need to clear down the devices interrupt and it will go away 131 * we just need to clear down the devices interrupt and it will go away
132 */ 132 */
133 gef_pic_mask(virq); 133 gef_pic_mask(d);
134} 134}
135 135
136static void gef_pic_unmask(unsigned int virq) 136static void gef_pic_unmask(struct irq_data *d)
137{ 137{
138 unsigned long flags; 138 unsigned long flags;
139 unsigned int hwirq; 139 unsigned int hwirq;
140 u32 mask; 140 u32 mask;
141 141
142 hwirq = gef_irq_to_hw(virq); 142 hwirq = gef_irq_to_hw(d->irq);
143 143
144 raw_spin_lock_irqsave(&gef_pic_lock, flags); 144 raw_spin_lock_irqsave(&gef_pic_lock, flags);
145 mask = in_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0)); 145 mask = in_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0));
@@ -150,9 +150,9 @@ static void gef_pic_unmask(unsigned int virq)
150 150
151static struct irq_chip gef_pic_chip = { 151static struct irq_chip gef_pic_chip = {
152 .name = "gefp", 152 .name = "gefp",
153 .mask = gef_pic_mask, 153 .irq_mask = gef_pic_mask,
154 .mask_ack = gef_pic_mask_ack, 154 .irq_mask_ack = gef_pic_mask_ack,
155 .unmask = gef_pic_unmask, 155 .irq_unmask = gef_pic_unmask,
156}; 156};
157 157
158 158
diff --git a/arch/powerpc/platforms/86xx/pic.c b/arch/powerpc/platforms/86xx/pic.c
index 668275d9e668..cbe33639b478 100644
--- a/arch/powerpc/platforms/86xx/pic.c
+++ b/arch/powerpc/platforms/86xx/pic.c
@@ -19,10 +19,13 @@
19#ifdef CONFIG_PPC_I8259 19#ifdef CONFIG_PPC_I8259
20static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc) 20static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc)
21{ 21{
22 struct irq_chip *chip = get_irq_desc_chip(desc);
22 unsigned int cascade_irq = i8259_irq(); 23 unsigned int cascade_irq = i8259_irq();
24
23 if (cascade_irq != NO_IRQ) 25 if (cascade_irq != NO_IRQ)
24 generic_handle_irq(cascade_irq); 26 generic_handle_irq(cascade_irq);
25 desc->chip->eoi(irq); 27
28 chip->irq_eoi(&desc->irq_data);
26} 29}
27#endif /* CONFIG_PPC_I8259 */ 30#endif /* CONFIG_PPC_I8259 */
28 31