From patchwork Fri Oct 23 05:04:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: matt@masarand.com X-Patchwork-Id: 7470021 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EA4E99F750 for ; Fri, 23 Oct 2015 05:06:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1BCD320251 for ; Fri, 23 Oct 2015 05:06:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3BB67202AE for ; Fri, 23 Oct 2015 05:06:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751322AbbJWFGK (ORCPT ); Fri, 23 Oct 2015 01:06:10 -0400 Received: from foo.masarand.uk ([104.200.29.153]:36288 "EHLO foo.masarand.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751324AbbJWFGK (ORCPT ); Fri, 23 Oct 2015 01:06:10 -0400 Received: from localhost.localdomain (shredder.masarand.uk [81.187.126.108]) by foo.masarand.uk (Postfix) with ESMTPSA id AEAFDAA7E; Fri, 23 Oct 2015 06:06:08 +0100 (BST) From: Matthew Minter To: linux-pci@vger.kernel.org, bhelgaas@google.com, Liviu.Dudau@arm.com, ddaney@caviumnetworks.com, lorenzo.pieralisi@arm.com Cc: Matthew Minter Subject: [PATCH V4 27/29] PCI: Update pci-host-generic to use IRQ deffered assignment Date: Fri, 23 Oct 2015 06:04:00 +0100 Message-Id: <1445576642-29624-28-git-send-email-matt@masarand.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1445576642-29624-1-git-send-email-matt@masarand.com> References: <1445576642-29624-1-git-send-email-matt@masarand.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The pci-host-generic platform device is using the fixup irqs code which will be removed later in the code to migrate to deffered irq assignment. This patch migrates it to use the new code path and adds support for deffered irq assignment Signed-off-by: Matthew Minter --- drivers/pci/host/pci-host-generic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/pci/host/pci-host-generic.c b/drivers/pci/host/pci-host-generic.c index 265dd25..0c12597 100644 --- a/drivers/pci/host/pci-host-generic.c +++ b/drivers/pci/host/pci-host-generic.c @@ -215,6 +215,7 @@ static int gen_pci_probe(struct platform_device *pdev) struct device_node *np = dev->of_node; struct gen_pci *pci = devm_kzalloc(dev, sizeof(*pci), GFP_KERNEL); struct pci_bus *bus, *child; + struct pci_host_bridge *bridge; if (!pci) return -ENOMEM; @@ -262,7 +263,9 @@ static int gen_pci_probe(struct platform_device *pdev) return -ENODEV; } - pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci); + bridge = pci_find_host_bridge(bus); + bridge->swizzle_irq = pci_common_swizzle; + bridge->map_irq = of_irq_parse_and_map_pci; if (!pci_has_flag(PCI_PROBE_ONLY)) { pci_bus_size_bridges(bus);