summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Oshins <jakeo@microsoft.com>2016-02-16 16:56:22 -0500
committerBjorn Helgaas <bhelgaas@google.com>2016-02-16 17:56:11 -0500
commit788858ebc49a07fe5f812778f245a51b0d800d82 (patch)
treeb18f3459558fbce9c2e7687a515be32df6790b7e
parent92016ba5c1d71fbe4e9952df518b5386f2a0556b (diff)
PCI: Look up IRQ domain by fwnode_handle
If pci_host_bridge_msi_domain() can't find an IRQ domain through the OF tree, try to look it up directly through the fwnode_handle. [bhelgaas: changelog] Signed-off-by: Jake Oshins <jakeo@microsoft.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r--drivers/pci/probe.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 6d7ab9bb0d5a..1e34d211389a 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -15,6 +15,7 @@
15#include <linux/pci-aspm.h> 15#include <linux/pci-aspm.h>
16#include <linux/aer.h> 16#include <linux/aer.h>
17#include <linux/acpi.h> 17#include <linux/acpi.h>
18#include <linux/irqdomain.h>
18#include <asm-generic/pci-bridge.h> 19#include <asm-generic/pci-bridge.h>
19#include "pci.h" 20#include "pci.h"
20 21
@@ -675,6 +676,20 @@ static struct irq_domain *pci_host_bridge_msi_domain(struct pci_bus *bus)
675 if (!d) 676 if (!d)
676 d = pci_host_bridge_acpi_msi_domain(bus); 677 d = pci_host_bridge_acpi_msi_domain(bus);
677 678
679#ifdef CONFIG_PCI_MSI_IRQ_DOMAIN
680 /*
681 * If no IRQ domain was found via the OF tree, try looking it up
682 * directly through the fwnode_handle.
683 */
684 if (!d) {
685 struct fwnode_handle *fwnode = pci_root_bus_fwnode(bus);
686
687 if (fwnode)
688 d = irq_find_matching_fwnode(fwnode,
689 DOMAIN_BUS_PCI_MSI);
690 }
691#endif
692
678 return d; 693 return d;
679} 694}
680 695