ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / mips / ddb5xxx / common / irq.c
1 /*
2  * Copyright 2001 MontaVista Software Inc.
3  * Author: jsun@mvista.com or jsun@junsun.net
4  *
5  * arch/mips/ddb5xxx/common/irq.c
6  *     Common irq code for DDB boards.  This really should belong
7  *      arch/mips/kernel/irq.c.  Need to talk to Ralf.
8  *
9  * This program is free software; you can redistribute  it and/or modify it
10  * under  the terms of  the GNU General  Public License as published by the
11  * Free Software Foundation;  either version 2 of the  License, or (at your
12  * option) any later version.
13  */
14 #include <linux/config.h>
15 #include <linux/init.h>
16 #include <asm/irq.h>
17
18 void (*irq_setup)(void);
19
20 #ifdef CONFIG_KGDB
21 static int kgdb_flag = 1;
22 static int __init nokgdb(char *str)
23 {
24         kgdb_flag = 0;
25         return 1;
26 }
27 __setup("nokgdb", nokgdb);
28 #endif
29
30 void __init init_IRQ(void)
31 {
32 #ifdef CONFIG_KGDB
33         extern void breakpoint(void);
34         extern void set_debug_traps(void);
35
36         if (kgdb_flag) {
37                 printk("Wait for gdb client connection ...\n");
38                 set_debug_traps();
39                 breakpoint();
40         }
41 #endif
42         /* set up default irq controller */
43         init_generic_irq();
44
45         /* invoke board-specific irq setup */
46         irq_setup();
47 }