Skip to content

Commit

Permalink
ARM i.MX avic: add handle_irq function
Browse files Browse the repository at this point in the history
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
  • Loading branch information
Sascha Hauer committed Sep 26, 2011
1 parent fcb8ce5 commit b6de943
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
13 changes: 13 additions & 0 deletions arch/arm/plat-mxc/avic.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,19 @@ static struct mxc_irq_chip mxc_avic_chip = {
#endif
};

asmlinkage void __exception_irq_entry avic_handle_irq(struct pt_regs *regs)
{
u32 nivector;

do {
nivector = __raw_readl(avic_base + AVIC_NIVECSR) >> 16;
if (nivector == 0xffff)
break;

handle_IRQ(nivector, regs);
} while (1);
}

/*
* This function initializes the AVIC hardware and disables all the
* interrupts. It registers the interrupt enable and disable functions
Expand Down
10 changes: 10 additions & 0 deletions arch/arm/plat-mxc/include/mach/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,14 @@ extern void mxc_arch_reset_init(void __iomem *);
extern void mx51_efikamx_reset(void);
extern int mx53_revision(void);
extern int mx53_display_revision(void);

void avic_handle_irq(struct pt_regs *);

#define imx1_handle_irq avic_handle_irq
#define imx21_handle_irq avic_handle_irq
#define imx25_handle_irq avic_handle_irq
#define imx27_handle_irq avic_handle_irq
#define imx31_handle_irq avic_handle_irq
#define imx35_handle_irq avic_handle_irq

#endif

0 comments on commit b6de943

Please sign in to comment.