From patchwork Fri Oct 23 05:03:58 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: 7470001 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 136BD9F750 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 55E832021F for ; Fri, 23 Oct 2015 05:06:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 880C220251 for ; Fri, 23 Oct 2015 05:06:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751303AbbJWFGI (ORCPT ); Fri, 23 Oct 2015 01:06:08 -0400 Received: from foo.masarand.uk ([104.200.29.153]:36280 "EHLO foo.masarand.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751315AbbJWFGI (ORCPT ); Fri, 23 Oct 2015 01:06:08 -0400 Received: from localhost.localdomain (shredder.masarand.uk [81.187.126.108]) by foo.masarand.uk (Postfix) with ESMTPSA id A4560AA7A; Fri, 23 Oct 2015 06:06:06 +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 25/29] PCI: Update pci-versatile to use IRQ deferred assignment Date: Fri, 23 Oct 2015 06:03:58 +0100 Message-Id: <1445576642-29624-26-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-versatile 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-versatile.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/pci/host/pci-versatile.c b/drivers/pci/host/pci-versatile.c index 0863d9c..7f98f72 100644 --- a/drivers/pci/host/pci-versatile.c +++ b/drivers/pci/host/pci-versatile.c @@ -135,6 +135,7 @@ static int versatile_pci_probe(struct platform_device *pdev) u32 val; void __iomem *local_pci_cfg_base; struct pci_bus *bus; + struct pci_host_bridge *bridge; LIST_HEAD(pci_res); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); @@ -211,8 +212,10 @@ static int versatile_pci_probe(struct platform_device *pdev) bus = pci_scan_root_bus(&pdev->dev, 0, &pci_versatile_ops, &sys, &pci_res); if (!bus) return -ENOMEM; - - 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; pci_assign_unassigned_bus_resources(bus); pci_bus_add_devices(bus);