1*0aa78106SRoman Zippel #include <linux/interrupt.h> 21da177e4SLinus Torvalds 31da177e4SLinus Torvalds #include <asm/irq.h> 41da177e4SLinus Torvalds #include <asm/traps.h> 51da177e4SLinus Torvalds #include <asm/apollohw.h> 61da177e4SLinus Torvalds 7*0aa78106SRoman Zippel void dn_process_int(unsigned int irq, struct pt_regs *fp) 81da177e4SLinus Torvalds { 9*0aa78106SRoman Zippel m68k_handle_int(irq, fp); 101da177e4SLinus Torvalds 111da177e4SLinus Torvalds *(volatile unsigned char *)(pica)=0x20; 121da177e4SLinus Torvalds *(volatile unsigned char *)(picb)=0x20; 131da177e4SLinus Torvalds } 141da177e4SLinus Torvalds 15*0aa78106SRoman Zippel int apollo_irq_startup(unsigned int irq) 16*0aa78106SRoman Zippel { 171da177e4SLinus Torvalds if (irq < 8) 181da177e4SLinus Torvalds *(volatile unsigned char *)(pica+1) &= ~(1 << irq); 191da177e4SLinus Torvalds else 201da177e4SLinus Torvalds *(volatile unsigned char *)(picb+1) &= ~(1 << (irq - 8)); 211da177e4SLinus Torvalds return 0; 221da177e4SLinus Torvalds } 231da177e4SLinus Torvalds 24*0aa78106SRoman Zippel void apollo_irq_shutdown(unsigned int irq) 25*0aa78106SRoman Zippel { 261da177e4SLinus Torvalds if (irq < 8) 271da177e4SLinus Torvalds *(volatile unsigned char *)(pica+1) |= (1 << irq); 281da177e4SLinus Torvalds else 291da177e4SLinus Torvalds *(volatile unsigned char *)(picb+1) |= (1 << (irq - 8)); 301da177e4SLinus Torvalds } 311da177e4SLinus Torvalds 32*0aa78106SRoman Zippel static struct irq_controller apollo_irq_controller = { 33*0aa78106SRoman Zippel .name = "apollo", 34*0aa78106SRoman Zippel .lock = SPIN_LOCK_UNLOCKED, 35*0aa78106SRoman Zippel .startup = apollo_irq_startup, 36*0aa78106SRoman Zippel .shutdown = apollo_irq_shutdown, 37*0aa78106SRoman Zippel }; 381da177e4SLinus Torvalds 391da177e4SLinus Torvalds 40*0aa78106SRoman Zippel void dn_init_IRQ(void) 41*0aa78106SRoman Zippel { 42*0aa78106SRoman Zippel m68k_setup_user_interrupt(VEC_USER + 96, 16, dn_process_int); 43*0aa78106SRoman Zippel m68k_setup_irq_controller(&apollo_irq_controller, IRQ_APOLLO, 16); 441da177e4SLinus Torvalds } 45