aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2014-12-10 17:30:59 +0000
committerJon Medhurst <tixy@linaro.org>2015-07-22 15:33:57 +0100
commitec2ea87d1a179be8a8cc4b95f82423b6bd86c091 (patch)
tree9675af0d1427f03394d87d035b5f518ecc43f09e
parent83e764a7683d61c6f3a7c107eee08374c71c3c03 (diff)
PCI/MSI: of: Allow msi_domain lookup using the PHB node
A number of platforms do not need to use the msi-parent property, as the host bridge itself provides the MSI controller. Allow this configuration by performing an irq domain lookup based on the PHB node if it doesn't have a valid msi-parent property. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Jon Medhurst <tixy@linaro.org>
-rw-r--r--drivers/pci/of.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/pci/of.c b/drivers/pci/of.c
index d8d12742e11e..75bfb854337e 100644
--- a/drivers/pci/of.c
+++ b/drivers/pci/of.c
@@ -68,9 +68,14 @@ void pci_set_phb_of_msi_domain(struct pci_bus *bus)
if (!bus->dev.of_node)
return;
+ /* Start looking for a phandle to an MSI controller. */
np = of_parse_phandle(bus->dev.of_node, "msi-parent", 0);
+ /*
+ * If we don't have an msi-parent property, look for a domain
+ * directly attached to the host bridge.
+ */
if (!np)
- return;
+ np = bus->dev.of_node;
dev_set_msi_domain(&bus->dev, irq_find_host(np));
#endif
}