diff options
Diffstat (limited to 'drivers/irqchip/irq-mips-gic.c')
-rw-r--r-- | drivers/irqchip/irq-mips-gic.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c index c5f33c3bd228..83f498393a7f 100644 --- a/drivers/irqchip/irq-mips-gic.c +++ b/drivers/irqchip/irq-mips-gic.c | |||
@@ -713,9 +713,6 @@ static int gic_shared_irq_domain_map(struct irq_domain *d, unsigned int virq, | |||
713 | unsigned long flags; | 713 | unsigned long flags; |
714 | int i; | 714 | int i; |
715 | 715 | ||
716 | irq_set_chip_and_handler(virq, &gic_level_irq_controller, | ||
717 | handle_level_irq); | ||
718 | |||
719 | spin_lock_irqsave(&gic_lock, flags); | 716 | spin_lock_irqsave(&gic_lock, flags); |
720 | gic_map_to_pin(intr, gic_cpu_pin); | 717 | gic_map_to_pin(intr, gic_cpu_pin); |
721 | gic_map_to_vpe(intr, mips_cm_vp_id(vpe)); | 718 | gic_map_to_vpe(intr, mips_cm_vp_id(vpe)); |
@@ -732,6 +729,10 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int virq, | |||
732 | { | 729 | { |
733 | if (GIC_HWIRQ_TO_LOCAL(hw) < GIC_NUM_LOCAL_INTRS) | 730 | if (GIC_HWIRQ_TO_LOCAL(hw) < GIC_NUM_LOCAL_INTRS) |
734 | return gic_local_irq_domain_map(d, virq, hw); | 731 | return gic_local_irq_domain_map(d, virq, hw); |
732 | |||
733 | irq_set_chip_and_handler(virq, &gic_level_irq_controller, | ||
734 | handle_level_irq); | ||
735 | |||
735 | return gic_shared_irq_domain_map(d, virq, hw, 0); | 736 | return gic_shared_irq_domain_map(d, virq, hw, 0); |
736 | } | 737 | } |
737 | 738 | ||
@@ -771,11 +772,13 @@ static int gic_irq_domain_alloc(struct irq_domain *d, unsigned int virq, | |||
771 | hwirq = GIC_SHARED_TO_HWIRQ(base_hwirq + i); | 772 | hwirq = GIC_SHARED_TO_HWIRQ(base_hwirq + i); |
772 | 773 | ||
773 | ret = irq_domain_set_hwirq_and_chip(d, virq + i, hwirq, | 774 | ret = irq_domain_set_hwirq_and_chip(d, virq + i, hwirq, |
774 | &gic_edge_irq_controller, | 775 | &gic_level_irq_controller, |
775 | NULL); | 776 | NULL); |
776 | if (ret) | 777 | if (ret) |
777 | goto error; | 778 | goto error; |
778 | 779 | ||
780 | irq_set_handler(virq + i, handle_level_irq); | ||
781 | |||
779 | ret = gic_shared_irq_domain_map(d, virq + i, hwirq, cpu); | 782 | ret = gic_shared_irq_domain_map(d, virq + i, hwirq, cpu); |
780 | if (ret) | 783 | if (ret) |
781 | goto error; | 784 | goto error; |
@@ -890,10 +893,17 @@ void gic_dev_domain_free(struct irq_domain *d, unsigned int virq, | |||
890 | return; | 893 | return; |
891 | } | 894 | } |
892 | 895 | ||
896 | static void gic_dev_domain_activate(struct irq_domain *domain, | ||
897 | struct irq_data *d) | ||
898 | { | ||
899 | gic_shared_irq_domain_map(domain, d->irq, d->hwirq, 0); | ||
900 | } | ||
901 | |||
893 | static struct irq_domain_ops gic_dev_domain_ops = { | 902 | static struct irq_domain_ops gic_dev_domain_ops = { |
894 | .xlate = gic_dev_domain_xlate, | 903 | .xlate = gic_dev_domain_xlate, |
895 | .alloc = gic_dev_domain_alloc, | 904 | .alloc = gic_dev_domain_alloc, |
896 | .free = gic_dev_domain_free, | 905 | .free = gic_dev_domain_free, |
906 | .activate = gic_dev_domain_activate, | ||
897 | }; | 907 | }; |
898 | 908 | ||
899 | static int gic_ipi_domain_xlate(struct irq_domain *d, struct device_node *ctrlr, | 909 | static int gic_ipi_domain_xlate(struct irq_domain *d, struct device_node *ctrlr, |