From patchwork Thu Oct 2 04:07:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: matt@masarand.com X-Patchwork-Id: 5016031 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E7AC29F327 for ; Thu, 2 Oct 2014 04:08:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 227E020265 for ; Thu, 2 Oct 2014 04:08:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5DC852021F for ; Thu, 2 Oct 2014 04:08:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752397AbaJBEIG (ORCPT ); Thu, 2 Oct 2014 00:08:06 -0400 Received: from foo.masarand.uk ([69.164.217.139]:56355 "EHLO foo.masarand.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752373AbaJBEIF (ORCPT ); Thu, 2 Oct 2014 00:08:05 -0400 Received: from shredder.masarand.uk (shredder.masarand.uk [81.187.126.108]) by foo.masarand.uk (Postfix) with ESMTPSA id 2F49DA110; Thu, 2 Oct 2014 05:08:04 +0100 (BST) From: matt@masarand.com To: bhelgaas@google.com Cc: linux-pci@vger.kernel.org, Matthew Minter Subject: [PATCH 10/18] Delayed microblaze setup of PCI IRQs to bus scan time Date: Thu, 2 Oct 2014 05:07:38 +0100 Message-Id: <1412222866-21068-11-git-send-email-matt@masarand.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1412222866-21068-1-git-send-email-matt@masarand.com> References: <1412222866-21068-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=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 From: Matthew Minter Currently microblaze assigns PCI IRQs during the pcibios phase, this means that devices connected after boot will not be assigned an IRQ, instead the boot code now registers IRQ assignment functions to be called later by the device enable code paths. Signed-off-by: Matthew Minter --- arch/microblaze/pci/pci-common.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c index 9037914..6843b34 100644 --- a/arch/microblaze/pci/pci-common.c +++ b/arch/microblaze/pci/pci-common.c @@ -850,12 +850,16 @@ void pcibios_setup_bus_devices(struct pci_bus *bus) * code and is needed by the DMA init */ set_dev_node(&dev->dev, pcibus_to_node(dev->bus)); - - /* Read default IRQs and fixup if necessary */ - dev->irq = of_irq_parse_and_map_pci(dev, 0, 0); } } +int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) +{ + bridge->swizzle_irq = NULL; + bridge->map_irq = of_irq_parse_and_map_pci; + return 0; +} + void pcibios_fixup_bus(struct pci_bus *bus) { /* When called from the generic PCI probe, read PCI<->PCI bridge