aboutsummaryrefslogtreecommitdiffstats
path: root/arch/unicore32/kernel/irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/unicore32/kernel/irq.c')
-rw-r--r--arch/unicore32/kernel/irq.c58
1 files changed, 8 insertions, 50 deletions
diff --git a/arch/unicore32/kernel/irq.c b/arch/unicore32/kernel/irq.c
index b23624cf3062..2aa30a364bbe 100644
--- a/arch/unicore32/kernel/irq.c
+++ b/arch/unicore32/kernel/irq.c
@@ -321,24 +321,24 @@ void __init init_IRQ(void)
321 writel(1, INTC_ICCR); 321 writel(1, INTC_ICCR);
322 322
323 for (irq = 0; irq < IRQ_GPIOHIGH; irq++) { 323 for (irq = 0; irq < IRQ_GPIOHIGH; irq++) {
324 set_irq_chip(irq, &puv3_low_gpio_chip); 324 irq_set_chip(irq, &puv3_low_gpio_chip);
325 set_irq_handler(irq, handle_edge_irq); 325 irq_set_handler(irq, handle_edge_irq);
326 irq_modify_status(irq, 326 irq_modify_status(irq,
327 IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN, 327 IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN,
328 0); 328 0);
329 } 329 }
330 330
331 for (irq = IRQ_GPIOHIGH + 1; irq < IRQ_GPIO0; irq++) { 331 for (irq = IRQ_GPIOHIGH + 1; irq < IRQ_GPIO0; irq++) {
332 set_irq_chip(irq, &puv3_normal_chip); 332 irq_set_chip(irq, &puv3_normal_chip);
333 set_irq_handler(irq, handle_level_irq); 333 irq_set_handler(irq, handle_level_irq);
334 irq_modify_status(irq, 334 irq_modify_status(irq,
335 IRQ_NOREQUEST | IRQ_NOAUTOEN, 335 IRQ_NOREQUEST | IRQ_NOAUTOEN,
336 IRQ_NOPROBE); 336 IRQ_NOPROBE);
337 } 337 }
338 338
339 for (irq = IRQ_GPIO0; irq <= IRQ_GPIO27; irq++) { 339 for (irq = IRQ_GPIO0; irq <= IRQ_GPIO27; irq++) {
340 set_irq_chip(irq, &puv3_high_gpio_chip); 340 irq_set_chip(irq, &puv3_high_gpio_chip);
341 set_irq_handler(irq, handle_edge_irq); 341 irq_set_handler(irq, handle_edge_irq);
342 irq_modify_status(irq, 342 irq_modify_status(irq,
343 IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN, 343 IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN,
344 0); 344 0);
@@ -347,56 +347,14 @@ void __init init_IRQ(void)
347 /* 347 /*
348 * Install handler for GPIO 0-27 edge detect interrupts 348 * Install handler for GPIO 0-27 edge detect interrupts
349 */ 349 */
350 set_irq_chip(IRQ_GPIOHIGH, &puv3_normal_chip); 350 irq_set_chip(IRQ_GPIOHIGH, &puv3_normal_chip);
351 set_irq_chained_handler(IRQ_GPIOHIGH, puv3_gpio_handler); 351 irq_set_chained_handler(IRQ_GPIOHIGH, puv3_gpio_handler);
352 352
353#ifdef CONFIG_PUV3_GPIO 353#ifdef CONFIG_PUV3_GPIO
354 puv3_init_gpio(); 354 puv3_init_gpio();
355#endif 355#endif
356} 356}
357 357
358int show_interrupts(struct seq_file *p, void *v)
359{
360 int i = *(loff_t *) v, cpu;
361 struct irq_desc *desc;
362 struct irqaction *action;
363 unsigned long flags;
364
365 if (i == 0) {
366 char cpuname[12];
367
368 seq_printf(p, " ");
369 for_each_present_cpu(cpu) {
370 sprintf(cpuname, "CPU%d", cpu);
371 seq_printf(p, " %10s", cpuname);
372 }
373 seq_putc(p, '\n');
374 }
375
376 if (i < nr_irqs) {
377 desc = irq_to_desc(i);
378 raw_spin_lock_irqsave(&desc->lock, flags);
379 action = desc->action;
380 if (!action)
381 goto unlock;
382
383 seq_printf(p, "%3d: ", i);
384 for_each_present_cpu(cpu)
385 seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu));
386 seq_printf(p, " %10s", desc->irq_data.chip->name ? : "-");
387 seq_printf(p, " %s", action->name);
388 for (action = action->next; action; action = action->next)
389 seq_printf(p, ", %s", action->name);
390
391 seq_putc(p, '\n');
392unlock:
393 raw_spin_unlock_irqrestore(&desc->lock, flags);
394 } else if (i == nr_irqs) {
395 seq_printf(p, "Error in interrupt!\n");
396 }
397 return 0;
398}
399
400/* 358/*
401 * do_IRQ handles all hardware IRQ's. Decoded IRQs should not 359 * do_IRQ handles all hardware IRQ's. Decoded IRQs should not
402 * come via this function. Instead, they should provide their 360 * come via this function. Instead, they should provide their