1 Allow boards to provide their own function for reading the timer IRQ number
3 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
5 --- a/arch/mips/kernel/traps.c
6 +++ b/arch/mips/kernel/traps.c
8 #include <asm/mmu_context.h>
10 #include <asm/stacktrace.h>
11 +#include <asm/time.h>
13 extern void check_wait(void);
14 extern asmlinkage void r4k_wait(void);
15 @@ -1514,6 +1515,8 @@ void __cpuinit per_cpu_trap_init(void)
17 if (cpu_has_mips_r2) {
18 cp0_compare_irq = (read_c0_intctl() >> 29) & 7;
19 + if (get_c0_compare_irq)
20 + cp0_compare_irq = get_c0_compare_irq();
21 cp0_perfcount_irq = (read_c0_intctl() >> 26) & 7;
22 if (cp0_perfcount_irq == cp0_compare_irq)
23 cp0_perfcount_irq = -1;
24 --- a/arch/mips/include/asm/time.h
25 +++ b/arch/mips/include/asm/time.h
26 @@ -53,6 +53,7 @@ extern int (*perf_irq)(void);
27 #ifdef CONFIG_CEVT_R4K
28 extern int mips_clockevent_init(void);
29 extern unsigned int __weak get_c0_compare_int(void);
30 +extern unsigned int __weak get_c0_compare_irq(void);
32 static inline int mips_clockevent_init(void)