aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of/irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/of/irq.c')
-rw-r--r--drivers/of/irq.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 706e3ff67f8b..7ee21ae305ae 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -679,18 +679,6 @@ u32 of_msi_map_rid(struct device *dev, struct device_node *msi_np, u32 rid_in)
679 return __of_msi_map_rid(dev, &msi_np, rid_in); 679 return __of_msi_map_rid(dev, &msi_np, rid_in);
680} 680}
681 681
682static struct irq_domain *__of_get_msi_domain(struct device_node *np,
683 enum irq_domain_bus_token token)
684{
685 struct irq_domain *d;
686
687 d = irq_find_matching_host(np, token);
688 if (!d)
689 d = irq_find_host(np);
690
691 return d;
692}
693
694/** 682/**
695 * of_msi_map_get_device_domain - Use msi-map to find the relevant MSI domain 683 * of_msi_map_get_device_domain - Use msi-map to find the relevant MSI domain
696 * @dev: device for which the mapping is to be done. 684 * @dev: device for which the mapping is to be done.
@@ -706,7 +694,7 @@ struct irq_domain *of_msi_map_get_device_domain(struct device *dev, u32 rid)
706 struct device_node *np = NULL; 694 struct device_node *np = NULL;
707 695
708 __of_msi_map_rid(dev, &np, rid); 696 __of_msi_map_rid(dev, &np, rid);
709 return __of_get_msi_domain(np, DOMAIN_BUS_PCI_MSI); 697 return irq_find_matching_host(np, DOMAIN_BUS_PCI_MSI);
710} 698}
711 699
712/** 700/**
@@ -730,7 +718,7 @@ struct irq_domain *of_msi_get_domain(struct device *dev,
730 /* Check for a single msi-parent property */ 718 /* Check for a single msi-parent property */
731 msi_np = of_parse_phandle(np, "msi-parent", 0); 719 msi_np = of_parse_phandle(np, "msi-parent", 0);
732 if (msi_np && !of_property_read_bool(msi_np, "#msi-cells")) { 720 if (msi_np && !of_property_read_bool(msi_np, "#msi-cells")) {
733 d = __of_get_msi_domain(msi_np, token); 721 d = irq_find_matching_host(msi_np, token);
734 if (!d) 722 if (!d)
735 of_node_put(msi_np); 723 of_node_put(msi_np);
736 return d; 724 return d;
@@ -744,7 +732,7 @@ struct irq_domain *of_msi_get_domain(struct device *dev,
744 while (!of_parse_phandle_with_args(np, "msi-parent", 732 while (!of_parse_phandle_with_args(np, "msi-parent",
745 "#msi-cells", 733 "#msi-cells",
746 index, &args)) { 734 index, &args)) {
747 d = __of_get_msi_domain(args.np, token); 735 d = irq_find_matching_host(args.np, token);
748 if (d) 736 if (d)
749 return d; 737 return d;
750 738