import of upstream 2.4.34.4 from kernel.org
[linux-2.4.git] / arch / ia64 / hp / sim / hpsim_irq.c
1 /*
2  * Platform dependent support for HP simulator.
3  *
4  * Copyright (C) 1998-2001 Hewlett-Packard Co
5  * Copyright (C) 1998-2001 David Mosberger-Tang <davidm@hpl.hp.com>
6  */
7
8 #include <linux/init.h>
9 #include <linux/kernel.h>
10 #include <linux/sched.h>
11 #include <linux/irq.h>
12
13 static unsigned int
14 hpsim_irq_startup (unsigned int irq)
15 {
16         return 0;
17 }
18
19 static void
20 hpsim_irq_noop (unsigned int irq)
21 {
22 }
23
24 static struct hw_interrupt_type irq_type_hp_sim = {
25         .typename =     "hpsim",
26         .startup =      hpsim_irq_startup,
27         .shutdown =     hpsim_irq_noop,
28         .enable =       hpsim_irq_noop,
29         .disable =      hpsim_irq_noop,
30         .ack =          hpsim_irq_noop,
31         .end =          hpsim_irq_noop,
32         .set_affinity = (void (*)(unsigned int, unsigned long)) hpsim_irq_noop,
33 };
34
35 void __init
36 hpsim_irq_init (void)
37 {
38         irq_desc_t *idesc;
39         int i;
40
41         for (i = 0; i < NR_IRQS; ++i) {
42                 idesc = irq_desc(i);
43                 if (idesc->handler == &no_irq_type)
44                         idesc->handler = &irq_type_hp_sim;
45         }
46 }