diff options
author | Johannes Weiner <jw@emlix.com> | 2009-03-04 10:21:31 -0500 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2009-04-03 02:43:01 -0400 |
commit | 4c0d214144bcedc0b3582c88d6313055949755b5 (patch) | |
tree | ec732f465e7b4df0aaab5fbc018d146984df9e85 /arch/xtensa | |
parent | 72197b18bc0e86feba7cc9f907551e30948bd526 (diff) |
xtensa: variant irq set callbacks
Allow the core variant code to provide irq enable/disable callbacks.
Signed-off-by: Johannes Weiner <jw@emlix.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa')
-rw-r--r-- | arch/xtensa/Kconfig | 3 | ||||
-rw-r--r-- | arch/xtensa/include/asm/irq.h | 7 | ||||
-rw-r--r-- | arch/xtensa/kernel/irq.c | 14 |
3 files changed, 24 insertions, 0 deletions
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index cf2501b5afd4..705bb71af245 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig | |||
@@ -51,6 +51,9 @@ source "kernel/Kconfig.freezer" | |||
51 | config MMU | 51 | config MMU |
52 | def_bool n | 52 | def_bool n |
53 | 53 | ||
54 | config VARIANT_IRQ_SWITCH | ||
55 | def_bool n | ||
56 | |||
54 | menu "Processor type and features" | 57 | menu "Processor type and features" |
55 | 58 | ||
56 | choice | 59 | choice |
diff --git a/arch/xtensa/include/asm/irq.h b/arch/xtensa/include/asm/irq.h index 1620d1e0e695..dfac82dc52ad 100644 --- a/arch/xtensa/include/asm/irq.h +++ b/arch/xtensa/include/asm/irq.h | |||
@@ -14,6 +14,13 @@ | |||
14 | #include <platform/hardware.h> | 14 | #include <platform/hardware.h> |
15 | #include <variant/core.h> | 15 | #include <variant/core.h> |
16 | 16 | ||
17 | #ifdef CONFIG_VARIANT_IRQ_SWITCH | ||
18 | #include <variant/irq.h> | ||
19 | #else | ||
20 | static inline void variant_irq_enable(unsigned int irq) { } | ||
21 | static inline void variant_irq_disable(unsigned int irq) { } | ||
22 | #endif | ||
23 | |||
17 | #ifndef PLATFORM_NR_IRQS | 24 | #ifndef PLATFORM_NR_IRQS |
18 | # define PLATFORM_NR_IRQS 0 | 25 | # define PLATFORM_NR_IRQS 0 |
19 | #endif | 26 | #endif |
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c index f3b66fba5b8f..a36c85edd045 100644 --- a/arch/xtensa/kernel/irq.c +++ b/arch/xtensa/kernel/irq.c | |||
@@ -132,6 +132,18 @@ static void xtensa_irq_unmask(unsigned int irq) | |||
132 | set_sr (cached_irq_mask, INTENABLE); | 132 | set_sr (cached_irq_mask, INTENABLE); |
133 | } | 133 | } |
134 | 134 | ||
135 | static void xtensa_irq_enable(unsigned int irq) | ||
136 | { | ||
137 | variant_irq_enable(irq); | ||
138 | xtensa_irq_unmask(irq); | ||
139 | } | ||
140 | |||
141 | static void xtensa_irq_disable(unsigned int irq) | ||
142 | { | ||
143 | xtensa_irq_mask(irq); | ||
144 | variant_irq_disable(irq); | ||
145 | } | ||
146 | |||
135 | static void xtensa_irq_ack(unsigned int irq) | 147 | static void xtensa_irq_ack(unsigned int irq) |
136 | { | 148 | { |
137 | set_sr(1 << irq, INTCLEAR); | 149 | set_sr(1 << irq, INTCLEAR); |
@@ -146,6 +158,8 @@ static int xtensa_irq_retrigger(unsigned int irq) | |||
146 | 158 | ||
147 | static struct irq_chip xtensa_irq_chip = { | 159 | static struct irq_chip xtensa_irq_chip = { |
148 | .name = "xtensa", | 160 | .name = "xtensa", |
161 | .enable = xtensa_irq_enable, | ||
162 | .disable = xtensa_irq_disable, | ||
149 | .mask = xtensa_irq_mask, | 163 | .mask = xtensa_irq_mask, |
150 | .unmask = xtensa_irq_unmask, | 164 | .unmask = xtensa_irq_unmask, |
151 | .ack = xtensa_irq_ack, | 165 | .ack = xtensa_irq_ack, |