powerpc: platforms/85xx irq_data conversion.
authorLennert Buytenhek <buytenh@wantstofly.org>
Mon, 7 Mar 2011 13:59:19 +0000 (13:59 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 10 Mar 2011 00:03:58 +0000 (11:03 +1100)
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/85xx/ksi8560.c
arch/powerpc/platforms/85xx/mpc85xx_ads.c
arch/powerpc/platforms/85xx/mpc85xx_ds.c
arch/powerpc/platforms/85xx/sbc8560.c
arch/powerpc/platforms/85xx/socrates_fpga_pic.c
arch/powerpc/platforms/85xx/stx_gp3.c
arch/powerpc/platforms/85xx/tqm85xx.c

index f4d36b5a2e0099650d2b718fbbb3cf73fecdd90c..64447e48f3d5c2fb5b27b4d00af9a1d47987bc34 100644 (file)
@@ -56,12 +56,13 @@ static void machine_restart(char *cmd)
 
 static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
 {
+       struct irq_chip *chip = get_irq_desc_chip(desc);
        int cascade_irq;
 
        while ((cascade_irq = cpm2_get_irq()) >= 0)
                generic_handle_irq(cascade_irq);
 
-       desc->chip->eoi(irq);
+       chip->irq_eoi(&desc->irq_data);
 }
 
 static void __init ksi8560_pic_init(void)
index 9438a892afc4c152992a3498bf9f006a9a55b996..1352d1107bfd208e08a420fdbb8e1f609d0a7397 100644 (file)
@@ -50,12 +50,13 @@ static int mpc85xx_exclude_device(struct pci_controller *hose,
 
 static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
 {
+       struct irq_chip *chip = get_irq_desc_chip(desc);
        int cascade_irq;
 
        while ((cascade_irq = cpm2_get_irq()) >= 0)
                generic_handle_irq(cascade_irq);
 
-       desc->chip->eoi(irq);
+       chip->irq_eoi(&desc->irq_data);
 }
 
 #endif /* CONFIG_CPM2 */
index 8190bc25bf27327e762e798e0902cf83c20c3c8d..793ead7993abadfa0c87f9df1efe7e9e7e3e659c 100644 (file)
 #ifdef CONFIG_PPC_I8259
 static void mpc85xx_8259_cascade(unsigned int irq, struct irq_desc *desc)
 {
+       struct irq_chip *chip = get_irq_desc_chip(desc);
        unsigned int cascade_irq = i8259_irq();
 
        if (cascade_irq != NO_IRQ) {
                generic_handle_irq(cascade_irq);
        }
-       desc->chip->eoi(irq);
+       chip->irq_eoi(&desc->irq_data);
 }
 #endif /* CONFIG_PPC_I8259 */
 
index a5ad1c7794bfaa0183a5a1a8bbfc54c6f1d3c39e..d7e28ec3e07214c577bedc68e52d6fe9973d64c9 100644 (file)
 
 static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
 {
+       struct irq_chip *chip = get_irq_desc_chip(desc);
        int cascade_irq;
 
        while ((cascade_irq = cpm2_get_irq()) >= 0)
                generic_handle_irq(cascade_irq);
 
-       desc->chip->eoi(irq);
+       chip->irq_eoi(&desc->irq_data);
 }
 
 #endif /* CONFIG_CPM2 */
index d48527ffc4251fd34f212ccd9b35f36222b5b358..79d85aca476719830e6d440a36fbef30c82a31cf 100644 (file)
@@ -93,6 +93,7 @@ static inline unsigned int socrates_fpga_pic_get_irq(unsigned int irq)
 
 void socrates_fpga_pic_cascade(unsigned int irq, struct irq_desc *desc)
 {
+       struct irq_chip *chip = get_irq_desc_chip(desc);
        unsigned int cascade_irq;
 
        /*
@@ -103,17 +104,16 @@ void socrates_fpga_pic_cascade(unsigned int irq, struct irq_desc *desc)
 
        if (cascade_irq != NO_IRQ)
                generic_handle_irq(cascade_irq);
-       desc->chip->eoi(irq);
-
+       chip->irq_eoi(&desc->irq_data);
 }
 
-static void socrates_fpga_pic_ack(unsigned int virq)
+static void socrates_fpga_pic_ack(struct irq_data *d)
 {
        unsigned long flags;
        unsigned int hwirq, irq_line;
        uint32_t mask;
 
-       hwirq = socrates_fpga_irq_to_hw(virq);
+       hwirq = socrates_fpga_irq_to_hw(d->irq);
 
        irq_line = fpga_irqs[hwirq].irq_line;
        raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags);
@@ -124,14 +124,14 @@ static void socrates_fpga_pic_ack(unsigned int virq)
        raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags);
 }
 
-static void socrates_fpga_pic_mask(unsigned int virq)
+static void socrates_fpga_pic_mask(struct irq_data *d)
 {
        unsigned long flags;
        unsigned int hwirq;
        int irq_line;
        u32 mask;
 
-       hwirq = socrates_fpga_irq_to_hw(virq);
+       hwirq = socrates_fpga_irq_to_hw(d->irq);
 
        irq_line = fpga_irqs[hwirq].irq_line;
        raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags);
@@ -142,14 +142,14 @@ static void socrates_fpga_pic_mask(unsigned int virq)
        raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags);
 }
 
-static void socrates_fpga_pic_mask_ack(unsigned int virq)
+static void socrates_fpga_pic_mask_ack(struct irq_data *d)
 {
        unsigned long flags;
        unsigned int hwirq;
        int irq_line;
        u32 mask;
 
-       hwirq = socrates_fpga_irq_to_hw(virq);
+       hwirq = socrates_fpga_irq_to_hw(d->irq);
 
        irq_line = fpga_irqs[hwirq].irq_line;
        raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags);
@@ -161,14 +161,14 @@ static void socrates_fpga_pic_mask_ack(unsigned int virq)
        raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags);
 }
 
-static void socrates_fpga_pic_unmask(unsigned int virq)
+static void socrates_fpga_pic_unmask(struct irq_data *d)
 {
        unsigned long flags;
        unsigned int hwirq;
        int irq_line;
        u32 mask;
 
-       hwirq = socrates_fpga_irq_to_hw(virq);
+       hwirq = socrates_fpga_irq_to_hw(d->irq);
 
        irq_line = fpga_irqs[hwirq].irq_line;
        raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags);
@@ -179,14 +179,14 @@ static void socrates_fpga_pic_unmask(unsigned int virq)
        raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags);
 }
 
-static void socrates_fpga_pic_eoi(unsigned int virq)
+static void socrates_fpga_pic_eoi(struct irq_data *d)
 {
        unsigned long flags;
        unsigned int hwirq;
        int irq_line;
        u32 mask;
 
-       hwirq = socrates_fpga_irq_to_hw(virq);
+       hwirq = socrates_fpga_irq_to_hw(d->irq);
 
        irq_line = fpga_irqs[hwirq].irq_line;
        raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags);
@@ -197,7 +197,7 @@ static void socrates_fpga_pic_eoi(unsigned int virq)
        raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags);
 }
 
-static int socrates_fpga_pic_set_type(unsigned int virq,
+static int socrates_fpga_pic_set_type(struct irq_data *d,
                unsigned int flow_type)
 {
        unsigned long flags;
@@ -205,7 +205,7 @@ static int socrates_fpga_pic_set_type(unsigned int virq,
        int polarity;
        u32 mask;
 
-       hwirq = socrates_fpga_irq_to_hw(virq);
+       hwirq = socrates_fpga_irq_to_hw(d->irq);
 
        if (fpga_irqs[hwirq].type != IRQ_TYPE_NONE)
                return -EINVAL;
@@ -233,12 +233,12 @@ static int socrates_fpga_pic_set_type(unsigned int virq,
 
 static struct irq_chip socrates_fpga_pic_chip = {
        .name           = "FPGA-PIC",
-       .ack            = socrates_fpga_pic_ack,
-       .mask           = socrates_fpga_pic_mask,
-       .mask_ack       = socrates_fpga_pic_mask_ack,
-       .unmask         = socrates_fpga_pic_unmask,
-       .eoi            = socrates_fpga_pic_eoi,
-       .set_type       = socrates_fpga_pic_set_type,
+       .irq_ack        = socrates_fpga_pic_ack,
+       .irq_mask       = socrates_fpga_pic_mask,
+       .irq_mask_ack   = socrates_fpga_pic_mask_ack,
+       .irq_unmask     = socrates_fpga_pic_unmask,
+       .irq_eoi        = socrates_fpga_pic_eoi,
+       .irq_set_type   = socrates_fpga_pic_set_type,
 };
 
 static int socrates_fpga_pic_host_map(struct irq_host *h, unsigned int virq,
index bc33d1859ae718f0892c8c0666629a64f90d09bf..2b62b064eac7a009f0dbf0183412f506a20e34bd 100644 (file)
 
 static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
 {
+       struct irq_chip *chip = get_irq_desc_chip(desc);
        int cascade_irq;
 
        while ((cascade_irq = cpm2_get_irq()) >= 0)
                generic_handle_irq(cascade_irq);
 
-       desc->chip->eoi(irq);
+       chip->irq_eoi(&desc->irq_data);
 }
 #endif /* CONFIG_CPM2 */
 
index 5e847d0b47c80b5a63308e7e41a1ec4c8dce8917..2265b68e3279af883660772ab2bbc965b4da72e4 100644 (file)
 
 static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
 {
+       struct irq_chip *chip = get_irq_desc_chip(desc);
        int cascade_irq;
 
        while ((cascade_irq = cpm2_get_irq()) >= 0)
                generic_handle_irq(cascade_irq);
 
-       desc->chip->eoi(irq);
+       chip->irq_eoi(&desc->irq_data);
 }
 #endif /* CONFIG_CPM2 */