diff options
author | Manuel Lauss <mano@roarinelk.homelinux.net> | 2008-12-21 03:26:17 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-01-11 04:57:26 -0500 |
commit | 785e3268e2951d4c0c21417c8e5d8004b2ab2480 (patch) | |
tree | 3e7e98dbaf2592f22f65090325a823d36caa13f7 /arch/mips/alchemy/devboards/pb1500/board_setup.c | |
parent | 7179380ee9bdeb5fa2ff07581f512fe0f5382e5b (diff) |
MIPS: Alchemy: update core interrupt code.
This patch attempts to modernize core Alchemy interrupt handling code.
- add irq_chips for irq controllers instead of irq type,
- add a set_type() hook to change irq trigger type during runtime,
- add a set_wake() hook to control GPIO0..7 based wakeup,
- use linux' IRQF_TRIGGER_ constants instead of homebrew ones,
- enable GENERIC_HARDIRQS_NO__DO_IRQ.
- simplify plat_irq_dispatch
- merge au1xxx_irqmap into irq.c file, the only place where its
contents are referenced.
- board_init_irq() is now mandatory for every board; use it to register
the remaining (gpio-based) interrupt sources; update all boards
accordingly.
Run-tested on Db1200 and other Au1200 based platforms.
Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
delete mode 100644 arch/mips/alchemy/common/au1xxx_irqmap.c
Diffstat (limited to 'arch/mips/alchemy/devboards/pb1500/board_setup.c')
-rw-r--r-- | arch/mips/alchemy/devboards/pb1500/board_setup.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/arch/mips/alchemy/devboards/pb1500/board_setup.c b/arch/mips/alchemy/devboards/pb1500/board_setup.c index dcb36a66442f..fed3b093156a 100644 --- a/arch/mips/alchemy/devboards/pb1500/board_setup.c +++ b/arch/mips/alchemy/devboards/pb1500/board_setup.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/interrupt.h> | ||
28 | 29 | ||
29 | #include <asm/mach-au1x00/au1000.h> | 30 | #include <asm/mach-au1x00/au1000.h> |
30 | #include <asm/mach-pb1x00/pb1500.h> | 31 | #include <asm/mach-pb1x00/pb1500.h> |
@@ -38,15 +39,13 @@ char irq_tab_alchemy[][5] __initdata = { | |||
38 | }; | 39 | }; |
39 | 40 | ||
40 | struct au1xxx_irqmap __initdata au1xxx_irq_map[] = { | 41 | struct au1xxx_irqmap __initdata au1xxx_irq_map[] = { |
41 | { AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0 }, | 42 | { AU1500_GPIO_204, IRQF_TRIGGER_HIGH, 0 }, |
42 | { AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 }, | 43 | { AU1500_GPIO_201, IRQF_TRIGGER_LOW, 0 }, |
43 | { AU1500_GPIO_202, INTC_INT_LOW_LEVEL, 0 }, | 44 | { AU1500_GPIO_202, IRQF_TRIGGER_LOW, 0 }, |
44 | { AU1500_GPIO_203, INTC_INT_LOW_LEVEL, 0 }, | 45 | { AU1500_GPIO_203, IRQF_TRIGGER_LOW, 0 }, |
45 | { AU1500_GPIO_205, INTC_INT_LOW_LEVEL, 0 }, | 46 | { AU1500_GPIO_205, IRQF_TRIGGER_LOW, 0 }, |
46 | }; | 47 | }; |
47 | 48 | ||
48 | int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map); | ||
49 | |||
50 | 49 | ||
51 | const char *get_system_type(void) | 50 | const char *get_system_type(void) |
52 | { | 51 | { |
@@ -59,6 +58,11 @@ void board_reset(void) | |||
59 | au_writel(0x00000000, PB1500_RST_VDDI); | 58 | au_writel(0x00000000, PB1500_RST_VDDI); |
60 | } | 59 | } |
61 | 60 | ||
61 | void __init board_init_irq(void) | ||
62 | { | ||
63 | au1xxx_setup_irqmap(au1xxx_irq_map, ARRAY_SIZE(au1xxx_irq_map)); | ||
64 | } | ||
65 | |||
62 | void __init board_setup(void) | 66 | void __init board_setup(void) |
63 | { | 67 | { |
64 | u32 pin_func; | 68 | u32 pin_func; |