From patchwork Thu May 8 15:21:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 4137521 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EA177BFF02 for ; Thu, 8 May 2014 15:22:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0C4332014A for ; Thu, 8 May 2014 15:22:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 547D720212 for ; Thu, 8 May 2014 15:22:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753689AbaEHPWD (ORCPT ); Thu, 8 May 2014 11:22:03 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:55334 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753540AbaEHPWC (ORCPT ); Thu, 8 May 2014 11:22:02 -0400 Received: from wuerfel.localnet (HSI-KBW-134-3-133-35.hsi14.kabel-badenwuerttemberg.de [134.3.133.35]) by mrelayeu.kundenserver.de (node=mreue104) with ESMTP (Nemesis) id 0LbJZC-1X5uP2382c-00kxkQ; Thu, 08 May 2014 17:21:54 +0200 From: Arnd Bergmann To: Geert Uytterhoeven Cc: Ben Dooks , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Bjorn Helgaas , Magnus Damm , linux-pci , Linux-sh list Subject: Re: [PATCH] pci: rcar host needs OF Date: Thu, 08 May 2014 17:21:54 +0200 Message-ID: <9614403.Lyniq7F3TJ@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.11.0-18-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1399560433-1402630-1-git-send-email-arnd@arndb.de> <536B9D78.5000602@codethink.co.uk> MIME-Version: 1.0 X-Provags-ID: V02:K0:nxeyC4PrJvlEbcISfyWIg+emUt2iUYwgkJC1Une297i pn29Xmp1tp+nB6Y2edberLfWhNL29TQ5RRIiXjiqGLzTPS7KdY gKYGydt2JVACgoF78TWMAjddRAo1ZLm5MNhZDFM99iv2zc/x70 ubAheA9uohIk4fO+0GoE4O2w4PhzH3YCWEuggMJrBot+NiRt2f XSUJVQujZ9giLEnO4K4BWWBfkIRauLPJiXfwteEJyxtbxN2Oli KQlLZNYherbCwkweNgprVoaLvDmIDecLT7Qu0CY0XeYH2JEvr0 jCnDZ1bhqw0/Gc+d4kbz7A65fE3VZXURuOYJ7eATHARMjXqeZz 6IKD2RNOFOo/ctbxdNGQ= 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=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 On Thursday 08 May 2014 17:16:32 Geert Uytterhoeven wrote: > On Thu, May 8, 2014 at 5:06 PM, Ben Dooks wrote: > > On 08/05/14 15:56, Arnd Bergmann wrote: > >> > >> The pci-rcar driver is enabled for compile tests, and this has > >> now shown that the driver cannot build without CONFIG_OF, > >> following the inclusion of f8f2fe7355fb "PCI: rcar: Use new OF > >> interrupt mapping when possible": > >> > >> drivers/built-in.o: In function `rcar_pci_map_irq': > >> :(.text+0x1cc7c): undefined reference to `of_irq_parse_and_map_pci' > >> > >> Signed-off-by: Arnd Bergmann > >> Cc: Bjorn Helgaas > >> Cc: Magnus Damm > >> Cc: linux-pci@vger.kernel.org > >> Cc: linux-sh@vger.kernel.org > >> --- > >> drivers/pci/host/Kconfig | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig > >> index fbbef0b..4675f47 100644 > >> --- a/drivers/pci/host/Kconfig > >> +++ b/drivers/pci/host/Kconfig > >> @@ -27,7 +27,7 @@ config PCI_TEGRA > >> > >> config PCI_RCAR_GEN2 > >> bool "Renesas R-Car Gen2 Internal PCI controller" > >> - depends on ARCH_SHMOBILE || (ARM && COMPILE_TEST) > >> + depends on ARCH_SHMOBILE || (ARM && OF && COMPILE_TEST) > >> help > >> Say Y here if you want internal PCI support on R-Car Gen2 SoC. > >> There are 3 internal PCI controllers available with a single > >> > > > > This driver /should/ be able to be built for just the platform case > > so it sounds like f8f2fe7355fb stopped this but no-one has yet to > > notice. > > You mean include/linux/of_pci.h should provide a dummy version of > of_irq_parse_and_map_pci() returning 0 in case OF=n? Good idea, I'll give this patch some testing in the randconfig builder, replacing the one above. Arnd --- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/of_pci.h b/include/linux/of_pci.h index 1a1f5ff..b6f2621 100644 --- a/include/linux/of_pci.h +++ b/include/linux/of_pci.h @@ -7,7 +7,6 @@ struct pci_dev; struct of_phandle_args; int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq); -int of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin); struct device_node; struct device_node *of_pci_find_child_device(struct device_node *parent, @@ -19,11 +18,14 @@ int of_pci_parse_bus_range(struct device_node *node, struct resource *res); int of_pci_msi_chip_add(struct msi_chip *chip); void of_pci_msi_chip_remove(struct msi_chip *chip); struct msi_chip *of_pci_find_msi_chip_by_node(struct device_node *of_node); +int of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin); #else static inline int of_pci_msi_chip_add(struct msi_chip *chip) { return -EINVAL; } static inline void of_pci_msi_chip_remove(struct msi_chip *chip) { } static inline struct msi_chip * of_pci_find_msi_chip_by_node(struct device_node *of_node) { return NULL; } +static inline int +of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin) { return 0; } #endif #endif