diff options
Diffstat (limited to 'arch/sh/boards/mach-dreamcast/irq.c')
-rw-r--r-- | arch/sh/boards/mach-dreamcast/irq.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/sh/boards/mach-dreamcast/irq.c b/arch/sh/boards/mach-dreamcast/irq.c index f55fc8e795e9..d932667410ab 100644 --- a/arch/sh/boards/mach-dreamcast/irq.c +++ b/arch/sh/boards/mach-dreamcast/irq.c | |||
@@ -135,3 +135,30 @@ int systemasic_irq_demux(int irq) | |||
135 | /* Not reached */ | 135 | /* Not reached */ |
136 | return irq; | 136 | return irq; |
137 | } | 137 | } |
138 | |||
139 | void systemasic_irq_init(void) | ||
140 | { | ||
141 | int i, nid = cpu_to_node(boot_cpu_data); | ||
142 | |||
143 | /* Assign all virtual IRQs to the System ASIC int. handler */ | ||
144 | for (i = HW_EVENT_IRQ_BASE; i < HW_EVENT_IRQ_MAX; i++) { | ||
145 | unsigned int irq; | ||
146 | |||
147 | irq = create_irq_nr(i, nid); | ||
148 | if (unlikely(irq == 0)) { | ||
149 | pr_err("%s: failed hooking irq %d for systemasic\n", | ||
150 | __func__, i); | ||
151 | return; | ||
152 | } | ||
153 | |||
154 | if (unlikely(irq != i)) { | ||
155 | pr_err("%s: got irq %d but wanted %d, bailing.\n", | ||
156 | __func__, irq, i); | ||
157 | destroy_irq(irq); | ||
158 | return; | ||
159 | } | ||
160 | |||
161 | set_irq_chip_and_handler(i, &systemasic_int, | ||
162 | handle_level_irq); | ||
163 | } | ||
164 | } | ||