MIPS: IP27: Convert to new irq_chip functions
authorThomas Gleixner <tglx@linutronix.de>
Wed, 23 Mar 2011 21:09:12 +0000 (21:09 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 25 Mar 2011 17:45:19 +0000 (18:45 +0100)
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2203/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/sgi-ip27/ip27-irq.c
arch/mips/sgi-ip27/ip27-timer.c

index 6a123ea72de54a42bfdc3e2d6b5d705731061e94..f2d09d7700dd75b4f3ae6c00cba9638974376d82 100644 (file)
@@ -240,7 +240,7 @@ static int intr_disconnect_level(int cpu, int bit)
 }
 
 /* Startup one of the (PCI ...) IRQs routes over a bridge.  */
-static unsigned int startup_bridge_irq(unsigned int irq)
+static unsigned int startup_bridge_irq(struct irq_data *d)
 {
        struct bridge_controller *bc;
        bridgereg_t device;
@@ -248,16 +248,16 @@ static unsigned int startup_bridge_irq(unsigned int irq)
        int pin, swlevel;
        cpuid_t cpu;
 
-       pin = SLOT_FROM_PCI_IRQ(irq);
-       bc = IRQ_TO_BRIDGE(irq);
+       pin = SLOT_FROM_PCI_IRQ(d->irq);
+       bc = IRQ_TO_BRIDGE(d->irq);
        bridge = bc->base;
 
-       pr_debug("bridge_startup(): irq= 0x%x  pin=%d\n", irq, pin);
+       pr_debug("bridge_startup(): irq= 0x%x  pin=%d\n", d->irq, pin);
        /*
         * "map" irq to a swlevel greater than 6 since the first 6 bits
         * of INT_PEND0 are taken
         */
-       swlevel = find_level(&cpu, irq);
+       swlevel = find_level(&cpu, d->irq);
        bridge->b_int_addr[pin].addr = (0x20000 | swlevel | (bc->nasid << 8));
        bridge->b_int_enable |= (1 << pin);
        bridge->b_int_enable |= 0x7ffffe00;     /* more stuff in int_enable */
@@ -288,53 +288,51 @@ static unsigned int startup_bridge_irq(unsigned int irq)
 }
 
 /* Shutdown one of the (PCI ...) IRQs routes over a bridge.  */
-static void shutdown_bridge_irq(unsigned int irq)
+static void shutdown_bridge_irq(struct irq_data *d)
 {
-       struct bridge_controller *bc = IRQ_TO_BRIDGE(irq);
+       struct bridge_controller *bc = IRQ_TO_BRIDGE(d->irq);
        bridge_t *bridge = bc->base;
        int pin, swlevel;
        cpuid_t cpu;
 
-       pr_debug("bridge_shutdown: irq 0x%x\n", irq);
-       pin = SLOT_FROM_PCI_IRQ(irq);
+       pr_debug("bridge_shutdown: irq 0x%x\n", d->irq);
+       pin = SLOT_FROM_PCI_IRQ(d->irq);
 
        /*
         * map irq to a swlevel greater than 6 since the first 6 bits
         * of INT_PEND0 are taken
         */
-       swlevel = find_level(&cpu, irq);
+       swlevel = find_level(&cpu, d->irq);
        intr_disconnect_level(cpu, swlevel);
 
        bridge->b_int_enable &= ~(1 << pin);
        bridge->b_wid_tflush;
 }
 
-static inline void enable_bridge_irq(unsigned int irq)
+static inline void enable_bridge_irq(struct irq_data *d)
 {
        cpuid_t cpu;
        int swlevel;
 
-       swlevel = find_level(&cpu, irq);        /* Criminal offence */
+       swlevel = find_level(&cpu, d->irq);     /* Criminal offence */
        intr_connect_level(cpu, swlevel);
 }
 
-static inline void disable_bridge_irq(unsigned int irq)
+static inline void disable_bridge_irq(struct irq_data *d)
 {
        cpuid_t cpu;
        int swlevel;
 
-       swlevel = find_level(&cpu, irq);        /* Criminal offence */
+       swlevel = find_level(&cpu, d->irq);     /* Criminal offence */
        intr_disconnect_level(cpu, swlevel);
 }
 
 static struct irq_chip bridge_irq_type = {
        .name           = "bridge",
-       .startup        = startup_bridge_irq,
-       .shutdown       = shutdown_bridge_irq,
-       .ack            = disable_bridge_irq,
-       .mask           = disable_bridge_irq,
-       .mask_ack       = disable_bridge_irq,
-       .unmask         = enable_bridge_irq,
+       .irq_startup    = startup_bridge_irq,
+       .irq_shutdown   = shutdown_bridge_irq,
+       .irq_mask       = disable_bridge_irq,
+       .irq_unmask     = enable_bridge_irq,
 };
 
 void __devinit register_bridge_irq(unsigned int irq)
index d6802d6d1f827a21b79cd0d8c4fb54b29cf7ae4d..c01f558a2a09142fb06c0ed4a64673b1fff461a3 100644 (file)
 #include <asm/sn/sn0/hubio.h>
 #include <asm/pci/bridge.h>
 
-static void enable_rt_irq(unsigned int irq)
+static void enable_rt_irq(struct irq_data *d)
 {
 }
 
-static void disable_rt_irq(unsigned int irq)
+static void disable_rt_irq(struct irq_data *d)
 {
 }
 
 static struct irq_chip rt_irq_type = {
        .name           = "SN HUB RT timer",
-       .ack            = disable_rt_irq,
-       .mask           = disable_rt_irq,
-       .mask_ack       = disable_rt_irq,
-       .unmask         = enable_rt_irq,
-       .eoi            = enable_rt_irq,
+       .irq_mask       = disable_rt_irq,
+       .irq_unmask     = enable_rt_irq,
 };
 
 static int rt_next_event(unsigned long delta, struct clock_event_device *evt)