aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc
diff options
context:
space:
mode:
authorKyle McMartin <kyle@dreadnought.i.jkkm.org>2010-10-14 00:58:53 -0400
committerKyle McMartin <kyle@dreadnought.i.jkkm.org>2010-10-14 01:30:46 -0400
commit7998b3bd156478c35de685f90d4d0dda57916c60 (patch)
treee27b5e776df10982b9839fd1705bd9fef939e454 /drivers/parisc
parent14ff626a64f1c6848b303254be00b1b2ff33a655 (diff)
parisc: convert gsc and dino pci interrupts to flow handlers
Signed-off-by: Kyle McMartin <kyle@redhat.com>
Diffstat (limited to 'drivers/parisc')
-rw-r--r--drivers/parisc/dino.c21
-rw-r--r--drivers/parisc/gsc.c23
2 files changed, 13 insertions, 31 deletions
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c
index 3013c57f1217..d9f51485beee 100644
--- a/drivers/parisc/dino.c
+++ b/drivers/parisc/dino.c
@@ -296,7 +296,7 @@ static struct pci_port_ops dino_port_ops = {
296 .outl = dino_out32 296 .outl = dino_out32
297}; 297};
298 298
299static void dino_disable_irq(unsigned int irq) 299static void dino_mask_irq(unsigned int irq)
300{ 300{
301 struct dino_device *dino_dev = get_irq_chip_data(irq); 301 struct dino_device *dino_dev = get_irq_chip_data(irq);
302 int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS); 302 int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS);
@@ -308,7 +308,7 @@ static void dino_disable_irq(unsigned int irq)
308 __raw_writel(dino_dev->imr, dino_dev->hba.base_addr+DINO_IMR); 308 __raw_writel(dino_dev->imr, dino_dev->hba.base_addr+DINO_IMR);
309} 309}
310 310
311static void dino_enable_irq(unsigned int irq) 311static void dino_unmask_irq(unsigned int irq)
312{ 312{
313 struct dino_device *dino_dev = get_irq_chip_data(irq); 313 struct dino_device *dino_dev = get_irq_chip_data(irq);
314 int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS); 314 int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS);
@@ -345,20 +345,11 @@ static void dino_enable_irq(unsigned int irq)
345 } 345 }
346} 346}
347 347
348static unsigned int dino_startup_irq(unsigned int irq)
349{
350 dino_enable_irq(irq);
351 return 0;
352}
353
354static struct irq_chip dino_interrupt_type = { 348static struct irq_chip dino_interrupt_type = {
355 .name = "GSC-PCI", 349 .name = "GSC-PCI",
356 .startup = dino_startup_irq, 350 .unmask = dino_unmask_irq,
357 .shutdown = dino_disable_irq, 351 .mask = dino_mask_irq,
358 .enable = dino_enable_irq, 352 .ack = no_ack_irq,
359 .disable = dino_disable_irq,
360 .ack = no_ack_irq,
361 .end = no_end_irq,
362}; 353};
363 354
364 355
diff --git a/drivers/parisc/gsc.c b/drivers/parisc/gsc.c
index 68bccdafa897..e605298e3aee 100644
--- a/drivers/parisc/gsc.c
+++ b/drivers/parisc/gsc.c
@@ -105,7 +105,7 @@ int gsc_find_local_irq(unsigned int irq, int *global_irqs, int limit)
105 return NO_IRQ; 105 return NO_IRQ;
106} 106}
107 107
108static void gsc_asic_disable_irq(unsigned int irq) 108static void gsc_asic_mask_irq(unsigned int irq)
109{ 109{
110 struct gsc_asic *irq_dev = get_irq_chip_data(irq); 110 struct gsc_asic *irq_dev = get_irq_chip_data(irq);
111 int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32); 111 int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32);
@@ -120,7 +120,7 @@ static void gsc_asic_disable_irq(unsigned int irq)
120 gsc_writel(imr, irq_dev->hpa + OFFSET_IMR); 120 gsc_writel(imr, irq_dev->hpa + OFFSET_IMR);
121} 121}
122 122
123static void gsc_asic_enable_irq(unsigned int irq) 123static void gsc_asic_unmask_irq(unsigned int irq)
124{ 124{
125 struct gsc_asic *irq_dev = get_irq_chip_data(irq); 125 struct gsc_asic *irq_dev = get_irq_chip_data(irq);
126 int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32); 126 int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32);
@@ -139,20 +139,11 @@ static void gsc_asic_enable_irq(unsigned int irq)
139 */ 139 */
140} 140}
141 141
142static unsigned int gsc_asic_startup_irq(unsigned int irq)
143{
144 gsc_asic_enable_irq(irq);
145 return 0;
146}
147
148static struct irq_chip gsc_asic_interrupt_type = { 142static struct irq_chip gsc_asic_interrupt_type = {
149 .name = "GSC-ASIC", 143 .name = "GSC-ASIC",
150 .startup = gsc_asic_startup_irq, 144 .unmask = gsc_asic_unmask_irq,
151 .shutdown = gsc_asic_disable_irq, 145 .mask = gsc_asic_mask_irq,
152 .enable = gsc_asic_enable_irq, 146 .ack = no_ack_irq,
153 .disable = gsc_asic_disable_irq,
154 .ack = no_ack_irq,
155 .end = no_end_irq,
156}; 147};
157 148
158int gsc_assign_irq(struct irq_chip *type, void *data) 149int gsc_assign_irq(struct irq_chip *type, void *data)
@@ -162,7 +153,7 @@ int gsc_assign_irq(struct irq_chip *type, void *data)
162 if (irq > GSC_IRQ_MAX) 153 if (irq > GSC_IRQ_MAX)
163 return NO_IRQ; 154 return NO_IRQ;
164 155
165 set_irq_chip_and_handler(irq, type, parisc_do_IRQ); 156 set_irq_chip_and_handler(irq, type, handle_level_irq);
166 set_irq_chip_data(irq, data); 157 set_irq_chip_data(irq, data);
167 158
168 return irq++; 159 return irq++;