aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/include
diff options
context:
space:
mode:
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{