aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/include
diff options
context:
space:
mode:
authorDaniel Glöckner <dg@emlix.com>2009-05-05 11:03:21 -0400
committerChris Zankel <chris@zankel.net>2009-06-22 05:36:59 -0400
commit1beee21030ed3dc39a41c7b524dbc1a318b518bd (patch)
tree70d487aa10f673ac1f65ca510c50035675dffae2 /arch/xtensa/include
parentbd974240c9a7c6c560504bf390cd8985a16b68f6 (diff)
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/include')
-rw-r--r--arch/xtensa/include/asm/irq.h12
1 files changed, 11 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 @@
11#ifndef _XTENSA_IRQ_H 11#ifndef _XTENSA_IRQ_H
12#define _XTENSA_IRQ_H 12#define _XTENSA_IRQ_H
13 13
14#include <linux/init.h>
14#include <platform/hardware.h> 15#include <platform/hardware.h>
15#include <variant/core.h> 16#include <variant/core.h>
16 17
@@ -21,11 +22,20 @@ static inline void variant_irq_enable(unsigned int irq) { }
21static inline void variant_irq_disable(unsigned int irq) { } 22static inline void variant_irq_disable(unsigned int irq) { }
22#endif 23#endif
23 24
25#ifndef VARIANT_NR_IRQS
26# define VARIANT_NR_IRQS 0
27#endif
24#ifndef PLATFORM_NR_IRQS 28#ifndef PLATFORM_NR_IRQS
25# define PLATFORM_NR_IRQS 0 29# define PLATFORM_NR_IRQS 0
26#endif 30#endif
27#define XTENSA_NR_IRQS XCHAL_NUM_INTERRUPTS 31#define XTENSA_NR_IRQS XCHAL_NUM_INTERRUPTS
28#define NR_IRQS (XTENSA_NR_IRQS + PLATFORM_NR_IRQS) 32#define NR_IRQS (XTENSA_NR_IRQS + VARIANT_NR_IRQS + PLATFORM_NR_IRQS)
33
34#if VARIANT_NR_IRQS == 0
35static inline void variant_init_irq(void) { }
36#else
37void variant_init_irq(void) __init;
38#endif
29 39
30static __inline__ int irq_canonicalize(int irq) 40static __inline__ int irq_canonicalize(int irq)
31{ 41{