diff options
author | Tony Lindgren <tony@atomide.com> | 2011-11-23 14:46:10 -0800 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-11-23 14:46:10 -0800 |
commit | 52f3a41e0aca5625fbd118ed57a4debb25817e99 (patch) | |
tree | 86730c862fc97eef5f1eb1a81bf74bf2a8a36754 /arch/m68k/apollo/dn_ints.c | |
parent | e9b7086b80c4d9e354f4edc9e280ae85a60df408 (diff) | |
parent | 8770b07c2dff3cec2c751b289ee690137c88ea54 (diff) | |
download | op-kernel-dev-52f3a41e0aca5625fbd118ed57a4debb25817e99.zip op-kernel-dev-52f3a41e0aca5625fbd118ed57a4debb25817e99.tar.gz |
Merge branch 'fixes-v3.2-rc2' into fixes
Diffstat (limited to 'arch/m68k/apollo/dn_ints.c')
-rw-r--r-- | arch/m68k/apollo/dn_ints.c | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c index 5d47f3a..17be1e7 100644 --- a/arch/m68k/apollo/dn_ints.c +++ b/arch/m68k/apollo/dn_ints.c @@ -1,19 +1,13 @@ #include <linux/interrupt.h> +#include <linux/irq.h> -#include <asm/irq.h> #include <asm/traps.h> #include <asm/apollohw.h> -void dn_process_int(unsigned int irq, struct pt_regs *fp) +unsigned int apollo_irq_startup(struct irq_data *data) { - __m68k_handle_int(irq, fp); + unsigned int irq = data->irq; - *(volatile unsigned char *)(pica)=0x20; - *(volatile unsigned char *)(picb)=0x20; -} - -int apollo_irq_startup(unsigned int irq) -{ if (irq < 8) *(volatile unsigned char *)(pica+1) &= ~(1 << irq); else @@ -21,24 +15,33 @@ int apollo_irq_startup(unsigned int irq) return 0; } -void apollo_irq_shutdown(unsigned int irq) +void apollo_irq_shutdown(struct irq_data *data) { + unsigned int irq = data->irq; + if (irq < 8) *(volatile unsigned char *)(pica+1) |= (1 << irq); else *(volatile unsigned char *)(picb+1) |= (1 << (irq - 8)); } -static struct irq_controller apollo_irq_controller = { +void apollo_irq_eoi(struct irq_data *data) +{ + *(volatile unsigned char *)(pica) = 0x20; + *(volatile unsigned char *)(picb) = 0x20; +} + +static struct irq_chip apollo_irq_chip = { .name = "apollo", - .lock = __SPIN_LOCK_UNLOCKED(apollo_irq_controller.lock), - .startup = apollo_irq_startup, - .shutdown = apollo_irq_shutdown, + .irq_startup = apollo_irq_startup, + .irq_shutdown = apollo_irq_shutdown, + .irq_eoi = apollo_irq_eoi, }; void __init dn_init_IRQ(void) { - m68k_setup_user_interrupt(VEC_USER + 96, 16, dn_process_int); - m68k_setup_irq_controller(&apollo_irq_controller, IRQ_APOLLO, 16); + m68k_setup_user_interrupt(VEC_USER + 96, 16); + m68k_setup_irq_controller(&apollo_irq_chip, handle_fasteoi_irq, + IRQ_APOLLO, 16); } |