]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/sgi-ip22/ip22-int.c
[MIPS] Implement clockevents for R4000-style cp0 count/compare interrupt
[linux-2.6-omap-h63xx.git] / arch / mips / sgi-ip22 / ip22-int.c
index c44f8be0644f43bf58d38cb744d2509724dac2ee..f199da7e49cf682faf3cbd8278b213356776d6df 100644 (file)
 
 #include <asm/mipsregs.h>
 #include <asm/addrspace.h>
-
+#include <asm/irq_cpu.h>
 #include <asm/sgi/ioc.h>
 #include <asm/sgi/hpc3.h>
 #include <asm/sgi/ip22.h>
+#include <asm/time.h>
 
 /* #define DEBUG_SGINT */
 
@@ -52,7 +53,7 @@ static void disable_local0_irq(unsigned int irq)
 }
 
 static struct irq_chip ip22_local0_irq_type = {
-       .typename       = "IP22 local 0",
+       .name           = "IP22 local 0",
        .ack            = disable_local0_irq,
        .mask           = disable_local0_irq,
        .mask_ack       = disable_local0_irq,
@@ -73,7 +74,7 @@ void disable_local1_irq(unsigned int irq)
 }
 
 static struct irq_chip ip22_local1_irq_type = {
-       .typename       = "IP22 local 1",
+       .name           = "IP22 local 1",
        .ack            = disable_local1_irq,
        .mask           = disable_local1_irq,
        .mask_ack       = disable_local1_irq,
@@ -94,7 +95,7 @@ void disable_local2_irq(unsigned int irq)
 }
 
 static struct irq_chip ip22_local2_irq_type = {
-       .typename       = "IP22 local 2",
+       .name           = "IP22 local 2",
        .ack            = disable_local2_irq,
        .mask           = disable_local2_irq,
        .mask_ack       = disable_local2_irq,
@@ -115,7 +116,7 @@ void disable_local3_irq(unsigned int irq)
 }
 
 static struct irq_chip ip22_local3_irq_type = {
-       .typename       = "IP22 local 3",
+       .name           = "IP22 local 3",
        .ack            = disable_local3_irq,
        .mask           = disable_local3_irq,
        .mask_ack       = disable_local3_irq,
@@ -203,7 +204,6 @@ static struct irqaction map1_cascade = {
 #define SGI_INTERRUPTS SGINT_LOCAL3
 #endif
 
-extern void indy_r4k_timer_interrupt(void);
 extern void indy_8254timer_irq(void);
 
 /*
@@ -236,13 +236,13 @@ extern void indy_8254timer_irq(void);
 
 asmlinkage void plat_irq_dispatch(void)
 {
-       unsigned int pending = read_c0_cause();
+       unsigned int pending = read_c0_status() & read_c0_cause();
 
        /*
         * First we check for r4k counter/timer IRQ.
         */
        if (pending & CAUSEF_IP7)
-               indy_r4k_timer_interrupt();
+               do_IRQ(SGI_TIMER_IRQ);
        else if (pending & CAUSEF_IP2)
                indy_local0_irqdispatch();
        else if (pending & CAUSEF_IP3)
@@ -253,8 +253,6 @@ asmlinkage void plat_irq_dispatch(void)
                indy_8254timer_irq();
 }
 
-extern void mips_cpu_irq_init(unsigned int irq_base);
-
 void __init arch_init_irq(void)
 {
        int i;
@@ -316,7 +314,7 @@ void __init arch_init_irq(void)
        sgint->cmeimask1 = 0;
 
        /* init CPU irqs */
-       mips_cpu_irq_init(SGINT_CPU);
+       mips_cpu_irq_init();
 
        for (i = SGINT_LOCAL0; i < SGI_INTERRUPTS; i++) {
                struct irq_chip *handler;