From nobody Mon Dec 15 21:26:25 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96AA8C77B70 for ; Sun, 9 Apr 2023 00:09:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229580AbjDIAJf (ORCPT ); Sat, 8 Apr 2023 20:09:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjDIAJZ (ORCPT ); Sat, 8 Apr 2023 20:09:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4729683F0 for ; Sat, 8 Apr 2023 17:09:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C05A1616C0 for ; Sun, 9 Apr 2023 00:09:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CAEB3C433EF; Sun, 9 Apr 2023 00:09:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680998961; bh=zplOKDm9cHPNlwiN8ZmCM/Qx7EH1y8rnpVlgkclxTVc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WOvrtaRmDZ78SR/JS5E6nRvCVWDD3UuCZ/+R34yvnpc7EJXITcVPRlecCNW81Wv/X dBqOtbwLAeMj37WDSUUgHUiexwmic3xvUw0849MUfA5+hkpOimGQCyLxU+LP3UbWXM /ffLb4yMkQvGyn/x0NBOJdSeR2POlzPKiNkWlUatTx340sHkm2wWsYJjuIWRns5VX3 BJm8AEzWE6v/AtesOg8Gn+PTUY0vjfGMWsplmG29XcUO29Rf2+kk5HF6RdvsOLvnjF ufS4xF3MfFSwD2OgTvkXCinvotFbwXJ/E0VGz2N9omQ+vZqCjM/pukz5X2tJxtYZ25 82ZzBMPrTmSoA== Received: by pali.im (Postfix) id 1186E1BE4; Sun, 9 Apr 2023 02:09:18 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/8] powerpc/fsl_uli1575: Misc cleanup Date: Sun, 9 Apr 2023 02:08:05 +0200 Message-Id: <20230409000812.18904-2-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230409000812.18904-1-pali@kernel.org> References: <20230409000812.18904-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe Leroy Use a single line for uli_exclude_device(). Add uli_exclude_device() prototype in ppc-pci.h and guard it. Remove that prototype from mpc85xx_ds.c and mpc86xx_hpcn.c files. Make uli_pirq_to_irq[] static as it is used only in that file. Signed-off-by: Christophe Leroy Signed-off-by: Pali Roh=C3=A1r --- arch/powerpc/include/asm/ppc-pci.h | 9 +++++++++ arch/powerpc/platforms/85xx/mpc85xx_ds.c | 4 +--- arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 4 +--- arch/powerpc/platforms/fsl_uli1575.c | 6 +++--- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/include/asm/ppc-pci.h b/arch/powerpc/include/asm/= ppc-pci.h index f6cf0159024e..a8db969dd595 100644 --- a/arch/powerpc/include/asm/ppc-pci.h +++ b/arch/powerpc/include/asm/ppc-pci.h @@ -57,11 +57,20 @@ void eeh_sysfs_remove_device(struct pci_dev *pdev); =20 #endif /* CONFIG_EEH */ =20 +#ifdef CONFIG_FSL_ULI1575 +int uli_exclude_device(struct pci_controller *hose, u_char bus, u_char dev= fn); +#endif /* CONFIG_FSL_ULI1575 */ + #define PCI_BUSNO(bdfn) ((bdfn >> 8) & 0xff) =20 #else /* CONFIG_PCI */ static inline void init_pci_config_tokens(void) { } #endif /* !CONFIG_PCI */ =20 +#if !defined(CONFIG_PCI) || !defined(CONFIG_FSL_ULI1575) +#include +static inline int uli_exclude_device(struct pci_controller *hose, u_char b= us, u_char devfn) { return PCIBIOS_SUCCESSFUL; } +#endif /* !defined(CONFIG_PCI) || !defined(CONFIG_FSL_ULI1575) */ + #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_PPC_PCI_H */ diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platfo= rms/85xx/mpc85xx_ds.c index 70167b8f00a3..ed7b71d55b10 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -26,6 +26,7 @@ #include #include #include +#include =20 #include #include @@ -107,9 +108,6 @@ void __init mpc85xx_ds_pic_init(void) } =20 #ifdef CONFIG_PCI -extern int uli_exclude_device(struct pci_controller *hose, - u_char bus, u_char devfn); - static struct device_node *pci_with_uli; =20 static int mpc85xx_exclude_device(struct pci_controller *hose, diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/plat= forms/86xx/mpc86xx_hpcn.c index 7b00ebd2d7f8..3dbd396a0df5 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c @@ -22,6 +22,7 @@ #include #include #include +#include =20 #include =20 @@ -39,9 +40,6 @@ #endif =20 #ifdef CONFIG_PCI -extern int uli_exclude_device(struct pci_controller *hose, - u_char bus, u_char devfn); - static int mpc86xx_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn) { diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/= fsl_uli1575.c index 84afae7a2561..a32f9cef7845 100644 --- a/arch/powerpc/platforms/fsl_uli1575.c +++ b/arch/powerpc/platforms/fsl_uli1575.c @@ -13,6 +13,7 @@ #include =20 #include +#include =20 #define ULI_PIRQA 0x08 #define ULI_PIRQB 0x09 @@ -36,7 +37,7 @@ #define ULI_8259_IRQ14 0x0d #define ULI_8259_IRQ15 0x0f =20 -u8 uli_pirq_to_irq[8] =3D { +static u8 uli_pirq_to_irq[8] =3D { ULI_8259_IRQ9, /* PIRQA */ ULI_8259_IRQ10, /* PIRQB */ ULI_8259_IRQ11, /* PIRQC */ @@ -341,8 +342,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, hpcd= _quirk_uli5288); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, hpcd_quirk_uli5229); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x5288, hpcd_final_uli5288); =20 -int uli_exclude_device(struct pci_controller *hose, - u_char bus, u_char devfn) +int uli_exclude_device(struct pci_controller *hose, u_char bus, u_char dev= fn) { if (bus =3D=3D (hose->first_busno + 2)) { /* exclude Modem controller */ --=20 2.20.1 From nobody Mon Dec 15 21:26:25 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72CECC77B71 for ; Sun, 9 Apr 2023 00:09:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229533AbjDIAJ0 (ORCPT ); Sat, 8 Apr 2023 20:09:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjDIAJY (ORCPT ); Sat, 8 Apr 2023 20:09:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1298883D9 for ; Sat, 8 Apr 2023 17:09:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9A37A60ABE for ; Sun, 9 Apr 2023 00:09:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF9F2C4339B; Sun, 9 Apr 2023 00:09:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680998961; bh=0pyF5BprYbz87qK2AZkPwODALXJFq6DUsJqadpHT440=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U07AaPokjtBAc0C4wIr+iJMgavSe0ByRUzmmXqJlDdYCbUJSH38NDgqI0nNzbcz3w xRLhvM3KoZGuNoHiKe7j/w77n8Lk9Xv1kYOQhBICBAiUXPHqE/KEc5xYZ24P4253Dc T58A45KCBunC2OGxMpLLjAJXh2kS1yG3yXLDs4hmolj+wG/3ALNnhPKmje/Guspry4 fqn3bKiQvC1+E2hZ8PGrOO7hpseGM2jWQa0s0HBgYTa0wslyDJ4b126Q+ouOU5pk0h Cntrs68Ij/Nek/GDWz8h6ISC7/NnTXnn0fM0V3Mt7UVtMQ34m/wfeXRUob+OoZLnU0 fDa1zssTDuViQ== Received: by pali.im (Postfix) id 3944F1C97; Sun, 9 Apr 2023 02:09:18 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/8] powerpc/85xx: mpc85xx_ds: Simplify mpc85xx_exclude_device() function Date: Sun, 9 Apr 2023 02:08:06 +0200 Message-Id: <20230409000812.18904-3-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230409000812.18904-1-pali@kernel.org> References: <20230409000812.18904-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Function mpc85xx_exclude_device() is installed and used only when pci_with_uli is fsl_pci_primary. So replace check for pci_with_uli by fsl_pci_primary in mpc85xx_exclude_device() and move pci_with_uli variable declaration into function mpc85xx_ds_uli_init() where it is used. Signed-off-by: Pali Roh=C3=A1r --- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platfo= rms/85xx/mpc85xx_ds.c index ed7b71d55b10..0c905a838942 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -108,12 +108,10 @@ void __init mpc85xx_ds_pic_init(void) } =20 #ifdef CONFIG_PCI -static struct device_node *pci_with_uli; - static int mpc85xx_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn) { - if (hose->dn =3D=3D pci_with_uli) + if (hose->dn =3D=3D fsl_pci_primary) return uli_exclude_device(hose, bus, devfn); =20 return PCIBIOS_SUCCESSFUL; @@ -124,6 +122,7 @@ static void __init mpc85xx_ds_uli_init(void) { #ifdef CONFIG_PCI struct device_node *node; + struct device_node *pci_with_uli; =20 /* See if we have a ULI under the primary */ =20 --=20 2.20.1 From nobody Mon Dec 15 21:26:25 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AAF0C77B6C for ; Sun, 9 Apr 2023 00:09:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229545AbjDIAJ1 (ORCPT ); Sat, 8 Apr 2023 20:09:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbjDIAJY (ORCPT ); Sat, 8 Apr 2023 20:09:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 123CC83D7 for ; Sat, 8 Apr 2023 17:09:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9D31D60BFC for ; Sun, 9 Apr 2023 00:09:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3CE0C4339C; Sun, 9 Apr 2023 00:09:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680998961; bh=Ycr7jTbAN7a67s9Ksm6I4CQ7mN9wdogyCtOnF9CVtvY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AulMtaPnot7iSuH/BDJhiEY+VL+V7T0C4+unKd1JklvdM23BUkPJ+AUJflkGMnTWM +TOpstz1T1+nzSJ5RbouVmYCNh6EsKFovnhs8BGlNCwg9A7V38WEK9g1yL5/kHBhzq IaAWSa49UxZTN66mbNOuJD3rcK/8ZnOcapQ3RDDqRoT694/iwXSy6Kvkaxx05q19aA gjHrcrzx7X3R4nHsLVeBE0sRB0/iWF+pq9SMHJrY2HYRds9kKJY9LZiVHut+loQ3cZ 4q0fB3X3g18vcEu55rZRO4nbj6WBobay4JOKNmm4+hobYxMJbaM9aV1uu67yqxG0bE 8h2RUnP/2uAdA== Received: by pali.im (Postfix) id 64BB82047; Sun, 9 Apr 2023 02:09:18 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 3/8] powerpc/fsl_uli1575: Simplify uli_exclude_device() usage Date: Sun, 9 Apr 2023 02:08:07 +0200 Message-Id: <20230409000812.18904-4-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230409000812.18904-1-pali@kernel.org> References: <20230409000812.18904-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Function uli_exclude_device() is called only from mpc86xx_exclude_device() and mpc85xx_exclude_device() functions. Both those functions are same, so merge its logic directly into the uli_exclude_device() function. Signed-off-by: Pali Roh=C3=A1r --- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 13 +------------ arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 13 +------------ arch/powerpc/platforms/fsl_uli1575.c | 4 +++- 3 files changed, 5 insertions(+), 25 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platfo= rms/85xx/mpc85xx_ds.c index 0c905a838942..581b5f0ef3be 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -107,17 +107,6 @@ void __init mpc85xx_ds_pic_init(void) #endif /* CONFIG_PPC_I8259 */ } =20 -#ifdef CONFIG_PCI -static int mpc85xx_exclude_device(struct pci_controller *hose, - u_char bus, u_char devfn) -{ - if (hose->dn =3D=3D fsl_pci_primary) - return uli_exclude_device(hose, bus, devfn); - - return PCIBIOS_SUCCESSFUL; -} -#endif /* CONFIG_PCI */ - static void __init mpc85xx_ds_uli_init(void) { #ifdef CONFIG_PCI @@ -132,7 +121,7 @@ static void __init mpc85xx_ds_uli_init(void) node =3D pci_with_uli; =20 if (pci_with_uli =3D=3D fsl_pci_primary) { - ppc_md.pci_exclude_device =3D mpc85xx_exclude_device; + ppc_md.pci_exclude_device =3D uli_exclude_device; break; } } diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/plat= forms/86xx/mpc86xx_hpcn.c index 3dbd396a0df5..645125cc8420 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c @@ -39,17 +39,6 @@ #define DBG(fmt...) do { } while(0) #endif =20 -#ifdef CONFIG_PCI -static int mpc86xx_exclude_device(struct pci_controller *hose, - u_char bus, u_char devfn) -{ - if (hose->dn =3D=3D fsl_pci_primary) - return uli_exclude_device(hose, bus, devfn); - - return PCIBIOS_SUCCESSFUL; -} -#endif /* CONFIG_PCI */ - =20 static void __init mpc86xx_hpcn_setup_arch(void) @@ -58,7 +47,7 @@ mpc86xx_hpcn_setup_arch(void) ppc_md.progress("mpc86xx_hpcn_setup_arch()", 0); =20 #ifdef CONFIG_PCI - ppc_md.pci_exclude_device =3D mpc86xx_exclude_device; + ppc_md.pci_exclude_device =3D uli_exclude_device; #endif =20 printk("MPC86xx HPCN board from Freescale Semiconductor\n"); diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/= fsl_uli1575.c index a32f9cef7845..1350db0b935d 100644 --- a/arch/powerpc/platforms/fsl_uli1575.c +++ b/arch/powerpc/platforms/fsl_uli1575.c @@ -15,6 +15,8 @@ #include #include =20 +#include + #define ULI_PIRQA 0x08 #define ULI_PIRQB 0x09 #define ULI_PIRQC 0x0a @@ -344,7 +346,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x5288, hpcd_= final_uli5288); =20 int uli_exclude_device(struct pci_controller *hose, u_char bus, u_char dev= fn) { - if (bus =3D=3D (hose->first_busno + 2)) { + if (hose->dn =3D=3D fsl_pci_primary && bus =3D=3D (hose->first_busno + 2)= ) { /* exclude Modem controller */ if ((PCI_SLOT(devfn) =3D=3D 29) && (PCI_FUNC(devfn) =3D=3D 1)) return PCIBIOS_DEVICE_NOT_FOUND; --=20 2.20.1 From nobody Mon Dec 15 21:26:25 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 225CDC7619A for ; Sun, 9 Apr 2023 00:09:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229573AbjDIAJc (ORCPT ); Sat, 8 Apr 2023 20:09:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjDIAJZ (ORCPT ); Sat, 8 Apr 2023 20:09:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5247783F6 for ; Sat, 8 Apr 2023 17:09:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B0F5E616BD for ; Sun, 9 Apr 2023 00:09:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8C92C433A0; Sun, 9 Apr 2023 00:09:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680998961; bh=HhZeWrgAig2HaS6hHyjC+NpmU7/VpU/d+SrMRHkoT6Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ucBBxINODGUVQGq30JIZ7MkNr9qlRoBk/lnedWexPzpOEpfLn7pSS1tokOLthU/98 wCt52TmsKX9bC9rTcK+kvcgERKZLY12G3VLu2JJoV6JXTcjnwmPKzt27FD5Sv8hbPx HBps4N7scRshb3pBNoDpTG0NCwOv67RulXkyUyRd37i9++xQ6iHRvp8U+SRoCtNWyZ Gh2mG452bEvykO/+85UepZ+FwDVN4SQaq90JLzcSSXI5BLETMsRVNVGunx8ZIjMgy4 /8cKueNJ7jHphBEXWwaY6WBvOhAG0bXpdWxFHG7yUtiSvWYfU9Q7JPYCDkrQ3txN5O j/fvjEdwrPReQ== Received: by pali.im (Postfix) id 8DCF3209C; Sun, 9 Apr 2023 02:09:18 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 4/8] powerpc/85xx: mpc85xx_ds: Move uli_init() code into its own driver file Date: Sun, 9 Apr 2023 02:08:08 +0200 Message-Id: <20230409000812.18904-5-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230409000812.18904-1-pali@kernel.org> References: <20230409000812.18904-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move uli_init() function into existing driver fsl_uli1575.c file in order to share its code between more platforms and board files. Signed-off-by: Pali Roh=C3=A1r --- arch/powerpc/include/asm/ppc-pci.h | 2 ++ arch/powerpc/platforms/85xx/mpc85xx_ds.c | 23 +---------------------- arch/powerpc/platforms/fsl_uli1575.c | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/arch/powerpc/include/asm/ppc-pci.h b/arch/powerpc/include/asm/= ppc-pci.h index a8db969dd595..0e393aeed912 100644 --- a/arch/powerpc/include/asm/ppc-pci.h +++ b/arch/powerpc/include/asm/ppc-pci.h @@ -59,6 +59,7 @@ void eeh_sysfs_remove_device(struct pci_dev *pdev); =20 #ifdef CONFIG_FSL_ULI1575 int uli_exclude_device(struct pci_controller *hose, u_char bus, u_char dev= fn); +void __init uli_init(void); #endif /* CONFIG_FSL_ULI1575 */ =20 #define PCI_BUSNO(bdfn) ((bdfn >> 8) & 0xff) @@ -70,6 +71,7 @@ static inline void init_pci_config_tokens(void) { } #if !defined(CONFIG_PCI) || !defined(CONFIG_FSL_ULI1575) #include static inline int uli_exclude_device(struct pci_controller *hose, u_char b= us, u_char devfn) { return PCIBIOS_SUCCESSFUL; } +static inline void __init uli_init(void) {} #endif /* !defined(CONFIG_PCI) || !defined(CONFIG_FSL_ULI1575) */ =20 #endif /* __KERNEL__ */ diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platfo= rms/85xx/mpc85xx_ds.c index 581b5f0ef3be..c474da3eeea8 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -107,27 +107,6 @@ void __init mpc85xx_ds_pic_init(void) #endif /* CONFIG_PPC_I8259 */ } =20 -static void __init mpc85xx_ds_uli_init(void) -{ -#ifdef CONFIG_PCI - struct device_node *node; - struct device_node *pci_with_uli; - - /* See if we have a ULI under the primary */ - - node =3D of_find_node_by_name(NULL, "uli1575"); - while ((pci_with_uli =3D of_get_parent(node))) { - of_node_put(node); - node =3D pci_with_uli; - - if (pci_with_uli =3D=3D fsl_pci_primary) { - ppc_md.pci_exclude_device =3D uli_exclude_device; - break; - } - } -#endif -} - /* * Setup the architecture */ @@ -138,7 +117,7 @@ static void __init mpc85xx_ds_setup_arch(void) =20 swiotlb_detect_4g(); fsl_pci_assign_primary(); - mpc85xx_ds_uli_init(); + uli_init(); mpc85xx_smp_init(); =20 printk("MPC85xx DS board from Freescale Semiconductor\n"); diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/= fsl_uli1575.c index 1350db0b935d..b073db9d7c79 100644 --- a/arch/powerpc/platforms/fsl_uli1575.c +++ b/arch/powerpc/platforms/fsl_uli1575.c @@ -358,3 +358,22 @@ int uli_exclude_device(struct pci_controller *hose, u_= char bus, u_char devfn) =20 return PCIBIOS_SUCCESSFUL; } + +void __init uli_init(void) +{ + struct device_node *node; + struct device_node *pci_with_uli; + + /* See if we have a ULI under the primary */ + + node =3D of_find_node_by_name(NULL, "uli1575"); + while ((pci_with_uli =3D of_get_parent(node))) { + of_node_put(node); + node =3D pci_with_uli; + + if (pci_with_uli =3D=3D fsl_pci_primary) { + ppc_md.pci_exclude_device =3D uli_exclude_device; + break; + } + } +} --=20 2.20.1 From nobody Mon Dec 15 21:26:25 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFEB0C77B61 for ; Sun, 9 Apr 2023 00:09:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229586AbjDIAJj (ORCPT ); Sat, 8 Apr 2023 20:09:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbjDIAJZ (ORCPT ); Sat, 8 Apr 2023 20:09:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82DBE8692 for ; Sat, 8 Apr 2023 17:09:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 37C04616C4 for ; Sun, 9 Apr 2023 00:09:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6AF80C4339E; Sun, 9 Apr 2023 00:09:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680998961; bh=1B1bdtjGi0qphccKaW9xvXzqnYHpNRSwmcqFmuJLGRY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oL+sTbXSdCweznn7Npv8YVUuK1KpdoGzqqK4xL61LuzJzJULj+zasB/Rp+Nh8H77O 4I32hkqjHG+ejhR27pnXyOPQn+fCZuVUI95u8TOp7ZTINga3kcmbmSXn3Yc4w/MPbV 49OVkUr5wP6/NRl3mjJhqig1UO5wjFdyZIkfXLmoPw3+dl0CSa5NpJu8TAmPsqpHIc XKMw9Qp4Y7VokscxJtrBf4obHW5k0ytXnsaIexR+g1Vmxiwi4JA3GUDUAhGEs9qILf 5yDrPa2m7ghOyUSIP4bM4s7v2clKQEAPNDkNZ+xkROL0FQfbl/PafZpseGCYGlr6EE ysOhySnLLW9Ig== Received: by pali.im (Postfix) id C63C920A8; Sun, 9 Apr 2023 02:09:18 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 5/8] powerpc/85xx: mpc85xx_rdb: Do not automatically select FSL_ULI1575 Date: Sun, 9 Apr 2023 02:08:09 +0200 Message-Id: <20230409000812.18904-6-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230409000812.18904-1-pali@kernel.org> References: <20230409000812.18904-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Boards provided by CONFIG_MPC85xx_RDB option do not initialize fsl_uli1575.c driver. So remove explicit select dependency on it. Signed-off-by: Pali Roh=C3=A1r --- arch/powerpc/platforms/85xx/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/8= 5xx/Kconfig index b92cb2b4d54d..a8ce6616fd0a 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig @@ -90,7 +90,6 @@ config MPC85xx_RDB bool "Freescale P102x MBG/UTM/RDB and P2020 RDB" select PPC_I8259 select DEFAULT_UIMAGE - select FSL_ULI1575 if PCI select SWIOTLB help This option enables support for the P1020 MBG PC, P1020 UTM PC, --=20 2.20.1 From nobody Mon Dec 15 21:26:25 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC0F6C77B61 for ; Sun, 9 Apr 2023 00:09:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229619AbjDIAJo (ORCPT ); Sat, 8 Apr 2023 20:09:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbjDIAJZ (ORCPT ); Sat, 8 Apr 2023 20:09:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA31B86A6 for ; Sat, 8 Apr 2023 17:09:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3CFBC616C7 for ; Sun, 9 Apr 2023 00:09:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6BCA8C433A1; Sun, 9 Apr 2023 00:09:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680998961; bh=2pNvYVP5uD4qt+Qt22ZgPaAGgqS2r/yXjQJVNWR+Fmg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tebSVYfP4WEsAcRzEmIaUO0XgpWQUPsWSvb4C8/WChT7X/rWOHuS+lYy8NHWlObd+ OyZEECT0HH0sAS/X3o/vm1OrDZ+2Mf5Dq1uTWBGeTz0ULYgK17HtmTpEtNvUyTStSe qrNOstV8zzNbvcboUbLRCGaRmjGBgc1096P2Ywg9612lJ3Df/S0UP2RVHBFTrPee1p ANVOQa36EvNKHccmmEuFZz7AXJppTEn1swq6/SvQaQ6wGkyV+5HgTwfZLFCS27H1Uv boLdXwA/J3G5E6073TBldVnO6bHVfWvkPlvctThRJq5a3rWZ2hppmQSZyAMenGfPjW 74SOUVTfp416Q== Received: by pali.im (Postfix) id 0A29B20C8; Sun, 9 Apr 2023 02:09:19 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 6/8] powerpc/fsl_uli1575: Allow to disable FSL_ULI1575 support Date: Sun, 9 Apr 2023 02:08:10 +0200 Message-Id: <20230409000812.18904-7-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230409000812.18904-1-pali@kernel.org> References: <20230409000812.18904-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ULI1575 PCIe south bridge exists only on some Freescale boards. Allow to disable CONFIG_FSL_ULI1575 symbol when it is not explicitly selected and only implied. This is achieved by marking symbol as visible by providing short description. Also adds dependency for this symbol to prevent enabling it on platforms on which driver does not compile. Signed-off-by: Pali Roh=C3=A1r --- arch/powerpc/platforms/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index d41dad227de8..608ac0290e3a 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig @@ -261,7 +261,9 @@ config CPM2 on it (826x, 827x, 8560). =20 config FSL_ULI1575 - bool + bool "ULI1575 PCIe south bridge support" + depends on FSL_SOC_BOOKE || PPC_86xx + select FSL_PCI select GENERIC_ISA_DMA help Supports for the ULI1575 PCIe south bridge that exists on some --=20 2.20.1 From nobody Mon Dec 15 21:26:25 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37E28C77B61 for ; Sun, 9 Apr 2023 00:09:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229575AbjDIAJr (ORCPT ); Sat, 8 Apr 2023 20:09:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbjDIAJZ (ORCPT ); Sat, 8 Apr 2023 20:09:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B497B83D7 for ; Sat, 8 Apr 2023 17:09:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 42415616C3 for ; Sun, 9 Apr 2023 00:09:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73A17C433A8; Sun, 9 Apr 2023 00:09:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680998961; bh=ps76pyu3TDlG2IApvb70QcdiPajYqBKpLTa4tWI5Ohs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tK6Zxue4K7UPtqIlVK/fMHIZgv7oixQdk1BL5ZW14GAUjy6ZqGU9ktImZlxBMtfNv bbUiMeGuiiZ4QqYQriftxfvFRdS9o8QL+r9OUKQiBvYBQ5AfuRHEZ4SCKQpjtmou1Z pbQUDhMTbzRD4nylA/2lDqhUZCu6MXFOLyXiRfaBppk44OCJPG/kvzs6oeB7gb+TBE ASRjwIELp0sKp3YYK0XneCuLGY+FrIzj9DzOaASnKjpgMcR8ziB4hjxqKPPzNwNSjA j/AOvNZiNijwXR9tMb/f1iUowHFhqEGkH3GRMh/tcV9zbY3YQhmFbC4LnvbyLNR79L J4oMUy7jsmjPg== Received: by pali.im (Postfix) id 36D14213C; Sun, 9 Apr 2023 02:09:19 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 7/8] powerpc/86xx: mpc86xx_hpcn: Call uli_init() instead of explicit ppc_md assignment Date: Sun, 9 Apr 2023 02:08:11 +0200 Message-Id: <20230409000812.18904-8-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230409000812.18904-1-pali@kernel.org> References: <20230409000812.18904-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After calling fsl_pci_assign_primary(), it is possible to use uli_init() to conditionally initialize ppc_md.pci_exclude_device callback based on the uli1575 detection. Signed-off-by: Pali Roh=C3=A1r --- arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/plat= forms/86xx/mpc86xx_hpcn.c index 645125cc8420..812110673d88 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c @@ -46,10 +46,6 @@ mpc86xx_hpcn_setup_arch(void) if (ppc_md.progress) ppc_md.progress("mpc86xx_hpcn_setup_arch()", 0); =20 -#ifdef CONFIG_PCI - ppc_md.pci_exclude_device =3D uli_exclude_device; -#endif - printk("MPC86xx HPCN board from Freescale Semiconductor\n"); =20 #ifdef CONFIG_SMP @@ -57,6 +53,7 @@ mpc86xx_hpcn_setup_arch(void) #endif =20 fsl_pci_assign_primary(); + uli_init(); =20 swiotlb_detect_4g(); } --=20 2.20.1 From nobody Mon Dec 15 21:26:25 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEA4BC77B70 for ; Sun, 9 Apr 2023 00:09:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229612AbjDIAJl (ORCPT ); Sat, 8 Apr 2023 20:09:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbjDIAJZ (ORCPT ); Sat, 8 Apr 2023 20:09:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 805D983FB for ; Sat, 8 Apr 2023 17:09:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3C818616C5 for ; Sun, 9 Apr 2023 00:09:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72E2CC433A4; Sun, 9 Apr 2023 00:09:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680998961; bh=YEYW+9T4EI8T6uo7e4f/NgSgHv1w/SjKHzpBZaSdlx4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V2l6qdPRZkpPOakuXO/i2NozEMYU2t+gCNAfFzbWPbCgqgmrS2KO6Jr1uL4tRgbOH yTk+Yu/kAI4rw9IwBT0Ad8MP+aZBz69bD4mMT6zHJFXQtLUuX+cVhSw7xDS1dPT7JW ucuMN3AKdAssbIza5ZXUw/ylvCdAIACYNA9L81NwtWDhx9/zrjvGEQbT+4FNjiYyoL gcc1pxGutqIPcajSyfmG6FoPWkl5d+/0ha9tPjnJsd7fkQsKt08xdLll2Z9rM6+m1N Qh+RRt2uJgAX36gL9m3da0R9+v7GB9e5k3BG8EW33qdTHZgBzlngdyIo/atnA+oe40 bMSWkufxHF0pA== Received: by pali.im (Postfix) id 70BA32317; Sun, 9 Apr 2023 02:09:19 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 8/8] powerpc/fsl_uli1575: Mark uli_exclude_device() as static Date: Sun, 9 Apr 2023 02:08:12 +0200 Message-Id: <20230409000812.18904-9-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230409000812.18904-1-pali@kernel.org> References: <20230409000812.18904-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Function uli_exclude_device() is not used outside of the fsl_uli1575.c source file anymore. So mark it as static and remove public prototype. Signed-off-by: Pali Roh=C3=A1r --- arch/powerpc/include/asm/ppc-pci.h | 3 --- arch/powerpc/platforms/fsl_uli1575.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/powerpc/include/asm/ppc-pci.h b/arch/powerpc/include/asm/= ppc-pci.h index 0e393aeed912..d9fcff575027 100644 --- a/arch/powerpc/include/asm/ppc-pci.h +++ b/arch/powerpc/include/asm/ppc-pci.h @@ -58,7 +58,6 @@ void eeh_sysfs_remove_device(struct pci_dev *pdev); #endif /* CONFIG_EEH */ =20 #ifdef CONFIG_FSL_ULI1575 -int uli_exclude_device(struct pci_controller *hose, u_char bus, u_char dev= fn); void __init uli_init(void); #endif /* CONFIG_FSL_ULI1575 */ =20 @@ -69,8 +68,6 @@ static inline void init_pci_config_tokens(void) { } #endif /* !CONFIG_PCI */ =20 #if !defined(CONFIG_PCI) || !defined(CONFIG_FSL_ULI1575) -#include -static inline int uli_exclude_device(struct pci_controller *hose, u_char b= us, u_char devfn) { return PCIBIOS_SUCCESSFUL; } static inline void __init uli_init(void) {} #endif /* !defined(CONFIG_PCI) || !defined(CONFIG_FSL_ULI1575) */ =20 diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/= fsl_uli1575.c index b073db9d7c79..b8d37a9932f1 100644 --- a/arch/powerpc/platforms/fsl_uli1575.c +++ b/arch/powerpc/platforms/fsl_uli1575.c @@ -344,7 +344,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, hpcd= _quirk_uli5288); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, hpcd_quirk_uli5229); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x5288, hpcd_final_uli5288); =20 -int uli_exclude_device(struct pci_controller *hose, u_char bus, u_char dev= fn) +static int uli_exclude_device(struct pci_controller *hose, u_char bus, u_c= har devfn) { if (hose->dn =3D=3D fsl_pci_primary && bus =3D=3D (hose->first_busno + 2)= ) { /* exclude Modem controller */ --=20 2.20.1