From patchwork Sat Mar 3 20:05:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 144455 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 582C1B6EF1 for ; Sun, 4 Mar 2012 07:05:24 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7015A28107; Sat, 3 Mar 2012 21:05:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id m9vHLwYVgTVV; Sat, 3 Mar 2012 21:05:21 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A280428111; Sat, 3 Mar 2012 21:05:18 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CFE1D28111 for ; Sat, 3 Mar 2012 21:05:15 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gFr4BlM-51yk for ; Sat, 3 Mar 2012 21:05:15 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail.df.lth.se (mail.df.lth.se [194.47.250.12]) by theia.denx.de (Postfix) with ESMTPS id 37D4528107 for ; Sat, 3 Mar 2012 21:05:13 +0100 (CET) Received: from fecusia (c83-249-219-176.bredband.comhem.se [83.249.219.176]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.df.lth.se (Postfix) with ESMTPSA id 4E8D165D8E; Sat, 3 Mar 2012 21:05:11 +0100 (CET) Received: by fecusia (sSMTP sendmail emulation); Sat, 3 Mar 2012 21:05:10 +0100 From: "Linus Walleij" To: u-boot@lists.denx.de, Wolfgang Denk Date: Sat, 3 Mar 2012 21:05:08 +0100 Message-Id: <1330805108-24007-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.7.7.6 Subject: [U-Boot] [PATCH] pci: move pciauto_config_init() to pci.h X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Fixing build regressions for the Integrator I get find that a few boards try to work around the missing declaration of pciauto_config_init() by declaring it in the local scope. This does not make sense when the sibling functions are in so move the function to the header, ridding the build error in the Integrator and getting rid of the local declarations here and there. Reported-by: Wolfgang Denk Signed-off-by: Linus Walleij --- board/esd/cpci750/pci.c | 1 - board/prodrive/p3mx/pci.c | 1 - drivers/pci/fsl_pci_init.c | 1 - drivers/pci/pci.c | 1 - include/pci.h | 1 + 5 files changed, 1 insertions(+), 4 deletions(-) diff --git a/board/esd/cpci750/pci.c b/board/esd/cpci750/pci.c index a2c1c50..24ab13f 100644 --- a/board/esd/cpci750/pci.c +++ b/board/esd/cpci750/pci.c @@ -29,7 +29,6 @@ #include #ifdef CONFIG_PCI_PNP -void pciauto_config_init(struct pci_controller *hose); int pciauto_region_allocate(struct pci_region* res, unsigned int size, unsigned int *bar); #endif diff --git a/board/prodrive/p3mx/pci.c b/board/prodrive/p3mx/pci.c index e36b676..712c21c 100644 --- a/board/prodrive/p3mx/pci.c +++ b/board/prodrive/p3mx/pci.c @@ -29,7 +29,6 @@ #include #ifdef CONFIG_PCI_PNP -void pciauto_config_init(struct pci_controller *hose); int pciauto_region_allocate(struct pci_region* res, unsigned int size, unsigned int *bar); #endif diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c index bff1314..d04a08c 100644 --- a/drivers/pci/fsl_pci_init.c +++ b/drivers/pci/fsl_pci_init.c @@ -51,7 +51,6 @@ void pciauto_prescan_setup_bridge(struct pci_controller *hose, pci_dev_t dev, int sub_bus); void pciauto_postscan_setup_bridge(struct pci_controller *hose, pci_dev_t dev, int sub_bus); -void pciauto_config_init(struct pci_controller *hose); #ifndef CONFIG_SYS_PCI_MEMORY_BUS #define CONFIG_SYS_PCI_MEMORY_BUS 0 diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index bee2b52..007b850 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -518,7 +518,6 @@ void pci_cfgfunc_do_nothing(struct pci_controller *hose, * to get the correct result when scanning bridges */ extern int pciauto_config_device(struct pci_controller *hose, pci_dev_t dev); -extern void pciauto_config_init(struct pci_controller *hose); #if defined(CONFIG_CMD_PCI) || defined(CONFIG_PCI_SCAN_SHOW) const char * pci_class_str(u8 class) diff --git a/include/pci.h b/include/pci.h index 1284c42..7d98ad4 100644 --- a/include/pci.h +++ b/include/pci.h @@ -527,6 +527,7 @@ extern void pciauto_setup_device(struct pci_controller *hose, struct pci_region *mem, struct pci_region *prefetch, struct pci_region *io); +extern void pciauto_config_init(struct pci_controller *hose); int pciauto_config_device(struct pci_controller *hose, pci_dev_t dev); extern pci_dev_t pci_find_device (unsigned int vendor, unsigned int device, int index);