2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * Copyright (C) 2003 Atheros Communications, Inc., All Rights Reserved.
7 * Copyright (C) 2006 FON Technology, SL.
8 * Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org>
9 * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
13 * Interrupt support for AR531X WiSOC.
16 #include <linux/autoconf.h>
17 #include <linux/init.h>
18 #include <linux/kernel_stat.h>
19 #include <linux/signal.h>
20 #include <linux/sched.h>
21 #include <linux/interrupt.h>
22 #include <linux/slab.h>
23 #include <linux/random.h>
25 #include <linux/delay.h>
26 #include <linux/reboot.h>
27 #include <linux/irq.h>
28 #include <asm/bootinfo.h>
29 #include <asm/mipsregs.h>
30 #include <asm/irq_cpu.h>
36 spurious_irq_handler(int cpl
, void *dev_id
)
39 printk("spurious_irq_handler: %d cause=0x%8.8x status=0x%8.8x\n",
40 cpl, cause_intrs, status_intrs);
47 spurious_misc_handler(int cpl
, void *dev_id
)
50 printk("spurious_misc_handler: 0x%x isr=0x%8.8x imr=0x%8.8x\n",
51 cpl, ar531x_isr, ar531x_imr);
56 static struct irqaction spurious_irq
= {
57 .handler
= spurious_irq_handler
,
58 .flags
= SA_INTERRUPT
,
59 .name
= "spurious_irq",
62 static struct irqaction spurious_misc
= {
63 .handler
= spurious_misc_handler
,
64 .flags
= SA_INTERRUPT
,
65 .name
= "spurious_misc",
68 asmlinkage
void plat_irq_dispatch(void)
70 #ifdef CONFIG_ATHEROS_AR5312
71 if (mips_machtype
== MACH_ATHEROS_AR5312
)
72 ar5312_irq_dispatch();
74 #ifdef CONFIG_ATHEROS_AR5315
75 if (mips_machtype
== MACH_ATHEROS_AR5315
)
76 ar5315_irq_dispatch();
80 void __init
arch_init_irq(void)
82 clear_c0_status(ST0_IM
);
85 /* Initialize interrupt controllers */
86 #ifdef CONFIG_ATHEROS_AR5312
87 if (mips_machtype
== MACH_ATHEROS_AR5312
)
88 ar5312_misc_intr_init(AR531X_MISC_IRQ_BASE
);
90 #ifdef CONFIG_ATHEROS_AR5315
91 if (mips_machtype
== MACH_ATHEROS_AR5315
)
92 ar5315_misc_intr_init(AR531X_MISC_IRQ_BASE
);
95 /* Default "spurious interrupt" handlers */
96 setup_irq(AR531X_IRQ_NONE
, &spurious_irq
);
97 setup_irq(AR531X_MISC_IRQ_NONE
, &spurious_misc
);
This page took 0.046979 seconds and 5 git commands to generate.