diff options
author | Daniel Glöckner <dg@emlix.com> | 2009-05-05 15:03:21 +0000 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2009-06-22 02:36:59 -0700 |
commit | 1beee21030ed3dc39a41c7b524dbc1a318b518bd (patch) | |
tree | 70d487aa10f673ac1f65ca510c50035675dffae2 /arch/xtensa | |
parent | bd974240c9a7c6c560504bf390cd8985a16b68f6 (diff) | |
download | linux-1beee21030ed3dc39a41c7b524dbc1a318b518bd.tar.gz linux-1beee21030ed3dc39a41c7b524dbc1a318b518bd.tar.bz2 linux-1beee21030ed3dc39a41c7b524dbc1a318b518bd.zip |
xtensa: allow variant to initialize own irq chips
There was already a PLATFORM_NR_IRQS define, which is now accompanied
by a VARIANT_NR_IRQS. To be able to initialize these interrupts,
init_IRQ now calls a variant specific hook.
Changes compared to v1:
- adapted to new CONFIG_VARIANT_IRQ_EXT
- removed definition and call of platform_init_IRQ as there already
is a platform_init_irq defined in asm/platform.h with a weak default
in kernel/platform.c
- renamed variant_init_IRQ to variant_init_irq
Note that I could not find the call site of platform_init_irq although
it is stated in platform.h that it is called from init_IRQ.
Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa')
-rw-r--r-- | arch/xtensa/include/asm/irq.h | 12 | ||||
-rw-r--r-- | arch/xtensa/kernel/irq.c | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/arch/xtensa/include/asm/irq.h b/arch/xtensa/include/asm/irq.h index dfac82dc52ad..4c0ccc9c4f4c 100644 --- a/arch/xtensa/include/asm/irq.h +++ b/arch/xtensa/include/asm/irq.h @@ -11,6 +11,7 @@ #ifndef _XTENSA_IRQ_H #define _XTENSA_IRQ_H +#include <linux/init.h> #include <platform/hardware.h> #include <variant/core.h> @@ -21,11 +22,20 @@ static inline void variant_irq_enable(unsigned int irq) { } static inline void variant_irq_disable(unsigned int irq) { } #endif +#ifndef VARIANT_NR_IRQS +# define VARIANT_NR_IRQS 0 +#endif #ifndef PLATFORM_NR_IRQS # define PLATFORM_NR_IRQS 0 #endif #define XTENSA_NR_IRQS XCHAL_NUM_INTERRUPTS -#define NR_IRQS (XTENSA_NR_IRQS + PLATFORM_NR_IRQS) +#define NR_IRQS (XTENSA_NR_IRQS + VARIANT_NR_IRQS + PLATFORM_NR_IRQS) + +#if VARIANT_NR_IRQS == 0 +static inline void variant_init_irq(void) { } +#else +void variant_init_irq(void) __init; +#endif static __inline__ int irq_canonicalize(int irq) { diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c index a36c85edd045..a1badb32fcda 100644 --- a/arch/xtensa/kernel/irq.c +++ b/arch/xtensa/kernel/irq.c @@ -197,4 +197,6 @@ void __init init_IRQ(void) } cached_irq_mask = 0; + + variant_init_irq(); } |