diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2013-12-01 03:04:57 -0500 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2014-01-14 13:19:58 -0500 |
commit | 26a8e96a8b37e8070fa9dcb1b7490cf4d4492d50 (patch) | |
tree | 5104a9c1e12dd3728b05db5b21b5033bd7b648d2 /arch/xtensa/kernel/irq.c | |
parent | bae07f8a9dfaf6268f2fba5522b70bce6fc7d718 (diff) |
xtensa: add MX irqchip
MX is an interrupt distributor used in some SMP-capable xtensa
configurations.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa/kernel/irq.c')
-rw-r--r-- | arch/xtensa/kernel/irq.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c index 3cef58e28332..7d49730f4056 100644 --- a/arch/xtensa/kernel/irq.c +++ b/arch/xtensa/kernel/irq.c | |||
@@ -123,6 +123,14 @@ unsigned xtensa_map_ext_irq(unsigned ext_irq) | |||
123 | return XCHAL_NUM_INTERRUPTS; | 123 | return XCHAL_NUM_INTERRUPTS; |
124 | } | 124 | } |
125 | 125 | ||
126 | unsigned xtensa_get_ext_irq_no(unsigned irq) | ||
127 | { | ||
128 | unsigned mask = (XCHAL_INTTYPE_MASK_EXTERN_EDGE | | ||
129 | XCHAL_INTTYPE_MASK_EXTERN_LEVEL) & | ||
130 | ((1u << irq) - 1); | ||
131 | return hweight32(mask); | ||
132 | } | ||
133 | |||
126 | void __init init_IRQ(void) | 134 | void __init init_IRQ(void) |
127 | { | 135 | { |
128 | #ifdef CONFIG_OF | 136 | #ifdef CONFIG_OF |