diff options
author | Hui Wang <jason77.wang@gmail.com> | 2011-09-22 05:40:08 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-09-23 02:32:14 -0400 |
commit | 3439a397a8190b7e8d319959ec30e28c7ca14bab (patch) | |
tree | 8feab81ed1c843020bf516d82f5518f88381e3e4 /arch/arm/plat-mxc/tzic.c | |
parent | 40d97b89bd3c902144a0757249d9d5d5cf314214 (diff) |
ARM i.MX avic: convert to use generic irq chip
Convert i.MX avic irq handler to use generic irq chip. This not only
provides a cleanup implementation of irq chip handler, but also
implements suspend/resume interface with the help of generic irq chip
interface.
Change mxc_irq_chip to a new structure mxc_extra_irq to handle fiq
and priority functions.
Signed-off-by: Hui Wang <jason77.wang@gmail.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/plat-mxc/tzic.c')
-rw-r--r-- | arch/arm/plat-mxc/tzic.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/plat-mxc/tzic.c b/arch/arm/plat-mxc/tzic.c index f257fccdc394..a5807509fc62 100644 --- a/arch/arm/plat-mxc/tzic.c +++ b/arch/arm/plat-mxc/tzic.c | |||
@@ -74,6 +74,12 @@ static int tzic_set_irq_fiq(unsigned int irq, unsigned int type) | |||
74 | 74 | ||
75 | static unsigned int *wakeup_intr[4]; | 75 | static unsigned int *wakeup_intr[4]; |
76 | 76 | ||
77 | static struct mxc_extra_irq tzic_extra_irq = { | ||
78 | #ifdef CONFIG_FIQ | ||
79 | .set_irq_fiq = tzic_set_irq_fiq, | ||
80 | #endif | ||
81 | }; | ||
82 | |||
77 | static __init void tzic_init_gc(unsigned int irq_start) | 83 | static __init void tzic_init_gc(unsigned int irq_start) |
78 | { | 84 | { |
79 | struct irq_chip_generic *gc; | 85 | struct irq_chip_generic *gc; |
@@ -82,7 +88,7 @@ static __init void tzic_init_gc(unsigned int irq_start) | |||
82 | 88 | ||
83 | gc = irq_alloc_generic_chip("tzic", 1, irq_start, tzic_base, | 89 | gc = irq_alloc_generic_chip("tzic", 1, irq_start, tzic_base, |
84 | handle_level_irq); | 90 | handle_level_irq); |
85 | gc->private = tzic_set_irq_fiq; | 91 | gc->private = &tzic_extra_irq; |
86 | gc->wake_enabled = IRQ_MSK(32); | 92 | gc->wake_enabled = IRQ_MSK(32); |
87 | wakeup_intr[idx] = &gc->wake_active; | 93 | wakeup_intr[idx] = &gc->wake_active; |
88 | 94 | ||