Commit 712d5d79 authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by Benjamin Herrenschmidt

powerpc: platforms/85xx irq_data conversion.

Signed-off-by: default avatarLennert Buytenhek <buytenh@secretlab.ca>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent e4891eb0
...@@ -56,12 +56,13 @@ static void machine_restart(char *cmd) ...@@ -56,12 +56,13 @@ static void machine_restart(char *cmd)
static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
{ {
struct irq_chip *chip = get_irq_desc_chip(desc);
int cascade_irq; int cascade_irq;
while ((cascade_irq = cpm2_get_irq()) >= 0) while ((cascade_irq = cpm2_get_irq()) >= 0)
generic_handle_irq(cascade_irq); generic_handle_irq(cascade_irq);
desc->chip->eoi(irq); chip->irq_eoi(&desc->irq_data);
} }
static void __init ksi8560_pic_init(void) static void __init ksi8560_pic_init(void)
......
...@@ -50,12 +50,13 @@ static int mpc85xx_exclude_device(struct pci_controller *hose, ...@@ -50,12 +50,13 @@ static int mpc85xx_exclude_device(struct pci_controller *hose,
static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
{ {
struct irq_chip *chip = get_irq_desc_chip(desc);
int cascade_irq; int cascade_irq;
while ((cascade_irq = cpm2_get_irq()) >= 0) while ((cascade_irq = cpm2_get_irq()) >= 0)
generic_handle_irq(cascade_irq); generic_handle_irq(cascade_irq);
desc->chip->eoi(irq); chip->irq_eoi(&desc->irq_data);
} }
#endif /* CONFIG_CPM2 */ #endif /* CONFIG_CPM2 */
......
...@@ -47,12 +47,13 @@ ...@@ -47,12 +47,13 @@
#ifdef CONFIG_PPC_I8259 #ifdef CONFIG_PPC_I8259
static void mpc85xx_8259_cascade(unsigned int irq, struct irq_desc *desc) 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(); unsigned int cascade_irq = i8259_irq();
if (cascade_irq != NO_IRQ) { if (cascade_irq != NO_IRQ) {
generic_handle_irq(cascade_irq); generic_handle_irq(cascade_irq);
} }
desc->chip->eoi(irq); chip->irq_eoi(&desc->irq_data);
} }
#endif /* CONFIG_PPC_I8259 */ #endif /* CONFIG_PPC_I8259 */
......
...@@ -41,12 +41,13 @@ ...@@ -41,12 +41,13 @@
static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
{ {
struct irq_chip *chip = get_irq_desc_chip(desc);
int cascade_irq; int cascade_irq;
while ((cascade_irq = cpm2_get_irq()) >= 0) while ((cascade_irq = cpm2_get_irq()) >= 0)
generic_handle_irq(cascade_irq); generic_handle_irq(cascade_irq);
desc->chip->eoi(irq); chip->irq_eoi(&desc->irq_data);
} }
#endif /* CONFIG_CPM2 */ #endif /* CONFIG_CPM2 */
......
...@@ -93,6 +93,7 @@ static inline unsigned int socrates_fpga_pic_get_irq(unsigned int irq) ...@@ -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) 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; unsigned int cascade_irq;
/* /*
...@@ -103,17 +104,16 @@ void socrates_fpga_pic_cascade(unsigned int irq, struct irq_desc *desc) ...@@ -103,17 +104,16 @@ void socrates_fpga_pic_cascade(unsigned int irq, struct irq_desc *desc)
if (cascade_irq != NO_IRQ) if (cascade_irq != NO_IRQ)
generic_handle_irq(cascade_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 long flags;
unsigned int hwirq, irq_line; unsigned int hwirq, irq_line;
uint32_t mask; 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; irq_line = fpga_irqs[hwirq].irq_line;
raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags); raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags);
...@@ -124,14 +124,14 @@ static void socrates_fpga_pic_ack(unsigned int virq) ...@@ -124,14 +124,14 @@ static void socrates_fpga_pic_ack(unsigned int virq)
raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags); 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 long flags;
unsigned int hwirq; unsigned int hwirq;
int irq_line; int irq_line;
u32 mask; u32 mask;
hwirq = socrates_fpga_irq_to_hw(virq); hwirq = socrates_fpga_irq_to_hw(d->irq);
irq_line = fpga_irqs[hwirq].irq_line; irq_line = fpga_irqs[hwirq].irq_line;
raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags); raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags);
...@@ -142,14 +142,14 @@ static void socrates_fpga_pic_mask(unsigned int virq) ...@@ -142,14 +142,14 @@ static void socrates_fpga_pic_mask(unsigned int virq)
raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags); 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 long flags;
unsigned int hwirq; unsigned int hwirq;
int irq_line; int irq_line;
u32 mask; u32 mask;
hwirq = socrates_fpga_irq_to_hw(virq); hwirq = socrates_fpga_irq_to_hw(d->irq);
irq_line = fpga_irqs[hwirq].irq_line; irq_line = fpga_irqs[hwirq].irq_line;
raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags); raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags);
...@@ -161,14 +161,14 @@ static void socrates_fpga_pic_mask_ack(unsigned int virq) ...@@ -161,14 +161,14 @@ static void socrates_fpga_pic_mask_ack(unsigned int virq)
raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags); 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 long flags;
unsigned int hwirq; unsigned int hwirq;
int irq_line; int irq_line;
u32 mask; u32 mask;
hwirq = socrates_fpga_irq_to_hw(virq); hwirq = socrates_fpga_irq_to_hw(d->irq);
irq_line = fpga_irqs[hwirq].irq_line; irq_line = fpga_irqs[hwirq].irq_line;
raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags); raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags);
...@@ -179,14 +179,14 @@ static void socrates_fpga_pic_unmask(unsigned int virq) ...@@ -179,14 +179,14 @@ static void socrates_fpga_pic_unmask(unsigned int virq)
raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags); 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 long flags;
unsigned int hwirq; unsigned int hwirq;
int irq_line; int irq_line;
u32 mask; u32 mask;
hwirq = socrates_fpga_irq_to_hw(virq); hwirq = socrates_fpga_irq_to_hw(d->irq);
irq_line = fpga_irqs[hwirq].irq_line; irq_line = fpga_irqs[hwirq].irq_line;
raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags); raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags);
...@@ -197,7 +197,7 @@ static void socrates_fpga_pic_eoi(unsigned int virq) ...@@ -197,7 +197,7 @@ static void socrates_fpga_pic_eoi(unsigned int virq)
raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags); 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 int flow_type)
{ {
unsigned long flags; unsigned long flags;
...@@ -205,7 +205,7 @@ static int socrates_fpga_pic_set_type(unsigned int virq, ...@@ -205,7 +205,7 @@ static int socrates_fpga_pic_set_type(unsigned int virq,
int polarity; int polarity;
u32 mask; 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) if (fpga_irqs[hwirq].type != IRQ_TYPE_NONE)
return -EINVAL; return -EINVAL;
...@@ -233,12 +233,12 @@ static int socrates_fpga_pic_set_type(unsigned int virq, ...@@ -233,12 +233,12 @@ static int socrates_fpga_pic_set_type(unsigned int virq,
static struct irq_chip socrates_fpga_pic_chip = { static struct irq_chip socrates_fpga_pic_chip = {
.name = "FPGA-PIC", .name = "FPGA-PIC",
.ack = socrates_fpga_pic_ack, .irq_ack = socrates_fpga_pic_ack,
.mask = socrates_fpga_pic_mask, .irq_mask = socrates_fpga_pic_mask,
.mask_ack = socrates_fpga_pic_mask_ack, .irq_mask_ack = socrates_fpga_pic_mask_ack,
.unmask = socrates_fpga_pic_unmask, .irq_unmask = socrates_fpga_pic_unmask,
.eoi = socrates_fpga_pic_eoi, .irq_eoi = socrates_fpga_pic_eoi,
.set_type = socrates_fpga_pic_set_type, .irq_set_type = socrates_fpga_pic_set_type,
}; };
static int socrates_fpga_pic_host_map(struct irq_host *h, unsigned int virq, static int socrates_fpga_pic_host_map(struct irq_host *h, unsigned int virq,
......
...@@ -46,12 +46,13 @@ ...@@ -46,12 +46,13 @@
static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
{ {
struct irq_chip *chip = get_irq_desc_chip(desc);
int cascade_irq; int cascade_irq;
while ((cascade_irq = cpm2_get_irq()) >= 0) while ((cascade_irq = cpm2_get_irq()) >= 0)
generic_handle_irq(cascade_irq); generic_handle_irq(cascade_irq);
desc->chip->eoi(irq); chip->irq_eoi(&desc->irq_data);
} }
#endif /* CONFIG_CPM2 */ #endif /* CONFIG_CPM2 */
......
...@@ -44,12 +44,13 @@ ...@@ -44,12 +44,13 @@
static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
{ {
struct irq_chip *chip = get_irq_desc_chip(desc);
int cascade_irq; int cascade_irq;
while ((cascade_irq = cpm2_get_irq()) >= 0) while ((cascade_irq = cpm2_get_irq()) >= 0)
generic_handle_irq(cascade_irq); generic_handle_irq(cascade_irq);
desc->chip->eoi(irq); chip->irq_eoi(&desc->irq_data);
} }
#endif /* CONFIG_CPM2 */ #endif /* CONFIG_CPM2 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment