2005-04-17 06:20:36 +08:00
|
|
|
/*
|
|
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
|
|
* for more details.
|
|
|
|
*
|
|
|
|
* Copyright (C) 1992 Linus Torvalds
|
|
|
|
* Copyright (C) 1994 - 2000 Ralf Baechle
|
2006-12-29 01:22:32 +08:00
|
|
|
* Copyright (C) 2006 Thomas Bogendoerfer
|
2005-04-17 06:20:36 +08:00
|
|
|
*/
|
|
|
|
#include <linux/delay.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/interrupt.h>
|
|
|
|
#include <linux/irq.h>
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
|
|
|
|
#include <asm/i8259.h>
|
|
|
|
#include <asm/io.h>
|
|
|
|
#include <asm/sni.h>
|
2006-12-29 01:22:32 +08:00
|
|
|
#include <asm/irq.h>
|
|
|
|
#include <asm/irq_cpu.h>
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2006-12-29 01:22:32 +08:00
|
|
|
void (*sni_hwint)(void);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2006-12-29 01:22:32 +08:00
|
|
|
asmlinkage void plat_irq_dispatch(void)
|
2005-04-17 06:20:36 +08:00
|
|
|
{
|
2006-12-29 01:22:32 +08:00
|
|
|
sni_hwint();
|
2005-04-17 06:20:36 +08:00
|
|
|
}
|
|
|
|
|
2006-12-29 01:22:32 +08:00
|
|
|
/* ISA irq handler */
|
2020-03-05 19:57:53 +08:00
|
|
|
irqreturn_t sni_isa_irq_handler(int dummy, void *p)
|
2005-04-17 06:20:36 +08:00
|
|
|
{
|
|
|
|
int irq;
|
|
|
|
|
2006-12-29 01:22:32 +08:00
|
|
|
irq = i8259_irq();
|
|
|
|
if (unlikely(irq < 0))
|
|
|
|
return IRQ_NONE;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2008-01-05 06:31:07 +08:00
|
|
|
generic_handle_irq(irq);
|
2006-12-29 01:22:32 +08:00
|
|
|
return IRQ_HANDLED;
|
2006-04-04 00:56:36 +08:00
|
|
|
}
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/*
|
|
|
|
* On systems with i8259-style interrupt controllers we assume for
|
|
|
|
* driver compatibility reasons interrupts 0 - 15 to be the i8295
|
|
|
|
* interrupts even if the hardware uses a different interrupt numbering.
|
|
|
|
*/
|
|
|
|
void __init arch_init_irq(void)
|
|
|
|
{
|
|
|
|
init_i8259_irqs(); /* Integrated i8259 */
|
2006-12-29 01:22:32 +08:00
|
|
|
switch (sni_brd_type) {
|
|
|
|
case SNI_BRD_10:
|
|
|
|
case SNI_BRD_10NEW:
|
|
|
|
case SNI_BRD_TOWER_OASIC:
|
|
|
|
case SNI_BRD_MINITOWER:
|
2013-01-22 19:59:30 +08:00
|
|
|
sni_a20r_irq_init();
|
|
|
|
break;
|
2006-12-29 01:22:32 +08:00
|
|
|
|
|
|
|
case SNI_BRD_PCI_TOWER:
|
2013-01-22 19:59:30 +08:00
|
|
|
sni_pcit_irq_init();
|
|
|
|
break;
|
2006-12-29 01:22:32 +08:00
|
|
|
|
|
|
|
case SNI_BRD_PCI_TOWER_CPLUS:
|
2013-01-22 19:59:30 +08:00
|
|
|
sni_pcit_cplus_irq_init();
|
|
|
|
break;
|
2006-12-29 01:22:32 +08:00
|
|
|
|
|
|
|
case SNI_BRD_RM200:
|
2013-01-22 19:59:30 +08:00
|
|
|
sni_rm200_irq_init();
|
|
|
|
break;
|
2006-12-29 01:22:32 +08:00
|
|
|
|
|
|
|
case SNI_BRD_PCI_MTOWER:
|
|
|
|
case SNI_BRD_PCI_DESKTOP:
|
|
|
|
case SNI_BRD_PCI_MTOWER_CPLUS:
|
2013-01-22 19:59:30 +08:00
|
|
|
sni_pcimt_irq_init();
|
|
|
|
break;
|
2006-12-29 01:22:32 +08:00
|
|
|
}
|
2005-04-17 06:20:36 +08:00
|
|
|
}
|