From patchwork Fri Oct 23 05:03:59 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: 7470011 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 E12709F36A for ; Fri, 23 Oct 2015 05:06:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2FE4A20251 for ; Fri, 23 Oct 2015 05:06:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 616E220279 for ; Fri, 23 Oct 2015 05:06:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751315AbbJWFGJ (ORCPT ); Fri, 23 Oct 2015 01:06:09 -0400 Received: from foo.masarand.uk ([104.200.29.153]:36283 "EHLO foo.masarand.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751322AbbJWFGJ (ORCPT ); Fri, 23 Oct 2015 01:06:09 -0400 Received: from localhost.localdomain (shredder.masarand.uk [81.187.126.108]) by foo.masarand.uk (Postfix) with ESMTPSA id A9A18AA7C; Fri, 23 Oct 2015 06:06:07 +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 26/29] PCI: Update pcie-iproc to use IRQ deffered assignment Date: Fri, 23 Oct 2015 06:03:59 +0100 Message-Id: <1445576642-29624-27-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 pcie-iproc 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/pcie-iproc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c index fe2efb1..b2e3305 100644 --- a/drivers/pci/host/pcie-iproc.c +++ b/drivers/pci/host/pcie-iproc.c @@ -195,6 +195,9 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res) int ret; void *sysdata; struct pci_bus *bus; +#ifdef CONFIG_ARM + struct pci_host_bridge *bridge; +#endif if (!pcie || !pcie->dev || !pcie->base) return -EINVAL; @@ -235,12 +238,13 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res) } iproc_pcie_enable(pcie); - - pci_scan_child_bus(bus); - pci_assign_unassigned_bus_resources(bus); #ifdef CONFIG_ARM - pci_fixup_irqs(pci_common_swizzle, pcie->map_irq); + bridge = pci_find_host_bridge(bus); + bridge->swizzle_irq = pci_common_swizzle; + bridge->map_irq = pcie->map_irq; #endif + pci_scan_child_bus(bus); + pci_assign_unassigned_bus_resources(bus); pci_bus_add_devices(bus); return 0;