Commit 471c931c authored by Marc Zyngier's avatar Marc Zyngier Committed by Thomas Gleixner

PCI/MSI: Allow msi_domain lookup using the host bridge 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 host bridge node if it doesn't have a valid msi-parent property.
Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Cc: <linux-arm-kernel@lists.infradead.org>
Cc: Yijing Wang <wangyijing@huawei.com>
Cc: Ma Jun <majun258@huawei.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Duc Dang <dhdang@apm.com>
Cc: Hanjun Guo <hanjun.guo@linaro.org>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Link: http://lkml.kernel.org/r/1438091186-10244-7-git-send-email-marc.zyngier@arm.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent b165e2b6
...@@ -72,8 +72,13 @@ struct irq_domain *pci_host_bridge_of_msi_domain(struct pci_bus *bus) ...@@ -72,8 +72,13 @@ struct irq_domain *pci_host_bridge_of_msi_domain(struct pci_bus *bus)
/* Start looking for a phandle to an MSI controller. */ /* Start looking for a phandle to an MSI controller. */
np = of_parse_phandle(bus->dev.of_node, "msi-parent", 0); 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) if (!np)
return NULL; np = bus->dev.of_node;
d = irq_find_matching_host(np, DOMAIN_BUS_PCI_MSI); d = irq_find_matching_host(np, DOMAIN_BUS_PCI_MSI);
if (d) if (d)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment