diff options
author | Wolfgang Denk <wd@denx.de> | 2010-04-24 21:13:31 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-04-24 21:13:31 +0200 |
commit | 500fbae2043532275e09a8666d837d052c9bad9a (patch) | |
tree | f793ba7c048230cf2d9f888faa4df7dc038fd679 /arch/microblaze/cpu/interrupts.c | |
parent | b919a3f2981109c9f2aaafe9c692dbb99f1c6366 (diff) | |
parent | 8ff972c6e99938f1a033e5500dccc9a37ce3406f (diff) | |
download | u-boot-imx-500fbae2043532275e09a8666d837d052c9bad9a.zip u-boot-imx-500fbae2043532275e09a8666d837d052c9bad9a.tar.gz u-boot-imx-500fbae2043532275e09a8666d837d052c9bad9a.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-microblaze
Diffstat (limited to 'arch/microblaze/cpu/interrupts.c')
-rw-r--r-- | arch/microblaze/cpu/interrupts.c | 41 |
1 files changed, 11 insertions, 30 deletions
diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c index a6021c9..7a9d022 100644 --- a/arch/microblaze/cpu/interrupts.c +++ b/arch/microblaze/cpu/interrupts.c @@ -46,13 +46,6 @@ int disable_interrupts (void) } #ifdef CONFIG_SYS_INTC_0 -#ifdef CONFIG_SYS_TIMER_0 -extern void timer_init (void); -#endif -#ifdef CONFIG_SYS_FSL_2 -extern void fsl_init2 (void); -#endif - static struct irq_action vecs[CONFIG_SYS_INTC_0_NUM]; @@ -142,20 +135,14 @@ int interrupts_init (void) } /* initialize intc controller */ intc_init (); -#ifdef CONFIG_SYS_TIMER_0 - timer_init (); -#endif -#ifdef CONFIG_SYS_FSL_2 - fsl_init2 (); -#endif enable_interrupts (); return 0; } void interrupt_handler (void) { - int irqs = (intc->isr & intc->ier); /* find active interrupt */ - int i = 1; + int irqs = intc->ivr; /* find active interrupt */ + int mask = 1; #ifdef DEBUG_INT int value; printf ("INTC isr %x, ier %x, iar %x, mer %x\n", intc->isr, intc->ier, @@ -163,23 +150,17 @@ void interrupt_handler (void) R14(value); printf ("Interrupt handler on %x line, r14 %x\n", irqs, value); #endif - struct irq_action *act = vecs; - while (irqs) { - if (irqs & 1) { + struct irq_action *act = vecs + irqs; + + intc->iar = mask << irqs; + #ifdef DEBUG_INT - printf - ("Jumping to interrupt handler rutine addr %x,count %x,arg %x\n", - act->handler, act->count, act->arg); + printf + ("Jumping to interrupt handler rutine addr %x,count %x,arg %x\n", + act->handler, act->count, act->arg); #endif - act->handler (act->arg); - act->count++; - intc->iar = i; - return; - } - irqs >>= 1; - act++; - i <<= 1; - } + act->handler (act->arg); + act->count++; #ifdef DEBUG_INT printf ("Dump INTC reg, isr %x, ier %x, iar %x, mer %x\n", intc->isr, |