From patchwork Sun Apr 9 00:08:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81289 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1123217vqo; Sat, 8 Apr 2023 17:25:42 -0700 (PDT) X-Google-Smtp-Source: AKy350Y81RljQ4hFVGOoSXd/G7kuxfWm7w3y4lbEKPdP10H47boKQ3bn3k6EjzW6v+L1FQRoJU+F X-Received: by 2002:aa7:c510:0:b0:4fb:59bb:ce71 with SMTP id o16-20020aa7c510000000b004fb59bbce71mr6850721edq.36.1680999942047; Sat, 08 Apr 2023 17:25:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680999942; cv=none; d=google.com; s=arc-20160816; b=T08u48M4J8BlGD3HU3IjYWX4DphWSLBLYadx9tImB4RE3blgBec6d9UedWG9boBtiZ q8TDB4rUVdhgaTanUdadvv8n7yzwVD+oDPoy1KUwG2ykZWLVh26cB4/X+8zUQ1gVH6cO 9kv6j1uNZ7qkDxqb6+CitPne2mtFB6kXkW3N4pdssw/SD03aRHd9o9PdyBok/OMxsOEF 3HnJpqvnhs71HHewfjCgqg5ap3wTZsctRNgfxYBFgTg5U/O421fLKedDu+IHcY5WUymG TEDTNxbmECO2aaV/rbeuNcJ1QdXvVEW9/1IWo9jCJZlUhRZpbqbNBo/mOTB2QDOcq62d 8A4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3Mk9TYxYTOyNqJpRPo0g8E5xlkUkmNlAGqGF5ae6wl0=; b=G1LxSh3BhTdOiICUrGWcvzZtzeYbawpR4PpQdKSVuY+XD9e9v1u+1ogbZ2dhaqPJQT lg65utfTUfByZ/la+zxalmmjaoF5h/i/pMKIj3aV9Mx1tFKxIFx+WRrHxyKDHsirrgQ/ WAFidzT3idpgmqrtVeaBLcILupVd+REpU6jiruEBy86+6tEN7J5VNZcVbuZEvyfij1PD VeUnLmXcDdfK8oJ6jFW6RL6d0RXNneYjhTuNmHgVSWR78mAPsU9iAbQ/p7yGs/2nWLPV EhTBhyngPBCztLlMeA7sD3EppAGL011VDJzRCw8TxX2SI1+5wI4GZaso3XgNxJWYrEUa gauw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WOvrtaRm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z20-20020aa7c654000000b00501de573b72si6350449edr.515.2023.04.08.17.25.15; Sat, 08 Apr 2023 17:25:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WOvrtaRm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229570AbjDIAJe (ORCPT + 99 others); Sat, 8 Apr 2023 20:09:34 -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_Roh=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 X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762656195051220108?= X-GMAIL-MSGID: =?utf-8?q?1762656195051220108?= 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ár --- 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); #endif /* CONFIG_EEH */ +#ifdef CONFIG_FSL_ULI1575 +int uli_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn); +#endif /* CONFIG_FSL_ULI1575 */ + #define PCI_BUSNO(bdfn) ((bdfn >> 8) & 0xff) #else /* CONFIG_PCI */ static inline void init_pci_config_tokens(void) { } #endif /* !CONFIG_PCI */ +#if !defined(CONFIG_PCI) || !defined(CONFIG_FSL_ULI1575) +#include +static inline int uli_exclude_device(struct pci_controller *hose, u_char bus, 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/platforms/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 #include #include @@ -107,9 +108,6 @@ void __init mpc85xx_ds_pic_init(void) } #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; static int mpc85xx_exclude_device(struct pci_controller *hose, diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/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 #include @@ -39,9 +40,6 @@ #endif #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 #include +#include #define ULI_PIRQA 0x08 #define ULI_PIRQB 0x09 @@ -36,7 +37,7 @@ #define ULI_8259_IRQ14 0x0d #define ULI_8259_IRQ15 0x0f -u8 uli_pirq_to_irq[8] = { +static u8 uli_pirq_to_irq[8] = { 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); -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 devfn) { if (bus == (hose->first_busno + 2)) { /* exclude Modem controller */ From patchwork Sun Apr 9 00:08:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81285 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1118847vqo; Sat, 8 Apr 2023 17:10:34 -0700 (PDT) X-Google-Smtp-Source: AKy350ZKqp/oKuUAB+yEbucnR6cSfBUvp8XPnr8waMX8Ye9LNSHjj7462F/MUSBJrIz1icpEtlbQ X-Received: by 2002:a17:907:e90:b0:878:7c18:8fd9 with SMTP id ho16-20020a1709070e9000b008787c188fd9mr3481627ejc.44.1680999033793; Sat, 08 Apr 2023 17:10:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680999033; cv=none; d=google.com; s=arc-20160816; b=f/gCwPbMeF9EPOWypRmYlmNGTVmE0ICFq83J0PhJE4RaQXjVUNux7587WNLXU9yLYh EUGhTFULzRHOWm9skwT0at50cJkCgtoEOkedUXv2Ir1ELOXDpcbwb12YK3Oz8FsVGq+A cUy67PD8RObq89rLjTKfnyhSek8+mRY14sk41eAOQ6/eFZX7tgXE8RBBgOSgZ0caphnW g9cDRMhHpOHGv5GszTsgjpVb9gAyvgSwV7Da7lpInLvpBRuemoxom9Mf2W8tthrjHI8W aKlKI60Kc4mFhn1ezwj6ui6kHOKZuu5om0q4FLuffXuZ+gC8/tWsc3FzXe12loHY1AKD s2lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9SPPUe/3Vip0wDrcbUam+72iuqUbo0HrNwZFsCkDcOE=; b=OPv0JK2GzlqeTthEls9cWOeBhPZDYtPpdpaQczA9o/bJ/IA8RGJt9sCrSCFt/mgE0h 7N3z0ZZHHYsf/zhclvlHVTZyLyHrih6iCzusjgFlkoqOx1i4LuiUlPQaYVgPu+hyG1E2 T1l26I/bge3i4F4XoALLoTHzNx2oVOoaXZQaoso2jhSbNQen5rd5+6Up1nzchcDkVOkM Ke1cC6g4aBfwoC0qyAIw/REKad2Ak1Mg1AJ4/pipYtzCBbz2nOpR1E/tDUt3eYC9rdCg 06ZcZ2Bcnxbgkb5j4WAHAtLniHcluRu3kmVuird7i4PnK/NlRXZ27kYv5Ke0jisJy4Z0 4hXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U07AaPok; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t17-20020aa7d4d1000000b00504929500f9si1400123edr.148.2023.04.08.17.10.07; Sat, 08 Apr 2023 17:10:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U07AaPok; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229516AbjDIAJZ (ORCPT + 99 others); Sat, 8 Apr 2023 20:09:25 -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_Roh=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 X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762655242416397980?= X-GMAIL-MSGID: =?utf-8?q?1762655242416397980?= 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ár --- 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/platforms/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) } #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 == pci_with_uli) + if (hose->dn == fsl_pci_primary) return uli_exclude_device(hose, bus, devfn); 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; /* See if we have a ULI under the primary */ From patchwork Sun Apr 9 00:08:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81284 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1118846vqo; Sat, 8 Apr 2023 17:10:33 -0700 (PDT) X-Google-Smtp-Source: AKy350aNM9YNn1xMlCRQuMZ9vpokM4U/61UHpjEM32vG0D63vXOm/QRX8rn5SPVMWyrnkfxjmMGC X-Received: by 2002:a17:906:4a44:b0:933:2f77:ca78 with SMTP id a4-20020a1709064a4400b009332f77ca78mr3477929ejv.28.1680999033792; Sat, 08 Apr 2023 17:10:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680999033; cv=none; d=google.com; s=arc-20160816; b=s5lzztdbFg8doTw4LELvmE0xEl16VCzLx7lBSM3NRUpm1tb8+/+hRdLyeahLhRB/E/ twcXm82zURYDHSZzOyrgnuzZYM0U/u56QOPhi1Thp26sTT6rYGAN+TPBxjCZ/ZzJBd+M S4mZ4pR8b0J8FscN/IemoA1T/3jQjWzMlBWZe/pfkzJ34qWAVG5SIWGVmiQBmHlVSDK3 ADjaDmh0kbLuuyXwE2NtrXmy3Zum/PweMMgUELSTVOrNTd8/t6yGEaQOomTkG7t3xinE bc0t+n0nUS8zh8z5vYoefMb3hhrpWfTOVRv73M8gBT1dbH9g/hysuQ+/suK+bBcyDpGO XBUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NS/leeoJc7HPA+RaL0e1zOP9pwqxK2gI2WZ3KR1xBN4=; b=SM07Pg8isJd7hoSjdKtisXBln5rhwU4O+3QpKELDEj8WFaB/7ufXjR8Gk2gWIJknHT N+Tipb7GzmSr0NDEAFYOhIQeeLFNJXl+91bl29MyTXib4yGj0gWpFt2Hzyg2NTua1kBD 3kBTelzlFPi6rrO+f0BDVUj5K0yn3w89Y5I5OLInpqD5fqVTfqCX3oQW12q/s/+uJVrM HVkZ+YPGzHztCgOMolbQ+vt3r0X2yLKtB7ux2jdT5wlwrbmuqA+v4qSCX+aCigZpjt8X oeKABSy0PmXLKQzVLcDMliFcUOUPJkMJtyY0mPfDDhxLhe1gn8Pif4LInq0fsL1XeQYL wyhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AulMtaPn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g5-20020aa7c585000000b0050202f2d6a7si243779edq.319.2023.04.08.17.10.09; Sat, 08 Apr 2023 17:10:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AulMtaPn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229543AbjDIAJ1 (ORCPT + 99 others); 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_Roh=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 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762655242592363623?= X-GMAIL-MSGID: =?utf-8?q?1762655242592363623?= 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ár --- 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/platforms/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 */ } -#ifdef CONFIG_PCI -static int mpc85xx_exclude_device(struct pci_controller *hose, - u_char bus, u_char devfn) -{ - if (hose->dn == 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 = pci_with_uli; if (pci_with_uli == fsl_pci_primary) { - ppc_md.pci_exclude_device = mpc85xx_exclude_device; + ppc_md.pci_exclude_device = uli_exclude_device; break; } } diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/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 -#ifdef CONFIG_PCI -static int mpc86xx_exclude_device(struct pci_controller *hose, - u_char bus, u_char devfn) -{ - if (hose->dn == fsl_pci_primary) - return uli_exclude_device(hose, bus, devfn); - - return PCIBIOS_SUCCESSFUL; -} -#endif /* CONFIG_PCI */ - 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); #ifdef CONFIG_PCI - ppc_md.pci_exclude_device = mpc86xx_exclude_device; + ppc_md.pci_exclude_device = uli_exclude_device; #endif 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 +#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); int uli_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn) { - if (bus == (hose->first_busno + 2)) { + if (hose->dn == fsl_pci_primary && bus == (hose->first_busno + 2)) { /* exclude Modem controller */ if ((PCI_SLOT(devfn) == 29) && (PCI_FUNC(devfn) == 1)) return PCIBIOS_DEVICE_NOT_FOUND; From patchwork Sun Apr 9 00:08:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81286 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1118923vqo; Sat, 8 Apr 2023 17:10:53 -0700 (PDT) X-Google-Smtp-Source: AKy350brrYARCyXMDRF3RYt/XgfgbuBwOM5F+yfBbdYCIDfrA8vX6ybaWSov6DO00lVwG+6aPhR+ X-Received: by 2002:aa7:ce15:0:b0:500:5627:a20a with SMTP id d21-20020aa7ce15000000b005005627a20amr2507648edv.25.1680999052793; Sat, 08 Apr 2023 17:10:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680999052; cv=none; d=google.com; s=arc-20160816; b=vBIg8AfcaGw4U+QmZj8bxu0Xz+qgm650Ev6+gfmMFgVD1ikSlF6OkB8CsMpxVnMr83 mf9iS+mAm+wQ/zv/wV8qJJjIkJ47uV0kSZUCYX4+BIma7tjk/hmD78KTdO+kXtg9w7i4 PcakEHEvPOp7WIpFGplyznym93Qjp2p+Qsvi58/jJcVhcWTQOk0D7738oc+q7MadWyRJ iZQx7oi1/O0/G6mrroTheYGCzGavd4VAbaNeXadDEeHj85wKr/zuIjXF5599vQfC4AMR OvVQl7lo60AewUi+fQH59BkVOo2GsT5RQJQlbsz5BmyyB0I2LOb808bQiQytqrHkCLpG b8ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WuchoDXRaPeSxQFuYy/TELyaUNVk6he4MNZdh9VwfJU=; b=UUFCRlr1ybu5rvv1+/CTiYfN2mdt5oKzNV3NKrMwcrfk5BJfqHZA2rtwwss1ljktqx /9m4ZY6o+9gX/yJ9XAiHZIE2cItpvl/X1WNMWkldwNV06bavUOgM6qG7GGhFXXXrW6YJ KlmciPxIMnD0Tx7cVMlXrJ3EQ2VWiD7sEAiYk9bNILmAbwZZTLodg0ca+mpeVdwphPyQ eGXvziDhR9J9YIGZfeOVbbAJ+0YH/kFeGMwSmBMfx2qN42Ny5tqqmXRhtDo8vs0+Lumf 97g8sLo7mhhTvh0jgLw9mbz4KZTv7dwVSRQHSGxnUsyAvZmDCh1hkDNsHCbSN63Fz4em vsYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ucBBxINO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p21-20020a170906b21500b00947d54e4c1fsi4712075ejz.88.2023.04.08.17.10.27; Sat, 08 Apr 2023 17:10:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ucBBxINO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229565AbjDIAJb (ORCPT + 99 others); Sat, 8 Apr 2023 20:09:31 -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_Roh=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 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762655262576275357?= X-GMAIL-MSGID: =?utf-8?q?1762655262576275357?= 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ár --- 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); #ifdef CONFIG_FSL_ULI1575 int uli_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn); +void __init uli_init(void); #endif /* CONFIG_FSL_ULI1575 */ #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 bus, u_char devfn) { return PCIBIOS_SUCCESSFUL; } +static inline void __init uli_init(void) {} #endif /* !defined(CONFIG_PCI) || !defined(CONFIG_FSL_ULI1575) */ #endif /* __KERNEL__ */ diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/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 */ } -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 = of_find_node_by_name(NULL, "uli1575"); - while ((pci_with_uli = of_get_parent(node))) { - of_node_put(node); - node = pci_with_uli; - - if (pci_with_uli == fsl_pci_primary) { - ppc_md.pci_exclude_device = uli_exclude_device; - break; - } - } -#endif -} - /* * Setup the architecture */ @@ -138,7 +117,7 @@ static void __init mpc85xx_ds_setup_arch(void) swiotlb_detect_4g(); fsl_pci_assign_primary(); - mpc85xx_ds_uli_init(); + uli_init(); mpc85xx_smp_init(); 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) 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 = of_find_node_by_name(NULL, "uli1575"); + while ((pci_with_uli = of_get_parent(node))) { + of_node_put(node); + node = pci_with_uli; + + if (pci_with_uli == fsl_pci_primary) { + ppc_md.pci_exclude_device = uli_exclude_device; + break; + } + } +} From patchwork Sun Apr 9 00:08:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81290 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1123218vqo; Sat, 8 Apr 2023 17:25:42 -0700 (PDT) X-Google-Smtp-Source: AKy350a75hAZMEqgJWnyu6Xkzcv1TY/TnxMCpxRVtmHtqEjmi5Tvjw1PM8tpNP2so2yYQGCp5TWT X-Received: by 2002:a17:906:9bed:b0:94a:5615:6a80 with SMTP id de45-20020a1709069bed00b0094a56156a80mr1848967ejc.30.1680999942048; Sat, 08 Apr 2023 17:25:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680999942; cv=none; d=google.com; s=arc-20160816; b=FMMj7mNzTRadivvc5wLplKvnRvOL4ZZwEPJ9ulrUL/37fn/eliuMlrmjNGyMaP9uyk bQhw1YMAvJNxNh61GYNj84Fu6ebKodH+XQZPd0ynUqw6O/qL19bYvXt4C0uML+chPRtC O+Mf92nTI5ly2GOEgrYRInmnBomyCrJ17Jpxe+OFhlqE3l8IMffskRUaGeW1oraGrwkq EQxyCHDOM/tvFCXfVELY6CPKFcZTaxMi2EfHSxkipXxSrrYTCP50rY1ii83X6R55WWMi KgC6xgyfKM6D6MbcP19ksFX44xGhAIXWaTYco5tZnai8pLFN47uzcjkN3UQYv4ZrDFqG qRxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8EnSqdLLRGWhpdLIr3iXex1vC32INJVyS+YejDUXAhw=; b=jLTZa9oAYc/4Iuz8rs8m4PSGwtbl7QfghqZYgR3yXaik7AJYqjmorX+7fY4uWazODZ g14aUcmXcFFhw+bBW0OnNM/Ottp/FDK1VSLS9wPNbgvI6mnMSR0k943fLhYmOCD1tdy6 WdXVljxnXbe2zizKADEHv+F903Oqjxn2cRVTNYiGCP178jhW1AoRv40Rk7LCEi5DoAdN b6rKJmQ2xH3CApPwCOYSJCXlVLyEKfzDx4yuN1cpGoRgO17uVBMcQXSAukN1V5+i2iDG Sfs9Eype1W52Uu247zepBZe+Zt8cy4/iV3kP2jLv9/1zZjlbuTxi53RmXI8v+jngo7h3 JBXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oL+sTbXS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t5-20020a170906948500b0094a572fbce1si774708ejx.903.2023.04.08.17.25.15; Sat, 08 Apr 2023 17:25:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oL+sTbXS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229584AbjDIAJh (ORCPT + 99 others); Sat, 8 Apr 2023 20:09:37 -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_Roh=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 X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762656194817875508?= X-GMAIL-MSGID: =?utf-8?q?1762656194817875508?= 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ár --- arch/powerpc/platforms/85xx/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/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, From patchwork Sun Apr 9 00:08:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81287 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1123219vqo; Sat, 8 Apr 2023 17:25:42 -0700 (PDT) X-Google-Smtp-Source: AKy350YcTQdGWX920mjzzYy7iVNzWrK+fr170Iopk+lGAvxLGe48rUibVsJG5UoxtJ0L1LIWOWs5 X-Received: by 2002:aa7:cd75:0:b0:502:3376:46bc with SMTP id ca21-20020aa7cd75000000b00502337646bcmr5251859edb.8.1680999942048; Sat, 08 Apr 2023 17:25:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680999942; cv=none; d=google.com; s=arc-20160816; b=N8U1fQgeVVLASrBmP11p7tXVoesI7PNLt+WNRW2NPHNeWKJYT55v3lW6z6l44xRDbI HIWd6PqGuJISVkjsAEevlsubZoryYVbyds+eH0RSfJb/LBSGLN/VS2WT9E/ma+2a6nHM RIulqXSbj6iGBO4iW/QtUAbnZQfAEAXdAc4hJqSui0IVIzGl0VW4kqXz/lznqPMC2v8D 3zxtrqdfawQ9db/uTelM3x3zAbFYYDccwGtGdjmjIvbudRhaZG0HKVsAAGYX2qkadFxr E4PFvLhUZZxXAZUeaCRkM3CQ5zfLZhYKBcLIw/H17PYnpLRFkHjbLB0tAsLVXpFOo6UP OPQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HFcn08Xu4BMSryuSHnY2nps83V8z0OOCtFbmPpUWkbo=; b=jYRrSCSg9L+AoEVWjkumVltHw94y8xI0a+CpPum2R1QssjY88w13ihMn55/qrEjqE2 HMS8JbRU1HPCJn2dSCjJbSWrKsZSd8BDrAbzhTDMH80uH+r7awtaR99WhsxF6RSzs217 ha/Pp0OtgmkLf6R7BbaTljVpNSjCobz5pe0S4lkArraBQzNPOUM/VkVs9zU4OzfCJpwV XUXLURI57r1B/3g18y+gnggABZdZMiiDGBXaUr9uWSi9DRhQ/Ncoo3jBmnPkesim3IDL YpT0b8gE9l2JMT2kCaaxRXKFFYaesuv7QJ+i2VZglRGT0cMv80LdYzKeuGUBHHGkUTC3 qUvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tebSVYfP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qm5-20020a170907674500b00947e04bda8fsi6976183ejc.35.2023.04.08.17.25.15; Sat, 08 Apr 2023 17:25:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tebSVYfP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229615AbjDIAJn (ORCPT + 99 others); Sat, 8 Apr 2023 20:09:43 -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_Roh=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 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762656195099320291?= X-GMAIL-MSGID: =?utf-8?q?1762656195099320291?= 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ár --- 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). 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 From patchwork Sun Apr 9 00:08:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81291 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1130638vqo; Sat, 8 Apr 2023 17:50:29 -0700 (PDT) X-Google-Smtp-Source: AKy350aba0R/GdAgmtje3ag0LQwxxLrbWZwjMHpeXhC04QVuX6HtOEUkmvHfJ2OCQ/c6IHtMXPEA X-Received: by 2002:a17:902:ec91:b0:1a4:fe07:49e9 with SMTP id x17-20020a170902ec9100b001a4fe0749e9mr9668819plg.63.1681001429593; Sat, 08 Apr 2023 17:50:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681001429; cv=none; d=google.com; s=arc-20160816; b=CoHSgH26B7iLcBW0Y/qUL564Xs9XMzieJsPNvdEGPvQqyYtCxuKmQl8mvchizlAlWE 7biQN+ZhnsNEA+kDwrqblTgmq10Q8hO8bOP8QNhDTCESCYDlmQwId04mwHlf2W3C3NJo qPU3wm6CaJTlpVJh/Q8MjPMQVisG5asFdn+meHI8NxWpubIQDMS2B1StJnMGbTfRvnm5 QT9rJIxzCbckaf5CtM/EtNl1X4npXTnihkqOy6g+8htZBT5dAMjauF5UnbQEp/IJB3YT pA3x8BUyo7tUab90WZXI21mf/p1GiYxTNn1Ufa/YY09VlaOaIGDEGkRf/THnxKa0uBI5 ffag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bFR1F9klYQ4KqG6ez4UJSCi45dcCLKa28RGliG130Yg=; b=OM5GgO9lP4dLjd9g5Fly2d2B7CksN8wIdcWZw40VCK9a215Ow5YS4F0dXWJC4ghBU4 OEPRSROPp9jOOgXVfXpbrH7rbaXiyOoLJQvYQKwvcgcP4cV/1g14Kl2GUqLJhk01RpJD XOBo1aq+p+LKPPI58mqBxgAwuCOIDBqa4X5XvtAtl3TcPuGH0Lg1GQIQQVKHZ9rn4+ho 5jXcLA0mOy+WWauJWNJL9mVJbhjFGEMpwU09girFWMhTGSl0Ba1AMSoPzFLFsXnNiUaH 3u57My28kLc/fgLIFztF3pPi3FpuSeHLpGdbefpuSrXX+3Hgl+8v9gQ+0t+Bb9NYk6wV RKyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tK6Zxue4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ky8-20020a170902f98800b001a1faee77fesi1626460plb.302.2023.04.08.17.50.06; Sat, 08 Apr 2023 17:50:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tK6Zxue4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229596AbjDIAJq (ORCPT + 99 others); Sat, 8 Apr 2023 20:09:46 -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_Roh=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 X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762657755320194430?= X-GMAIL-MSGID: =?utf-8?q?1762657755320194430?= 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ár --- 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/platforms/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); -#ifdef CONFIG_PCI - ppc_md.pci_exclude_device = uli_exclude_device; -#endif - printk("MPC86xx HPCN board from Freescale Semiconductor\n"); #ifdef CONFIG_SMP @@ -57,6 +53,7 @@ mpc86xx_hpcn_setup_arch(void) #endif fsl_pci_assign_primary(); + uli_init(); swiotlb_detect_4g(); } From patchwork Sun Apr 9 00:08:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81288 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1123216vqo; Sat, 8 Apr 2023 17:25:42 -0700 (PDT) X-Google-Smtp-Source: AKy350YgxhrE7xDHsdwCHSVoTnwRvhuB9xswxSwFi2oyuE3h3cn/H5sAHqdz7NlLJ/dm/GF34Ukm X-Received: by 2002:a50:fa8e:0:b0:504:8135:7394 with SMTP id w14-20020a50fa8e000000b0050481357394mr4835242edr.27.1680999942050; Sat, 08 Apr 2023 17:25:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680999942; cv=none; d=google.com; s=arc-20160816; b=ZDaIOyf2ISMdqxGxIi237fh1dAcX6DP8A4eEY9nZAizeiYhIgY09z32yY05FfKi2wc TpSgfxzj8iT16x0k2BAwqWZ4ST/C4lSKTSE87KgXVBjzwDw1lHFnA0dIBQZLG+keQd0F l7CbnXMqAaLo3lp76gkTMWUbBJ5VC1PvbBOS6cLj6NnLTt90MtQA/lKNHsk+1ovi9AGt Grd+XhUjUIYeiROq4L9NdwLP4mKmYQXilARtNKllmdj17T81WacaT0+eIcegqajJpXEo y/WsFbtA53fwkThWMmJ4vHx9+fEYaqzz+8Hzfwvvz+P0zJv9qSKP9Tws2HQCssqqAt9O sxwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sPN1KiKjct/447VW393O5jtxNcrtRTm801e+ldoLv/k=; b=y9F+R5Dtz9T3i+HQgN4qgZgCx2By9M3iMLaRoa7jezL9ZPAjm7gd5FZdvpoz/VuoEt x8bUJfV5YKKRRiGO05WLziPE0PIHgJsxyNJTh7jCJkIEVKPGPrcMIskTNwso+75A24TW L1F+6otxrPC7q9Hts3TvxI5DkfVqB5jULbJmrHn7vyfAdWeqpSR1Ln9WfVuYESGl+yF3 PI0nnBDrIvvN/Fr7OIsZkrNj3GUO5Cjwx3gv5qe6OEJ5onPMcodVYTQxm0HR4kouQPV1 dx/QorFMXb39hocwkeDA/yUaHLsTcoBmtmcUqvo1HFWvqo7agVfBnwtSFd5/GK+xKBrd eltg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V2l6qdPR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y1-20020a50e601000000b00501d531b215si6501282edm.522.2023.04.08.17.25.15; Sat, 08 Apr 2023 17:25:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V2l6qdPR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229603AbjDIAJk (ORCPT + 99 others); Sat, 8 Apr 2023 20:09:40 -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_Roh=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 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762656194878571599?= X-GMAIL-MSGID: =?utf-8?q?1762656194878571599?= 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ár --- 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 */ #ifdef CONFIG_FSL_ULI1575 -int uli_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn); void __init uli_init(void); #endif /* CONFIG_FSL_ULI1575 */ @@ -69,8 +68,6 @@ static inline void init_pci_config_tokens(void) { } #endif /* !CONFIG_PCI */ #if !defined(CONFIG_PCI) || !defined(CONFIG_FSL_ULI1575) -#include -static inline int uli_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn) { return PCIBIOS_SUCCESSFUL; } static inline void __init uli_init(void) {} #endif /* !defined(CONFIG_PCI) || !defined(CONFIG_FSL_ULI1575) */ 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); -int uli_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn) +static int uli_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn) { if (hose->dn == fsl_pci_primary && bus == (hose->first_busno + 2)) { /* exclude Modem controller */