diff options
author | Graf Yang <graf.yang@analog.com> | 2008-10-08 06:02:44 -0400 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-10-08 06:02:44 -0400 |
commit | bfd15117aeafcc42033cf5179cc15f4bd8bce957 (patch) | |
tree | d4d41e44bc2d301d24ec0423b646f83950823e5b /arch/blackfin | |
parent | 9df10281e1c03b1c04d17f387bc59eb932c0bb87 (diff) |
Blackfin arch: Not call generic set_irq_handler() in bfin_gpio_irq_type() due to spinlock recursion
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/mach-common/ints-priority.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c index f65b3a13a8c3..34e8a726ffda 100644 --- a/arch/blackfin/mach-common/ints-priority.c +++ b/arch/blackfin/mach-common/ints-priority.c | |||
@@ -364,6 +364,14 @@ static void bfin_demux_error_irq(unsigned int int_err_irq, | |||
364 | } | 364 | } |
365 | #endif /* BF537_GENERIC_ERROR_INT_DEMUX */ | 365 | #endif /* BF537_GENERIC_ERROR_INT_DEMUX */ |
366 | 366 | ||
367 | static inline void bfin_set_irq_handler(unsigned irq, irq_flow_handler_t handle) | ||
368 | { | ||
369 | struct irq_desc *desc = irq_desc + irq; | ||
370 | /* May not call generic set_irq_handler() due to spinlock | ||
371 | recursion. */ | ||
372 | desc->handle_irq = handle; | ||
373 | } | ||
374 | |||
367 | #if !defined(CONFIG_BF54x) | 375 | #if !defined(CONFIG_BF54x) |
368 | 376 | ||
369 | static unsigned short gpio_enabled[gpio_bank(MAX_BLACKFIN_GPIOS)]; | 377 | static unsigned short gpio_enabled[gpio_bank(MAX_BLACKFIN_GPIOS)]; |
@@ -476,9 +484,9 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type) | |||
476 | SSYNC(); | 484 | SSYNC(); |
477 | 485 | ||
478 | if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) | 486 | if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) |
479 | set_irq_handler(irq, handle_edge_irq); | 487 | bfin_set_irq_handler(irq, handle_edge_irq); |
480 | else | 488 | else |
481 | set_irq_handler(irq, handle_level_irq); | 489 | bfin_set_irq_handler(irq, handle_level_irq); |
482 | 490 | ||
483 | return 0; | 491 | return 0; |
484 | } | 492 | } |
@@ -808,10 +816,10 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type) | |||
808 | 816 | ||
809 | if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) { | 817 | if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) { |
810 | pint[bank]->edge_set = pintbit; | 818 | pint[bank]->edge_set = pintbit; |
811 | set_irq_handler(irq, handle_edge_irq); | 819 | bfin_set_irq_handler(irq, handle_edge_irq); |
812 | } else { | 820 | } else { |
813 | pint[bank]->edge_clear = pintbit; | 821 | pint[bank]->edge_clear = pintbit; |
814 | set_irq_handler(irq, handle_level_irq); | 822 | bfin_set_irq_handler(irq, handle_level_irq); |
815 | } | 823 | } |
816 | 824 | ||
817 | SSYNC(); | 825 | SSYNC(); |