diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2015-03-11 11:43:46 -0400 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2015-03-14 20:55:58 -0400 |
commit | a5561c3e845cae41ae40c15689a7f26e90b000c8 (patch) | |
tree | 399e2eb9d7a96a9753ae79121a040c405acd02da /drivers/irqchip | |
parent | 1e7449ba67506b84f23dbd4a0667c09184df1368 (diff) |
irqchip: gic: Get rid of routable domain
The only user of the so called "routable domain" functionality
now being fixed, let's clean up the GIC.
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Link: https://lkml.kernel.org/r/1426088629-15377-5-git-send-email-marc.zyngier@arm.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'drivers/irqchip')
-rw-r--r-- | drivers/irqchip/irq-gic.c | 59 |
1 files changed, 5 insertions, 54 deletions
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 4634cf7d0ec3..e3ca6da4314e 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c | |||
@@ -798,15 +798,12 @@ static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq, | |||
798 | irq_domain_set_info(d, irq, hw, &gic_chip, d->host_data, | 798 | irq_domain_set_info(d, irq, hw, &gic_chip, d->host_data, |
799 | handle_fasteoi_irq, NULL, NULL); | 799 | handle_fasteoi_irq, NULL, NULL); |
800 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | 800 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); |
801 | |||
802 | gic_routable_irq_domain_ops->map(d, irq, hw); | ||
803 | } | 801 | } |
804 | return 0; | 802 | return 0; |
805 | } | 803 | } |
806 | 804 | ||
807 | static void gic_irq_domain_unmap(struct irq_domain *d, unsigned int irq) | 805 | static void gic_irq_domain_unmap(struct irq_domain *d, unsigned int irq) |
808 | { | 806 | { |
809 | gic_routable_irq_domain_ops->unmap(d, irq); | ||
810 | } | 807 | } |
811 | 808 | ||
812 | static int gic_irq_domain_xlate(struct irq_domain *d, | 809 | static int gic_irq_domain_xlate(struct irq_domain *d, |
@@ -825,16 +822,8 @@ static int gic_irq_domain_xlate(struct irq_domain *d, | |||
825 | *out_hwirq = intspec[1] + 16; | 822 | *out_hwirq = intspec[1] + 16; |
826 | 823 | ||
827 | /* For SPIs, we need to add 16 more to get the GIC irq ID number */ | 824 | /* For SPIs, we need to add 16 more to get the GIC irq ID number */ |
828 | if (!intspec[0]) { | 825 | if (!intspec[0]) |
829 | ret = gic_routable_irq_domain_ops->xlate(d, controller, | 826 | *out_hwirq += 16; |
830 | intspec, | ||
831 | intsize, | ||
832 | out_hwirq, | ||
833 | out_type); | ||
834 | |||
835 | if (IS_ERR_VALUE(ret)) | ||
836 | return ret; | ||
837 | } | ||
838 | 827 | ||
839 | *out_type = intspec[2] & IRQ_TYPE_SENSE_MASK; | 828 | *out_type = intspec[2] & IRQ_TYPE_SENSE_MASK; |
840 | 829 | ||
@@ -891,37 +880,6 @@ static const struct irq_domain_ops gic_irq_domain_ops = { | |||
891 | .xlate = gic_irq_domain_xlate, | 880 | .xlate = gic_irq_domain_xlate, |
892 | }; | 881 | }; |
893 | 882 | ||
894 | /* Default functions for routable irq domain */ | ||
895 | static int gic_routable_irq_domain_map(struct irq_domain *d, unsigned int irq, | ||
896 | irq_hw_number_t hw) | ||
897 | { | ||
898 | return 0; | ||
899 | } | ||
900 | |||
901 | static void gic_routable_irq_domain_unmap(struct irq_domain *d, | ||
902 | unsigned int irq) | ||
903 | { | ||
904 | } | ||
905 | |||
906 | static int gic_routable_irq_domain_xlate(struct irq_domain *d, | ||
907 | struct device_node *controller, | ||
908 | const u32 *intspec, unsigned int intsize, | ||
909 | unsigned long *out_hwirq, | ||
910 | unsigned int *out_type) | ||
911 | { | ||
912 | *out_hwirq += 16; | ||
913 | return 0; | ||
914 | } | ||
915 | |||
916 | static const struct irq_domain_ops gic_default_routable_irq_domain_ops = { | ||
917 | .map = gic_routable_irq_domain_map, | ||
918 | .unmap = gic_routable_irq_domain_unmap, | ||
919 | .xlate = gic_routable_irq_domain_xlate, | ||
920 | }; | ||
921 | |||
922 | const struct irq_domain_ops *gic_routable_irq_domain_ops = | ||
923 | &gic_default_routable_irq_domain_ops; | ||
924 | |||
925 | void __init gic_init_bases(unsigned int gic_nr, int irq_start, | 883 | void __init gic_init_bases(unsigned int gic_nr, int irq_start, |
926 | void __iomem *dist_base, void __iomem *cpu_base, | 884 | void __iomem *dist_base, void __iomem *cpu_base, |
927 | u32 percpu_offset, struct device_node *node) | 885 | u32 percpu_offset, struct device_node *node) |
@@ -929,7 +887,6 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start, | |||
929 | irq_hw_number_t hwirq_base; | 887 | irq_hw_number_t hwirq_base; |
930 | struct gic_chip_data *gic; | 888 | struct gic_chip_data *gic; |
931 | int gic_irqs, irq_base, i; | 889 | int gic_irqs, irq_base, i; |
932 | int nr_routable_irqs; | ||
933 | 890 | ||
934 | BUG_ON(gic_nr >= MAX_GIC_NR); | 891 | BUG_ON(gic_nr >= MAX_GIC_NR); |
935 | 892 | ||
@@ -985,15 +942,9 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start, | |||
985 | gic->gic_irqs = gic_irqs; | 942 | gic->gic_irqs = gic_irqs; |
986 | 943 | ||
987 | if (node) { /* DT case */ | 944 | if (node) { /* DT case */ |
988 | const struct irq_domain_ops *ops = &gic_irq_domain_hierarchy_ops; | 945 | gic->domain = irq_domain_add_linear(node, gic_irqs, |
989 | 946 | &gic_irq_domain_hierarchy_ops, | |
990 | if (!of_property_read_u32(node, "arm,routable-irqs", | 947 | gic); |
991 | &nr_routable_irqs)) { | ||
992 | ops = &gic_irq_domain_ops; | ||
993 | gic_irqs = nr_routable_irqs; | ||
994 | } | ||
995 | |||
996 | gic->domain = irq_domain_add_linear(node, gic_irqs, ops, gic); | ||
997 | } else { /* Non-DT case */ | 948 | } else { /* Non-DT case */ |
998 | /* | 949 | /* |
999 | * For primary GICs, skip over SGIs. | 950 | * For primary GICs, skip over SGIs. |