diff options
Diffstat (limited to 'uClinux-2.4.20-uc1/arch/armnommu/kernel/irq.c')
-rw-r--r-- | uClinux-2.4.20-uc1/arch/armnommu/kernel/irq.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/uClinux-2.4.20-uc1/arch/armnommu/kernel/irq.c b/uClinux-2.4.20-uc1/arch/armnommu/kernel/irq.c index 227cd8f..f686290 100644 --- a/uClinux-2.4.20-uc1/arch/armnommu/kernel/irq.c +++ b/uClinux-2.4.20-uc1/arch/armnommu/kernel/irq.c @@ -35,6 +35,8 @@ #include <asm/arch/irq.h> /* pick up fixup_irq definition */ +#include <linux/w83977.h> + /* * Maximum IRQ count. Currently, this is arbitary. However, it should * not be set too low to prevent false triggering. Conversely, if it @@ -156,6 +158,10 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) struct irqaction * action; int cpu; +#ifdef CONFIG_BOARD_W90N745 + irq = irq >> 2; +#endif + #ifdef CONFIG_BOARD_SNDS100 /* * FIXME: This is not the best place to put this work around. @@ -163,7 +169,9 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) CLEAR_PEND_INT(irq); #endif +#ifndef CONFIG_BOARD_W90N745 irq = fixup_irq(irq); +#endif /* * Some hardware gives randomly wrong interrupts. Rather @@ -172,12 +180,21 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) if (irq >= NR_IRQS) goto bad_irq; +#ifdef CONFIG_BOARD_W90N745 + if (irq <= 0) + goto bad_irq; +#endif + desc = irq_desc + irq; spin_lock(&irq_controller_lock); desc->mask_ack(irq); spin_unlock(&irq_controller_lock); +#ifdef CONFIG_BOARD_W90N745 + irq = fixup_irq(irq); +#endif + cpu = smp_processor_id(); irq_enter(cpu, irq); kstat.irqs[cpu][irq]++; @@ -223,6 +240,10 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) irq_exit(cpu, irq); +#ifdef CONFIG_BOARD_W90N745 + DWORD_WRITE(AIC_EOSCR, 1); +#endif + if (softirq_pending(cpu)) do_softirq(); return; @@ -513,6 +534,10 @@ void __init init_irq_proc(void) { } +#ifdef CONFIG_BOARD_W90N745 +extern void init_EBI(void); +#endif + void __init init_IRQ(void) { extern void init_dma(void); @@ -527,6 +552,19 @@ void __init init_IRQ(void) irq_desc[irq].unmask = dummy_mask_unmask_irq; } +#ifdef CONFIG_BOARD_W90N745 + CSR_WRITE(AIC_MDCR, 0x7FFFE); /* disable all interrupts */ + + CSR_WRITE(CAHCNF, 0x0);/*Close Cache*/ + CSR_WRITE(CAHCON, 0x87);/*Flush Cache*/ + while(CSR_READ(CAHCON)!=0) {} + CSR_WRITE(CAHCNF, 0x7);/*Open Cache*/ +#endif + init_arch_irq(); init_dma(); + +#ifdef CONFIG_W83977 + init_EBI(); +#endif } |