From patchwork Sat Apr 8 13:21:44 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: 81216 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp879346vqo; Sat, 8 Apr 2023 06:37:27 -0700 (PDT) X-Google-Smtp-Source: AKy350az1LR7lY1bnhWvnjEWkJBgsJs7GwtAw1yJ1lNuca1xLla5Qu9Gwk9Nl6YmeBzWUcHM0TF2 X-Received: by 2002:a17:90a:18e:b0:23f:58d6:b532 with SMTP id 14-20020a17090a018e00b0023f58d6b532mr6059313pjc.5.1680961046948; Sat, 08 Apr 2023 06:37:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680961046; cv=none; d=google.com; s=arc-20160816; b=sOQRhUoPlgCn0ACiaGTr+muj92MOm0mzYxq1GahTQTv2zhNhZRfHITBkKkiRZtgOc0 /lKCCSzR5AS05wT0rEYt8SNyCo0lyXXuXdRmc2Y4WtAPmRtTWiv3nV+YeswfYmLBfSAD 8iA1xPmxZwSmkyvdSnVfQ5pPByOgbba4DnZlzbgzzzAzjtIND/LZxgEVXw4yXCLAsAp5 4HvovA+L309EoIQdktN5EGtNy/q9tlTjbxHBoS3FmxNROxO31KjJdjKSVt0DCg9rCN6B oKvn093Xlcy77eP0z4thFvsNR8irqe/gvzvI5cpJUOpShZNC5J5bJJhAz8WwY9VDzIcJ gAFA== 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=ntnbAotwLtwwGVrGHEADUfrX10d4hUlZ/L5z/Hb5rOU=; b=Fefhg9VLjaUM8glMxGi6CumThAP3dgaJVULkUaxIdnjsU42KCyLYNVtZW6FOlvOaU4 66PPNaKD5jc+e2DXDTcXfEhzag2qXiIbYDhbqCVA9BNIXhakoEUNOQeA2hgRtx8uHxfk qHH/++ZzvhqSGRPuBMGhkqotAwyXk+t9jZCQhJ9bDAaSWzLY6yG5EdNvC3kPk5wuB9vS 7GxbsmXdAyEL1EUllurHmpfPo3j3t2hL+CpYdRId5Olv9StC9TkKbn7Itg01NHFeP75c 6NWBAB3WSL1AADZz1YYOsYTFUvYTyvNArtDykekPjjBITXuvBceQC6UcFK48V9SD516A 51gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RtVJ3N1Q; 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 n19-20020a17090b0d1300b00240f454a59asi5836054pjz.139.2023.04.08.06.37.14; Sat, 08 Apr 2023 06:37:26 -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=RtVJ3N1Q; 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 S229882AbjDHNYQ (ORCPT + 99 others); Sat, 8 Apr 2023 09:24:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229902AbjDHNYK (ORCPT ); Sat, 8 Apr 2023 09:24:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A410D530 for ; Sat, 8 Apr 2023 06:24:09 -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 E9AA9614B5 for ; Sat, 8 Apr 2023 13:24:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06657C4339B; Sat, 8 Apr 2023 13:24:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680960248; bh=iTZ6SSSkmkUrttYgTeEY1olkDBnV1oJ/1z4G62lZrhE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RtVJ3N1QacMSiqLD+DPMteaEk8x2Yv6vvuMkONEQomWnEmNOTcjXKAT6iXfX7ULVW JfHDM7Ayfhoz/0aMgPIYk+UTspKf4X6VKgNEDUrmY9c6kFnbDwWGPNxdNydRXEcdDK bGc0QfUYbtZVpPciBwDsZnUgig08PAI3HE8eCQCH4FoSkOZiaraKQWw4hjtc2A6mXP U6vQvcmKQFI4z+Q12HOYzT1/tE/yIinD1z/zLJTWp/uE/gGJ6fI75XeckhK25stT8e 5MUdbS2st6NUuqsoMmc/fqHl8LE3NyPe/mS3vvQblNxFcYvgx4twWQUCXKpjxEvlWp CjNLiSKd5ra3g== Received: by pali.im (Postfix) id 458661BE4; Sat, 8 Apr 2023 15:24:05 +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 1/8] powerpc/fsl_uli1575: Misc cleanup Date: Sat, 8 Apr 2023 15:21:44 +0200 Message-Id: <20230408132151.8902-2-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408132151.8902-1-pali@kernel.org> References: <20230408132151.8902-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?1762615410325782275?= X-GMAIL-MSGID: =?utf-8?q?1762615410325782275?= 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 | 8 ++++++++ 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, 13 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/include/asm/ppc-pci.h b/arch/powerpc/include/asm/ppc-pci.h index f6cf0159024e..56ba9ec68fcd 100644 --- a/arch/powerpc/include/asm/ppc-pci.h +++ b/arch/powerpc/include/asm/ppc-pci.h @@ -57,11 +57,19 @@ 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) +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 Sat Apr 8 13:21:45 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: 81209 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp877888vqo; Sat, 8 Apr 2023 06:34:22 -0700 (PDT) X-Google-Smtp-Source: AKy350YIijHtXEHkdXpKRbHpiYL2dejwC7QT9GFhqqniC34O3ug9I/3tHP8Z90a9mhynMqrTqSPB X-Received: by 2002:a17:902:ced2:b0:19e:7a2c:78a7 with SMTP id d18-20020a170902ced200b0019e7a2c78a7mr7504780plg.57.1680960862207; Sat, 08 Apr 2023 06:34:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680960862; cv=none; d=google.com; s=arc-20160816; b=ghIIVgXfDH/yPsEM+qk4wnwmFm0uofopsPkYVo69paOJ1Jx3Sd6s05F05p03Rn7tUt HI8tkJbMtpZq7+fYu4KIZM8VI/ekfBySkyFQNBsr4xqqqnebgeYr8UZGeG6u4kDlu9Fo 4magQcR6ETGR9xJWl1WIUU4CgJutdTZ49OC3bxVgZdcRnkHRay0gm2W46vL0qhmeVOxE ZXufGQ3nr5gUtbOnYQjw34RobAAr9/ffMh1KpKK3HxpSxNyS6i7eHAfE+UBeM38tptSm GaO8CFAIttU0Or6M+2ZDiYzBSnB4+eJ8u3H3uqOVofexJhnlW9t9ujEkeexmvPhNNbl1 mTJg== 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=M+f6PVYC6FKJa2FGVjUoacky0qXLjbha2zqwEn5CuFh2an5GH4l9y5IF3Mnyqpdrk5 ZBhfyAHXKRDxekRb8vTum4nksLyXAjSBHgHvAi0D3rCpqRI4sB8nmj3H1w7DXFFEnLKG ZkDWkl/n7NAeEQIjfxw7jJ7Puc0y9Yu4t35I4E7siyZkGXQLHyW1UzoqnH24c9TihW9d Uc4y/0N819wbHVGla7nAcheIxcuTIbQeEOZPKkgXm3YV5uqfnKGkBuL4Ud9e7k5yejxf s3idj2v7rNyWDZyOh8jMU7aTcJTvfuJcRKpwRg2ay8TXI5e68y1tlq28HEy8npdm5Yb7 0aNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AskpWopd; 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 n20-20020a170902d0d400b0019ab692fc96si6040029pln.346.2023.04.08.06.34.10; Sat, 08 Apr 2023 06:34:22 -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=AskpWopd; 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 S230021AbjDHNYL (ORCPT + 99 others); Sat, 8 Apr 2023 09:24:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjDHNYJ (ORCPT ); Sat, 8 Apr 2023 09:24:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34E8A59C7 for ; Sat, 8 Apr 2023 06:24:09 -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 C3E1061073 for ; Sat, 8 Apr 2023 13:24:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03996C433D2; Sat, 8 Apr 2023 13:24:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680960248; bh=0pyF5BprYbz87qK2AZkPwODALXJFq6DUsJqadpHT440=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AskpWopdFqX6lsJDhlhGzTTV3en9jDxFxZlVrZTw47L5imksgqFHPvghcNWg5eNIy ihfkYOF6+pFlskm6eI5fITYV7m3FMC/IyTR9x6sLuzRZFvc3tLKA8DIBzDGUIAt+/I VTQgo4y3PyIGChS6MhWVqB5K2Stm/CNoLksc7hS0P+Sh+BGL+QeMKNGeqryE8hYut/ DXMTgKv9MoujdhNIbHIhyLLWDJMW4a6ZNpDpR2JjZ/KWx4ZnOD2EyYgxh9ehc0Qqos ZIBvBf1uaH2oH1+u2kcTRJ6fGjZN/1t5McjnFKz/4iB9BmdhudQaoSMZ30ryhMNyAk 9Hgyv0oaFdpCA== Received: by pali.im (Postfix) id 6E29D1C97; Sat, 8 Apr 2023 15:24:05 +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 2/8] powerpc/85xx: mpc85xx_ds: Simplify mpc85xx_exclude_device() function Date: Sat, 8 Apr 2023 15:21:45 +0200 Message-Id: <20230408132151.8902-3-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408132151.8902-1-pali@kernel.org> References: <20230408132151.8902-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?1762615216666030029?= X-GMAIL-MSGID: =?utf-8?q?1762615216666030029?= 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 Sat Apr 8 13:21:46 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: 81208 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp877386vqo; Sat, 8 Apr 2023 06:33:19 -0700 (PDT) X-Google-Smtp-Source: AKy350b1yYXDimXXz3OgAewKBb8JGZFB4shqo/6/ZxdeyvFnanH3tVlcD/xj2cmex833RTRJPEOv X-Received: by 2002:a62:5206:0:b0:626:444:bfa6 with SMTP id g6-20020a625206000000b006260444bfa6mr2306291pfb.26.1680960799400; Sat, 08 Apr 2023 06:33:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680960799; cv=none; d=google.com; s=arc-20160816; b=x6clCHtyOdAwWKoPW307GJ6tMyw+ffEVrpZpz01hZNXur8EA5RiSKThl5bdjC6wPyQ McpAKAr+31Hs6BGliczLEzOix/7rMJRrE9WQu2ugcGB0cqjLkw6mct4yygBJNNyI9GYg VY24Qm5Ms1Yu5T3XuJPq3QY0zvkjeI8D60Tt36+WeGed6Ne5eG0veALhRGVD2imLJFuB ITjLQiTLLgtTSBNUA+X5jG6ggkW5y2UJOod3Eky2CJwmf36vfpAZ3cw/V4FMcv3moUbQ AumQrQ8JBcwL6gBl59H2YeeerDgNwwhPG4mxT1a8GGhBRkEtD6JbTLM9CwvzyY87ldmv Gy3g== 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=ohFYv4A7pFiM5+K4gD1vS08hlj45cPBzst/4rDOyaTigDm+PkA60M0ZfxvGh5KJKbL XrwsOjZM55bEykk1g3UlKEiDAieSQJwapeF0tQkWDmTWP8qM+5qnYPemzvuHAqVy0M8V NQEvg3aEQOxms5iOQ6PTPZeTIckZXy6V5mzvUS3WLP3uGA+t+FfwPBouSFsdSlwPALq0 VG7rM6Ks7rylfqFvoZ4ksbTq0XVkBhTNELK5vLPS0zII+fKmq9tgc+LzwYUqzljJomtp QIgP9rvtlAkwPFAgYUN0qafUmktaxECQfCp3u8MEhgsE605PXqXeifDwZ4dBfUcPm8VJ jhyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MdxuSe+L; 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 a6-20020aa78e86000000b00625d00d1eb7si6148896pfr.96.2023.04.08.06.33.05; Sat, 08 Apr 2023 06:33:19 -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=MdxuSe+L; 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 S230135AbjDHNYS (ORCPT + 99 others); Sat, 8 Apr 2023 09:24:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229756AbjDHNYK (ORCPT ); Sat, 8 Apr 2023 09:24:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 603E6D524 for ; Sat, 8 Apr 2023 06:24:09 -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 D9B28614AE for ; Sat, 8 Apr 2023 13:24:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18E34C4339E; Sat, 8 Apr 2023 13:24:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680960248; bh=Ycr7jTbAN7a67s9Ksm6I4CQ7mN9wdogyCtOnF9CVtvY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MdxuSe+LGcMjPGW4s4MBfLc4ay1yMaMhj5hJnik1bVIBWEmhdEygdUtUCZSXAiCvg 28wiN5rrZnZMBaStGPphkC0IhmslAZCRqadt6BgA3d2D0ALiF4B9XahwbrpF0BEzmA Tm3ZbyltDJ+d/SzG9PxLUs8rvVW6McW+2Sz9/UL5KOH3E+dzRvbho4YL8xsLRcFafS 0dgTxKuhMYiwc1IYNo0W5lKb8QcKFIBQm9ygCVa2recOwMslclHih3N8EMP4Xhp9ak pVk+WHMhtwGEXdBt7yJwdop6iLEdEGR60s+X6mW3DC8stexV8rS32fQ498xLOjA8hf EkaNeF1d1gTSA== Received: by pali.im (Postfix) id 9734A2047; Sat, 8 Apr 2023 15:24:05 +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 3/8] powerpc/fsl_uli1575: Simplify uli_exclude_device() usage Date: Sat, 8 Apr 2023 15:21:46 +0200 Message-Id: <20230408132151.8902-4-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408132151.8902-1-pali@kernel.org> References: <20230408132151.8902-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?1762615151221008299?= X-GMAIL-MSGID: =?utf-8?q?1762615151221008299?= 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 Sat Apr 8 13:21:47 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: 81213 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp878129vqo; Sat, 8 Apr 2023 06:34:53 -0700 (PDT) X-Google-Smtp-Source: AKy350b/JuSD3TlyZddqgIMdWLGnB8d6ijJl/nJu8tJwYqoKBRkjJOXZtM2i7YepdcZ406qHzHVg X-Received: by 2002:a17:903:2309:b0:1a0:4fb2:6623 with SMTP id d9-20020a170903230900b001a04fb26623mr7555265plh.40.1680960893113; Sat, 08 Apr 2023 06:34:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680960893; cv=none; d=google.com; s=arc-20160816; b=IZUdypWliKVL9K5YJEzdq+43XvaFgkQpuoITjUqPOY9VIAUZjYKEC28Usy6ftX53hN nYryv5oj0wBIR7SrpTD6kYufYnq2XY10bFNFH+P3FR18nsI/9TiMP0aIwwHCyWJrfsEC Px99FXhl5NL0iu5jC9jFYoffhkhZBCFBnAOepcx3AxPUIhDYqjMjzvMwh+3bHu20TKVs weBUcD0yZOsUlFNHiLCOxDnCxaChxkZdckprOKtr+SO9EN0woqhgu9SfJdUDrZ7KpfHx pYWNZtnoUmHUbbZ0wL6jjErjboXn2E1tR6cro0HooIaweGUEKJuVQ2wxTUheNHqJBrl0 MgOQ== 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=20LJf91taDtd9H2d7dqhxXT03Z6Rr/Vt+r31i7tfC/4=; b=KMrPI2KRhyRDVd+v/X8FUT8ERQIFScBX3+oXtiJFEGy1JlA2vFm7xM4Zb9AKEpjxK3 evBf0eVrOd4VnM7czuQ85TrElcOv0Bi/TcKZUOvzuFFeAMRLgEyaMiabvxrSjbEpmFAz zlvaiD5nz8jCIOQJF5GwEKYzbfYOubTcvd8G9Mh8lt+nyPkqjVOIKpX3/dJg6hppx2uB wzJUYpShALlpMB1TGMqKbc8r/Ejr9LxTXBUq/44PYFuhf8x8eKRdTTJE2xYTnAVG41Z4 6w3FSd5ImqsOiMjAdDnMCPmBcMa2y4V3PNdQkAe2HJkuYNSN7Whi7yEoLsE8z5OgWad1 mgoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mWFxsP1D; 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 u26-20020a63471a000000b0050b026c3aa7si5682406pga.395.2023.04.08.06.34.39; Sat, 08 Apr 2023 06:34:53 -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=mWFxsP1D; 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 S230193AbjDHNYW (ORCPT + 99 others); Sat, 8 Apr 2023 09:24:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229871AbjDHNYK (ORCPT ); Sat, 8 Apr 2023 09:24:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F3DFD522 for ; Sat, 8 Apr 2023 06:24:09 -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 D121F6143F for ; Sat, 8 Apr 2023 13:24:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13DFAC433EF; Sat, 8 Apr 2023 13:24:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680960248; bh=1WbHL5XPSa9ax+U+sATxMzelVBmrYItxDu6hmpPPUSs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mWFxsP1DAQQLo1aGKNeUDiczEQhZpLsM5+Wjf6vO85sBsfHKU2KhZXu+fuYU4NzRv SQIpGg+Mr4XV1fmbyY9u/7+F5xpqZ2vShiws4w1F4y9uBkcXJSTSnW0rVw23r2zJRb 8QCp7DbV6cMvetO0aS9Mwz4sLC2P/g0+n6sAW88BQUxhbq9wa6H47DnFk25Mvoe6Vu DP0RfKzJw7JQtqFYHeP8S5JWbgWJpjzrDUDXyG6pnM88DzqgAYZp3LY9MFpK5Luflw tPxMDMcylR/WNi+By+suMCnJxkvVRk5nHIPij3rBPV8BVG8ijb4Zxp2ovzTCs+nuT2 Ddxu9+LZQ/ZdA== Received: by pali.im (Postfix) id C271D209C; Sat, 8 Apr 2023 15:24:05 +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 4/8] powerpc/85xx: mpc85xx_ds: Move uli_init() code into its own driver file Date: Sat, 8 Apr 2023 15:21:47 +0200 Message-Id: <20230408132151.8902-5-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408132151.8902-1-pali@kernel.org> References: <20230408132151.8902-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?1762615249312278389?= X-GMAIL-MSGID: =?utf-8?q?1762615249312278389?= 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 56ba9ec68fcd..00a3011d6e98 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) @@ -69,6 +70,7 @@ static inline void init_pci_config_tokens(void) { } #if !defined(CONFIG_PCI) || !defined(CONFIG_FSL_ULI1575) 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 Sat Apr 8 13:21:48 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: 81210 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp877889vqo; Sat, 8 Apr 2023 06:34:22 -0700 (PDT) X-Google-Smtp-Source: AKy350YULqph1ERbt8z62h64SkIUUS49C/BI0c0V7RpEvzC/Qy+uIcBEBHC60yHKg6iHpCMnwH0v X-Received: by 2002:a17:903:247:b0:1a1:c83c:ba5c with SMTP id j7-20020a170903024700b001a1c83cba5cmr2404441plh.13.1680960862526; Sat, 08 Apr 2023 06:34:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680960862; cv=none; d=google.com; s=arc-20160816; b=iEDtNjkK9jPvdVd+e9GMXpBPA8IrRF8E61b/NsPgGR7oOiSfLmTBeJgCY2WJghz8IO ARJrwo6sYvVu5qbZNAtq0EL/R+SjCNpS3KD5mE7EHqqi+CMV+QYVztav8ApZns6yUPpr Syrodalqd2yNU6LQ12VReQBodwf2v1rrYfeM5lwSjSZZFqCsU+acGODKsxmoe+WiWlcw e8fejB1dM6qdXAoWzGl+WsAWdgo8QaHHCBtjv8zE/vHkcvuM2bR0XytQZGV5RmxWn/s8 cUBZn+mkToBVymOPdUTPMPR0P5VWzikTc3WBef/5qKZkE5rzePRLf6MBRmv7bMFb7nj1 bJfQ== 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=GBeHaZGr1shjxkMeYhUhkVSvBh5ysqEdZB3YRaMyuZNp+dsqm2Btrq5NYR/zuZL5eK bczBgp+aVVtXB7s/jkUFLaK+eckupjhiJKKcG7XrirUDn5/yy2RcQZ49sxgSONtQ/DYJ aoCehUF5Rkxuqw/cE6lWDodcNyi3HtSX2N6G8vAFiHHDxqBQOgX55yMyog9j5fuKeApx 5P4SNQcwbypj4mfX0yqQ9l5odVZWNaOubVRKccm5NRs43Gma5gVmjnrPiBvro6Pw6gIX 0Ia9apm457PhWnMJDVngfZdfMXz6JgNK1QbRV2RN3WlMdlmg5cUxyqL2jYeVCpLy1457 QAAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ovdA74Zm; 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 kr16-20020a170903081000b001a1ba07911bsi6127161plb.530.2023.04.08.06.34.10; Sat, 08 Apr 2023 06:34:22 -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=ovdA74Zm; 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 S230189AbjDHNY1 (ORCPT + 99 others); Sat, 8 Apr 2023 09:24:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229953AbjDHNYK (ORCPT ); Sat, 8 Apr 2023 09:24:10 -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 4C321D532 for ; Sat, 8 Apr 2023 06:24:10 -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 601C2614BF for ; Sat, 8 Apr 2023 13:24:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9066FC433A0; Sat, 8 Apr 2023 13:24:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680960248; bh=1B1bdtjGi0qphccKaW9xvXzqnYHpNRSwmcqFmuJLGRY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ovdA74ZmhTEzQHM1M24Vjg5ZfQdf6MhINoVwXgCNOzI+f6Y24yYNafplYhnMEN2AU 2BocP5u05IeYQc27SIuh84Qz5nY0Z06/kgX0/OCqkIhOvy8lhOXmb+URVTO3Yf1S6I VK+I6E/f0CZeUgqQRzbp8rsLP7HYcTrtDWKbKKK+S+i6D6hadTUNmSlShrGwZA/+9H Xbl+SHmzOwgecuHkHe2ejkKUy8XAh0+VDqUitOR+j8du31pqnGBHzOE2MxeTjZegET NJJVNNNR9gRdwQxXnkK2wjLIOoj0qRxEoyhj7sIbA2wau+vP3QVHUdTUDOvbznJcfM O06DLaM1oFyBw== Received: by pali.im (Postfix) id 0DE2D20A8; Sat, 8 Apr 2023 15:24:06 +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 5/8] powerpc/mpc85xx: mpc85xx_rdb: Do not automatically select FSL_ULI1575 Date: Sat, 8 Apr 2023 15:21:48 +0200 Message-Id: <20230408132151.8902-6-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408132151.8902-1-pali@kernel.org> References: <20230408132151.8902-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?1762615217293614406?= X-GMAIL-MSGID: =?utf-8?q?1762615217293614406?= 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 Sat Apr 8 13:21:49 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: 81215 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp878843vqo; Sat, 8 Apr 2023 06:36:22 -0700 (PDT) X-Google-Smtp-Source: AKy350YnFQA9zwx1HaOc8ndKOvXon5ehYRWVFuMSFgbQvBhmeuZywMpH7j/4C+xf81bg4vkozVHa X-Received: by 2002:a17:903:1cc:b0:19a:7f4b:3ef6 with SMTP id e12-20020a17090301cc00b0019a7f4b3ef6mr8288404plh.3.1680960982483; Sat, 08 Apr 2023 06:36:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680960982; cv=none; d=google.com; s=arc-20160816; b=zeZC8IEWk6RAByNYxkDCeTPxjHyPwySp539DyIiyNgPepplCfZ8qlUrp4oscu1RJyV IeIydVvnTPfUUrY8quRckMYtdyjd3xKeSjQAgYruKiuT4ZURQuqWu2KOvus7AAvM4w6+ MiZCmebDR9iZIuE4/yXjUiW+S/H/0ANZLkspRgRNPntAGbIDJu10agXaRyyPqPnqXBYz aV069ySFeLbQhj8EQ3nQQjYT45O+j0GjttxtD7V5lVPpbh69vmzfdrRgWdlgLrA/Vqgf PXSn40ejf6PEguBUFVav1hnujTD7JZulsDpw5p95NKRG1Qd3GXyQfQT8nT04gyhYUgVo EyXA== 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=r7q/van2Jh2Bpc/TQzaKNO+gC25Ihrz1gr0zf1aDIqQ=; b=nAIlAnyhhAvBrFwDHrFhQwStLGhk0OLE4NZv2ucCRlenBDoMNDzFiTooYRHVjFsNZy rMLG3E//FrSqTDXSkoUxHHHEonzFaqPmxbhuXpn6EoOJU/hPJgE3WoZl/lvqILT3iPEH LA24942F536kptlJ4wfen3POJ6V3Gt32xdSfQpywPbQ5MHImykCknoIshSY+gm1Xzhmx IxPagO9Ihfgq5150ysr2P/vtj1hsTleQKVDsuJ61EtzxeKr9+hOuZmnO1gYFO69agBh5 TObn5Q2flCJjd2yjdiGrpZrQhh4yfhqIp6UDipTOmLNoCiu4u/rt3USVZdETlydQ1NP2 glnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Qir4ccYw; 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 kr16-20020a170903081000b001a1ba07911bsi6127161plb.530.2023.04.08.06.36.09; Sat, 08 Apr 2023 06:36:22 -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=Qir4ccYw; 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 S230126AbjDHNYY (ORCPT + 99 others); Sat, 8 Apr 2023 09:24:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229960AbjDHNYL (ORCPT ); Sat, 8 Apr 2023 09:24:11 -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 4D071D53C for ; Sat, 8 Apr 2023 06:24:10 -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 5FC95614BE for ; Sat, 8 Apr 2023 13:24:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94A48C433A1; Sat, 8 Apr 2023 13:24:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680960248; bh=zh3lTgBmnypZA5+Nw411DMxgOKCSc/q0VjQ8IrqzJ2s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qir4ccYwjx5pT4lgUGrpeYXWCsLQ0NUmCK3/ppsTQEuSStZwPzdxJSbfxS5nIf22G eQy30zudpEHB+aP9VRsq9pySKx5EjCj7Codh/Tx5aBhJ9bLeeL4Up4zAVuWPKZ6HAP pq+3xQefgFkOnbBQ0mMh+giXrmZtpMaADqt8241TrZGwEe5nZpOthnQ8eLXUc01p5U iqiDfiakaTmP3dRPnMd0yNlC0/bxDaHfqGkEFWLkbRHy9Ak0tKR6zD/a7f410BeSI+ d+CYpKx2vSOe6NgLMWg5r9yc6trXmnUSfjxIrPrtpHuvgCr67sNs2t2Wl5iy6qt2lT AYLumcsVYdR7A== Received: by pali.im (Postfix) id 4240F20C8; Sat, 8 Apr 2023 15:24:06 +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 6/8] powerpc/fsl_uli1575: Allow to disable FSL_ULI1575 support Date: Sat, 8 Apr 2023 15:21:49 +0200 Message-Id: <20230408132151.8902-7-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408132151.8902-1-pali@kernel.org> References: <20230408132151.8902-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?1762615342923545918?= X-GMAIL-MSGID: =?utf-8?q?1762615342923545918?= 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. Signed-off-by: Pali Rohár --- arch/powerpc/platforms/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index d41dad227de8..d4b43dade51e 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig @@ -261,7 +261,7 @@ config CPM2 on it (826x, 827x, 8560). config FSL_ULI1575 - bool + bool "ULI1575 PCIe south bridge support" select GENERIC_ISA_DMA help Supports for the ULI1575 PCIe south bridge that exists on some From patchwork Sat Apr 8 13:21:50 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: 81212 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp878101vqo; Sat, 8 Apr 2023 06:34:51 -0700 (PDT) X-Google-Smtp-Source: AKy350Y0YezyINjsjinbau3goxKLQsbq91b4INl2psq86bQfiOQ+09kGXu2IgexlCERB7D1fTJfs X-Received: by 2002:a05:6a20:3aa1:b0:de:ad43:3966 with SMTP id d33-20020a056a203aa100b000dead433966mr5848142pzh.4.1680960891097; Sat, 08 Apr 2023 06:34:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680960891; cv=none; d=google.com; s=arc-20160816; b=soq1QVefSYpW0GGBVzHEjfy1e+Eb4QBw9LUJORtwLy9wKSRJIGatDLXam/iU83Ho4X 8qodnTS5CXYp/zOb2cyoEhFskQEnXeMb9BbjGe3B5yEq2nQZzwL1XZV9aaWojdtXW+pV 2GE4DZ6u6wY04k6o+5oW/AKmk2wc2/M+AcZaYKcr1GcTuWUMoTZWAFC+QPoGUCeu443L XsKNkcJ7vWLNYIkc77yiQkD68LMqVMGqEsytC+aKf/ykwJHo12TUW06swm6LtnSizlUC YhsU8HjX1IsAg10SQHkTAC/VETf7HTWqG8bW376ZAfDBJCNRuUB2uq0b1rVdaxpzn/aK E+gw== 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=SVIookjik1cILhCZ6a5nw/lNF/BqpP4Pf0geKf9beRlf1Px5DKYyms2HGfklDFDx9f CAHiEk0TmL75VHsoA+KpKn0vyOirhxJxTVkJWts6JkImnsyXuQAmOEfzBJLIRS5lTV6/ auKdScPvKqoQjluOmeagcnP3kGbCkvdudzA4kO1JrlbkcZjpfXmjX4J6cFGKGAevtcvZ wjuD+pJClVak4LhbVfHgr5AKwC0Hi/wOku/4tXR/2VvnPhJAt0UQjmAvWpGA2O/Jb0G3 u3eWvnCX8BAR9UirK8wPAkiqBQZsc4w/Dbew6kfaz/O3xLe9ZpnuUJqup2FqJ9do7jTQ k8Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B5DDK8GI; 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 g16-20020aa796b0000000b006256e67028dsi6175102pfk.122.2023.04.08.06.34.38; Sat, 08 Apr 2023 06:34:51 -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=B5DDK8GI; 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 S230160AbjDHNYe (ORCPT + 99 others); Sat, 8 Apr 2023 09:24:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230041AbjDHNYM (ORCPT ); Sat, 8 Apr 2023 09:24:12 -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 DA132D520 for ; Sat, 8 Apr 2023 06:24:11 -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 774036143F for ; Sat, 8 Apr 2023 13:24:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA873C433D2; Sat, 8 Apr 2023 13:24:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680960250; bh=ps76pyu3TDlG2IApvb70QcdiPajYqBKpLTa4tWI5Ohs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B5DDK8GI+rwvjJPfZEVp80zJfVVp8JpL4yQrVaExPzOfnPcYpewHbcb5OA0jfC1rR FHldYjZtQ3UtLbQmXxZYby67EG6pS3EDZw4FZwfF5wdVDOq+CCE1sYgVfmtd9ay2v5 zVWKDlIBpuKD1K3Twseu/S0T8Ou5vkSc0od8dPDrr827ViP++aIiHuocJImOSlfdWr uS7nRFH5WeDt3n83/E0Z/APHg5ni6LV8Un316/6feLD/cHnLGcqps/Q2vp5iEDnwjR qamRvrC64lD4ebM4jH81mls0fVgHqsp08bLb0QrpJvGCvgYe5X+OSYbrOacGvxpc1n SNxbneZmpBL9w== Received: by pali.im (Postfix) id 6F567213C; Sat, 8 Apr 2023 15:24:06 +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 7/8] powerpc/mpc86xx: mpc86xx_hpcn: Call uli_init() instead of explicit ppc_md assignment Date: Sat, 8 Apr 2023 15:21:50 +0200 Message-Id: <20230408132151.8902-8-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408132151.8902-1-pali@kernel.org> References: <20230408132151.8902-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?1762615247159871733?= X-GMAIL-MSGID: =?utf-8?q?1762615247159871733?= 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 Sat Apr 8 13:21:51 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: 81211 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp877900vqo; Sat, 8 Apr 2023 06:34:24 -0700 (PDT) X-Google-Smtp-Source: AKy350YH2D4qsEGdfBHmrk74jHEETgkm1vDZ2QJNqQeMeor2jkc3bTanoIgj3Nu57TgGv5H5E6za X-Received: by 2002:a17:90b:33cd:b0:246:5a79:a0e9 with SMTP id lk13-20020a17090b33cd00b002465a79a0e9mr5798487pjb.30.1680960864151; Sat, 08 Apr 2023 06:34:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680960864; cv=none; d=google.com; s=arc-20160816; b=W796LrxRMKwECSKA9WGyWo/vrFIByJKCnU+eDVsEUjgzI2A2SMKmtjV8C1QAxJBfuU KjSRdE1hZtM2c6kkyJRi1zyn5dLI0f6ADTuoCjnvHyn2eBSVivbwUFZ0Kc0Y8U2V+0KN YlA/Rz/ccvZsGr8CeFKMPSVCbxwZb9aMsdFescURTlIaHhEbMdboY943ZW61S/HaUVQI kCme7pOJ+bfdwAq3Ve1I80SQjiNgDFjK78bR7dt6bfGglzREC6tIStVnkLCNP2VEY8xO lhDLItmXOIuiILXeJCD/fiXsZ1U66JF/wGk96CQf0/2mKhAbQxC4Q+Vib9YXKFArOsGO +rzQ== 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=xHuueKQOv5/sefIXMP/YqETzndRf4ojCvSO8sR3vL5M=; b=uo+t7ZD4aTKKm8lnQwRc0xuysgafS2bpwRLr/FBFQq1Ymu6L/EXuXkyRSPYTtQp8Pq nUm0d/MX0kheNTpDz9O4FKAki15PyhmWs/vOIATf/0WOaJ3b0ozXLLYZj9OipR21+1s8 2bDOCMe+BDONupAvBTuIiBK5Z2C57938Xh5rPu06nXanU/xX6FjI7epsVpidjOFqtAOA 8QEQmjI74I7Ox9+50ndbIWwS+sFfNqtLIl8khuhOCRB6am2MogYffZJ5AIXwtHis9voo x2RUebmBeQvfpQVrsi7bms9s3FEryYwonekeKICIeojhpDe4nSHRxtCXN99+l2+Y/DCQ Nxkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qK1iS4Gt; 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 n19-20020a17090b0d1300b00240f454a59asi5836054pjz.139.2023.04.08.06.34.11; Sat, 08 Apr 2023 06:34:24 -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=qK1iS4Gt; 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 S230236AbjDHNYa (ORCPT + 99 others); Sat, 8 Apr 2023 09:24:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230009AbjDHNYL (ORCPT ); Sat, 8 Apr 2023 09:24:11 -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 551AF59C7 for ; Sat, 8 Apr 2023 06:24:10 -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 642A7614C4 for ; Sat, 8 Apr 2023 13:24:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F72BC433A4; Sat, 8 Apr 2023 13:24:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680960248; bh=srC5FNdHp8IZu3BmeF2lk+iRAsCZCPftWJJge9NlI14=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qK1iS4Gt2hk19S3uZQit4fs4EX3pmmERzut14YJTdZSYCu72VPkj+vHpj3nVX07rK o86+N2d9j42WUcZlAuylY5vC8AAFVgGzVfKM30IaoVjNJ96w03FbXM+ba44gXA0PCZ k1x1JoSqjD4cvVh37RZpZ51jHPVCve7bbNzimeHV03LxQPGxYnvhI+AawaH96W3Y9s hlVIVprAcqF11pJ0wCUdqv2FnJhOmFQPihBaV5ltGEeVU67y1DzFMLpC/Wxez6rv0t IvebZbSc0XSiSVOioweJC5byI8U5dUh3R0U5h/Ly7aL7PFjMnnsRadhJr/PTZeiyET /IRudWGSbJ/HQ== Received: by pali.im (Postfix) id A20162317; Sat, 8 Apr 2023 15:24:06 +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 8/8] powerpc/fsl_uli1575: Mark uli_exclude_device() as static Date: Sat, 8 Apr 2023 15:21:51 +0200 Message-Id: <20230408132151.8902-9-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408132151.8902-1-pali@kernel.org> References: <20230408132151.8902-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?1762615218849329482?= X-GMAIL-MSGID: =?utf-8?q?1762615218849329482?= 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 | 2 -- arch/powerpc/platforms/fsl_uli1575.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/ppc-pci.h b/arch/powerpc/include/asm/ppc-pci.h index 00a3011d6e98..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,7 +68,6 @@ static inline void init_pci_config_tokens(void) { } #endif /* !CONFIG_PCI */ #if !defined(CONFIG_PCI) || !defined(CONFIG_FSL_ULI1575) -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 */