Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * This file is subject to the terms and conditions of the GNU General Public
0003  * License.  See the file "COPYING" in the main directory of this archive
0004  * for more details.
0005  *
0006  * Copyright (C) 1992 Linus Torvalds
0007  * Copyright (C) 1994 - 2000 Ralf Baechle
0008  * Copyright (C) 2006 Thomas Bogendoerfer
0009  */
0010 #include <linux/delay.h>
0011 #include <linux/init.h>
0012 #include <linux/interrupt.h>
0013 #include <linux/irq.h>
0014 #include <linux/kernel.h>
0015 
0016 #include <asm/i8259.h>
0017 #include <asm/io.h>
0018 #include <asm/sni.h>
0019 #include <asm/irq.h>
0020 #include <asm/irq_cpu.h>
0021 
0022 void (*sni_hwint)(void);
0023 
0024 asmlinkage void plat_irq_dispatch(void)
0025 {
0026     sni_hwint();
0027 }
0028 
0029 /* ISA irq handler */
0030 irqreturn_t sni_isa_irq_handler(int dummy, void *p)
0031 {
0032     int irq;
0033 
0034     irq = i8259_irq();
0035     if (unlikely(irq < 0))
0036         return IRQ_NONE;
0037 
0038     generic_handle_irq(irq);
0039     return IRQ_HANDLED;
0040 }
0041 
0042 /*
0043  * On systems with i8259-style interrupt controllers we assume for
0044  * driver compatibility reasons interrupts 0 - 15 to be the i8295
0045  * interrupts even if the hardware uses a different interrupt numbering.
0046  */
0047 void __init arch_init_irq(void)
0048 {
0049     init_i8259_irqs();          /* Integrated i8259  */
0050     switch (sni_brd_type) {
0051     case SNI_BRD_10:
0052     case SNI_BRD_10NEW:
0053     case SNI_BRD_TOWER_OASIC:
0054     case SNI_BRD_MINITOWER:
0055         sni_a20r_irq_init();
0056         break;
0057 
0058     case SNI_BRD_PCI_TOWER:
0059         sni_pcit_irq_init();
0060         break;
0061 
0062     case SNI_BRD_PCI_TOWER_CPLUS:
0063         sni_pcit_cplus_irq_init();
0064         break;
0065 
0066     case SNI_BRD_RM200:
0067         sni_rm200_irq_init();
0068         break;
0069 
0070     case SNI_BRD_PCI_MTOWER:
0071     case SNI_BRD_PCI_DESKTOP:
0072     case SNI_BRD_PCI_MTOWER_CPLUS:
0073         sni_pcimt_irq_init();
0074         break;
0075     }
0076 }