aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2011-03-07 08:59:58 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-03-09 19:04:02 -0500
commit687228ad404400c040e52d36ecfda42a1d392ead (patch)
tree0729d6a160ecb4ead94981340d6ebd434c7307c8 /arch/powerpc/sysdev
parentd4201184347018afcb61d113c3831d04572cf9c7 (diff)
powerpc: sysdev/ipic irq_data conversion.
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r--arch/powerpc/sysdev/ipic.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c
index d7b9b9c69287..497047dc986e 100644
--- a/arch/powerpc/sysdev/ipic.c
+++ b/arch/powerpc/sysdev/ipic.c
@@ -523,10 +523,10 @@ static inline struct ipic * ipic_from_irq(unsigned int virq)
523 523
524#define ipic_irq_to_hw(virq) ((unsigned int)irq_map[virq].hwirq) 524#define ipic_irq_to_hw(virq) ((unsigned int)irq_map[virq].hwirq)
525 525
526static void ipic_unmask_irq(unsigned int virq) 526static void ipic_unmask_irq(struct irq_data *d)
527{ 527{
528 struct ipic *ipic = ipic_from_irq(virq); 528 struct ipic *ipic = ipic_from_irq(d->irq);
529 unsigned int src = ipic_irq_to_hw(virq); 529 unsigned int src = ipic_irq_to_hw(d->irq);
530 unsigned long flags; 530 unsigned long flags;
531 u32 temp; 531 u32 temp;
532 532
@@ -539,10 +539,10 @@ static void ipic_unmask_irq(unsigned int virq)
539 raw_spin_unlock_irqrestore(&ipic_lock, flags); 539 raw_spin_unlock_irqrestore(&ipic_lock, flags);
540} 540}
541 541
542static void ipic_mask_irq(unsigned int virq) 542static void ipic_mask_irq(struct irq_data *d)
543{ 543{
544 struct ipic *ipic = ipic_from_irq(virq); 544 struct ipic *ipic = ipic_from_irq(d->irq);
545 unsigned int src = ipic_irq_to_hw(virq); 545 unsigned int src = ipic_irq_to_hw(d->irq);
546 unsigned long flags; 546 unsigned long flags;
547 u32 temp; 547 u32 temp;
548 548
@@ -559,10 +559,10 @@ static void ipic_mask_irq(unsigned int virq)
559 raw_spin_unlock_irqrestore(&ipic_lock, flags); 559 raw_spin_unlock_irqrestore(&ipic_lock, flags);
560} 560}
561 561
562static void ipic_ack_irq(unsigned int virq) 562static void ipic_ack_irq(struct irq_data *d)
563{ 563{
564 struct ipic *ipic = ipic_from_irq(virq); 564 struct ipic *ipic = ipic_from_irq(d->irq);
565 unsigned int src = ipic_irq_to_hw(virq); 565 unsigned int src = ipic_irq_to_hw(d->irq);
566 unsigned long flags; 566 unsigned long flags;
567 u32 temp; 567 u32 temp;
568 568
@@ -578,10 +578,10 @@ static void ipic_ack_irq(unsigned int virq)
578 raw_spin_unlock_irqrestore(&ipic_lock, flags); 578 raw_spin_unlock_irqrestore(&ipic_lock, flags);
579} 579}
580 580
581static void ipic_mask_irq_and_ack(unsigned int virq) 581static void ipic_mask_irq_and_ack(struct irq_data *d)
582{ 582{
583 struct ipic *ipic = ipic_from_irq(virq); 583 struct ipic *ipic = ipic_from_irq(d->irq);
584 unsigned int src = ipic_irq_to_hw(virq); 584 unsigned int src = ipic_irq_to_hw(d->irq);
585 unsigned long flags; 585 unsigned long flags;
586 u32 temp; 586 u32 temp;
587 587
@@ -601,11 +601,11 @@ static void ipic_mask_irq_and_ack(unsigned int virq)
601 raw_spin_unlock_irqrestore(&ipic_lock, flags); 601 raw_spin_unlock_irqrestore(&ipic_lock, flags);
602} 602}
603 603
604static int ipic_set_irq_type(unsigned int virq, unsigned int flow_type) 604static int ipic_set_irq_type(struct irq_data *d, unsigned int flow_type)
605{ 605{
606 struct ipic *ipic = ipic_from_irq(virq); 606 struct ipic *ipic = ipic_from_irq(d->irq);
607 unsigned int src = ipic_irq_to_hw(virq); 607 unsigned int src = ipic_irq_to_hw(d->irq);
608 struct irq_desc *desc = irq_to_desc(virq); 608 struct irq_desc *desc = irq_to_desc(d->irq);
609 unsigned int vold, vnew, edibit; 609 unsigned int vold, vnew, edibit;
610 610
611 if (flow_type == IRQ_TYPE_NONE) 611 if (flow_type == IRQ_TYPE_NONE)
@@ -630,10 +630,10 @@ static int ipic_set_irq_type(unsigned int virq, unsigned int flow_type)
630 if (flow_type & IRQ_TYPE_LEVEL_LOW) { 630 if (flow_type & IRQ_TYPE_LEVEL_LOW) {
631 desc->status |= IRQ_LEVEL; 631 desc->status |= IRQ_LEVEL;
632 desc->handle_irq = handle_level_irq; 632 desc->handle_irq = handle_level_irq;
633 desc->chip = &ipic_level_irq_chip; 633 desc->irq_data.chip = &ipic_level_irq_chip;
634 } else { 634 } else {
635 desc->handle_irq = handle_edge_irq; 635 desc->handle_irq = handle_edge_irq;
636 desc->chip = &ipic_edge_irq_chip; 636 desc->irq_data.chip = &ipic_edge_irq_chip;
637 } 637 }
638 638
639 /* only EXT IRQ senses are programmable on ipic 639 /* only EXT IRQ senses are programmable on ipic
@@ -661,19 +661,19 @@ static int ipic_set_irq_type(unsigned int virq, unsigned int flow_type)
661/* level interrupts and edge interrupts have different ack operations */ 661/* level interrupts and edge interrupts have different ack operations */
662static struct irq_chip ipic_level_irq_chip = { 662static struct irq_chip ipic_level_irq_chip = {
663 .name = "IPIC", 663 .name = "IPIC",
664 .unmask = ipic_unmask_irq, 664 .irq_unmask = ipic_unmask_irq,
665 .mask = ipic_mask_irq, 665 .irq_mask = ipic_mask_irq,
666 .mask_ack = ipic_mask_irq, 666 .irq_mask_ack = ipic_mask_irq,
667 .set_type = ipic_set_irq_type, 667 .irq_set_type = ipic_set_irq_type,
668}; 668};
669 669
670static struct irq_chip ipic_edge_irq_chip = { 670static struct irq_chip ipic_edge_irq_chip = {
671 .name = "IPIC", 671 .name = "IPIC",
672 .unmask = ipic_unmask_irq, 672 .irq_unmask = ipic_unmask_irq,
673 .mask = ipic_mask_irq, 673 .irq_mask = ipic_mask_irq,
674 .mask_ack = ipic_mask_irq_and_ack, 674 .irq_mask_ack = ipic_mask_irq_and_ack,
675 .ack = ipic_ack_irq, 675 .irq_ack = ipic_ack_irq,
676 .set_type = ipic_set_irq_type, 676 .irq_set_type = ipic_set_irq_type,
677}; 677};
678 678
679static int ipic_host_match(struct irq_host *h, struct device_node *node) 679static int ipic_host_match(struct irq_host *h, struct device_node *node)