blob: c0d25a2a3e9caf1ddbf7eb396b23027347024856 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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
13static unsigned int
14hpsim_irq_startup (unsigned int irq)
15{
16 return 0;
17}
18
19static void
20hpsim_irq_noop (unsigned int irq)
21{
22}
23
24static void
25hpsim_set_affinity_noop (unsigned int a, cpumask_t b)
26{
27}
28
29static struct hw_interrupt_type irq_type_hp_sim = {
30 .typename = "hpsim",
31 .startup = hpsim_irq_startup,
32 .shutdown = hpsim_irq_noop,
33 .enable = hpsim_irq_noop,
34 .disable = hpsim_irq_noop,
35 .ack = hpsim_irq_noop,
36 .end = hpsim_irq_noop,
37 .set_affinity = hpsim_set_affinity_noop,
38};
39
40void __init
41hpsim_irq_init (void)
42{
43 irq_desc_t *idesc;
44 int i;
45
46 for (i = 0; i < NR_IRQS; ++i) {
47 idesc = irq_descp(i);
48 if (idesc->handler == &no_irq_type)
49 idesc->handler = &irq_type_hp_sim;
50 }
51}