Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752628AbbGOMU7 (ORCPT ); Wed, 15 Jul 2015 08:20:59 -0400 Received: from foss.arm.com ([217.140.101.70]:38690 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753108AbbGOMRN (ORCPT ); Wed, 15 Jul 2015 08:17:13 -0400 From: Marc Zyngier To: Bjorn Helgaas , Thomas Gleixner , Jiang Liu , Jason Cooper Cc: , , , Yijing Wang , Ma Jun , Lorenzo Pieralisi , Duc Dang Subject: [PATCH v4 06/19] PCI/MSI: of: Allow msi_domain lookup using the host bridge node Date: Wed, 15 Jul 2015 13:16:40 +0100 Message-Id: <1436962613-17359-7-git-send-email-marc.zyngier@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436962613-17359-1-git-send-email-marc.zyngier@arm.com> References: <1436962613-17359-1-git-send-email-marc.zyngier@arm.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1259 Lines: 39 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. Signed-off-by: Marc Zyngier --- drivers/pci/of.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/pci/of.c b/drivers/pci/of.c index 09df465..9d61cef 100644 --- a/drivers/pci/of.c +++ b/drivers/pci/of.c @@ -69,9 +69,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; d = irq_find_matching_host(np, DOMAIN_BUS_PCI_MSI); if (!d) d = irq_find_host(np); -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/