From nobody Wed Sep 10 21:46:42 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C148C636D6 for ; Wed, 22 Feb 2023 14:44:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231819AbjBVOoW (ORCPT ); Wed, 22 Feb 2023 09:44:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232045AbjBVOoO (ORCPT ); Wed, 22 Feb 2023 09:44:14 -0500 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05D073BD9A for ; Wed, 22 Feb 2023 06:43:58 -0800 (PST) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4PMJn12ZFvz9sTQ; Wed, 22 Feb 2023 15:43:33 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3DgWs34JgsOx; Wed, 22 Feb 2023 15:43:33 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4PMJmw6p2hz9sTK; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id D7A3C8B794; Wed, 22 Feb 2023 15:43:28 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 7003Of7F5LMG; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 7FCE48B781; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 31MEhKhK1187089 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 22 Feb 2023 15:43:20 +0100 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 31MEhKoB1187087; Wed, 22 Feb 2023 15:43:20 +0100 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Michael Ellerman , Nicholas Piggin Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v4 01/17] powerpc/fsl_uli1575: Misc cleanup Date: Wed, 22 Feb 2023 15:42:48 +0100 Message-Id: <70972191244129f5cea0b3eb69e59ad5059e95f9.1677076552.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1677076979; l=2790; s=20211009; h=from:subject:message-id; bh=Iw2tMxl05JMdpPVBeFUeUnlADwfpURzME+4librsKOA=; b=EhSz/Ck62OYqTJaShHsBbTjlBY88F1HKt7DyMb9FshvBatW1AkA1CmPYhBVAetMbjfzyM9YWuf1i x9CDTKjQAlL40D9uM1grUel/qXFj+KLPijVakenjjPt+Hc8fATmS X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Use a single line for uli_exclude_device() Add uli_exclude_device() prototype in ppc-pci.h Remove that prototype from mpc85xx_ds.c Make uli_pirq_to_irq[] static as it is used only in that file. Signed-off-by: Christophe Leroy Reviewed-by: Pali Roh=C3=A1r --- arch/powerpc/include/asm/ppc-pci.h | 2 ++ arch/powerpc/platforms/85xx/mpc85xx_ds.c | 4 +--- arch/powerpc/platforms/fsl_uli1575.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/include/asm/ppc-pci.h b/arch/powerpc/include/asm/= ppc-pci.h index f6cf0159024e..1e9a7f8b05c9 100644 --- a/arch/powerpc/include/asm/ppc-pci.h +++ b/arch/powerpc/include/asm/ppc-pci.h @@ -57,6 +57,8 @@ void eeh_sysfs_remove_device(struct pci_dev *pdev); =20 #endif /* CONFIG_EEH */ =20 +int uli_exclude_device(struct pci_controller *hose, u_char bus, u_char dev= fn); + #define PCI_BUSNO(bdfn) ((bdfn >> 8) & 0xff) =20 #else /* CONFIG_PCI */ diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platfo= rms/85xx/mpc85xx_ds.c index f8d2c97f39bd..97e441878409 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -26,6 +26,7 @@ #include #include #include +#include =20 #include #include @@ -107,9 +108,6 @@ void __init mpc85xx_ds_pic_init(void) } =20 #ifdef CONFIG_PCI -extern int uli_exclude_device(struct pci_controller *hose, - u_char bus, u_char devfn); - static struct device_node *pci_with_uli; =20 static int mpc85xx_exclude_device(struct pci_controller *hose, diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/= fsl_uli1575.c index 84afae7a2561..a32f9cef7845 100644 --- a/arch/powerpc/platforms/fsl_uli1575.c +++ b/arch/powerpc/platforms/fsl_uli1575.c @@ -13,6 +13,7 @@ #include =20 #include +#include =20 #define ULI_PIRQA 0x08 #define ULI_PIRQB 0x09 @@ -36,7 +37,7 @@ #define ULI_8259_IRQ14 0x0d #define ULI_8259_IRQ15 0x0f =20 -u8 uli_pirq_to_irq[8] =3D { +static u8 uli_pirq_to_irq[8] =3D { ULI_8259_IRQ9, /* PIRQA */ ULI_8259_IRQ10, /* PIRQB */ ULI_8259_IRQ11, /* PIRQC */ @@ -341,8 +342,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, hpcd= _quirk_uli5288); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, hpcd_quirk_uli5229); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x5288, hpcd_final_uli5288); =20 -int uli_exclude_device(struct pci_controller *hose, - u_char bus, u_char devfn) +int uli_exclude_device(struct pci_controller *hose, u_char bus, u_char dev= fn) { if (bus =3D=3D (hose->first_busno + 2)) { /* exclude Modem controller */ --=20 2.39.1 From nobody Wed Sep 10 21:46:42 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CD8BC636D6 for ; Wed, 22 Feb 2023 14:48:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231932AbjBVOs2 (ORCPT ); Wed, 22 Feb 2023 09:48:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232256AbjBVOr6 (ORCPT ); Wed, 22 Feb 2023 09:47:58 -0500 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A75A6196B7 for ; Wed, 22 Feb 2023 06:47:36 -0800 (PST) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4PMJn70hHHz9sTT; Wed, 22 Feb 2023 15:43:39 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OqrajB7KGRNg; Wed, 22 Feb 2023 15:43:39 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4PMJmx0nxqz9sTd; Wed, 22 Feb 2023 15:43:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 0383C8B763; Wed, 22 Feb 2023 15:43:29 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id MijR4bgs45tD; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 6EC478B77A; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 31MEhLu11187093 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 22 Feb 2023 15:43:21 +0100 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 31MEhLSZ1187092; Wed, 22 Feb 2023 15:43:21 +0100 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Michael Ellerman , Nicholas Piggin Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v4 02/17] powerpc/85xx: Rename setup_arch and pic_init on p1023 Date: Wed, 22 Feb 2023 15:42:49 +0100 Message-Id: <9ac65418c7b9d053d7731f21b78b4c1f2602f84b.1677076552.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1677076979; l=1478; s=20211009; h=from:subject:message-id; bh=PEFiM3HoBKg5bK+qEWGSBwFGxLl0Jc468AqAiHS5FQw=; b=cp9qkTuZy9/rJHXfuIzcp4bN+atNigDt+/n8aeJMwKqsiuBu9WdaYDSYnu2eBDVF8aC8Mf8dDGCj 2nymKHk7AY9x7N9fthhTiylZnozpbe1oWHkActNs8vjU005IzJ8p X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Avoid conflict with other functions, rename mpc85xx_rdb_setup_arch() to p1023_rdb_setup_arch(), same for mpc85xx_rdb_pic_init(). Signed-off-by: Christophe Leroy Reviewed-by: Pali Roh=C3=A1r --- arch/powerpc/platforms/85xx/p1023_rdb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/85xx/p1023_rdb.c b/arch/powerpc/platfor= ms/85xx/p1023_rdb.c index c04868eb2eb1..5d434ee96445 100644 --- a/arch/powerpc/platforms/85xx/p1023_rdb.c +++ b/arch/powerpc/platforms/85xx/p1023_rdb.c @@ -37,7 +37,7 @@ * Setup the architecture * */ -static void __init mpc85xx_rdb_setup_arch(void) +static void __init p1023_rdb_setup_arch(void) { struct device_node *np; =20 @@ -83,7 +83,7 @@ static void __init mpc85xx_rdb_setup_arch(void) =20 machine_arch_initcall(p1023_rdb, mpc85xx_common_publish_devices); =20 -static void __init mpc85xx_rdb_pic_init(void) +static void __init p1023_rdb_pic_init(void) { struct mpic *mpic =3D mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU, @@ -103,8 +103,8 @@ static int __init p1023_rdb_probe(void) define_machine(p1023_rdb) { .name =3D "P1023 RDB", .probe =3D p1023_rdb_probe, - .setup_arch =3D mpc85xx_rdb_setup_arch, - .init_IRQ =3D mpc85xx_rdb_pic_init, + .setup_arch =3D p1023_rdb_setup_arch, + .init_IRQ =3D p1023_rdb_pic_init, .get_irq =3D mpic_get_irq, .calibrate_decr =3D generic_calibrate_decr, .progress =3D udbg_progress, --=20 2.39.1 From nobody Wed Sep 10 21:46:42 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E168C64EC4 for ; Wed, 22 Feb 2023 14:47:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232169AbjBVOrj (ORCPT ); Wed, 22 Feb 2023 09:47:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229673AbjBVOr0 (ORCPT ); Wed, 22 Feb 2023 09:47:26 -0500 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 044EF3BDB1 for ; Wed, 22 Feb 2023 06:47:03 -0800 (PST) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4PMJn63DK0z9sTS; Wed, 22 Feb 2023 15:43:38 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GgEoJvMKMvNx; Wed, 22 Feb 2023 15:43:38 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4PMJmx0HNQz9sTT; Wed, 22 Feb 2023 15:43:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id EF54A8B78B; Wed, 22 Feb 2023 15:43:28 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 7gU1ryt_adiZ; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 72D3A8B77C; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 31MEhLR01187097 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 22 Feb 2023 15:43:21 +0100 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 31MEhLq31187096; Wed, 22 Feb 2023 15:43:21 +0100 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Michael Ellerman , Nicholas Piggin Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v4 03/17] powerpc/85xx: Remove DBG() macro Date: Wed, 22 Feb 2023 15:42:50 +0100 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1677076979; l=2230; s=20211009; h=from:subject:message-id; bh=JQMiZsJWtIzgWpVR+1xtyCDHJ1u/OyiOb9PSbwg90po=; b=de5eF2pLOMrGxPJbaeOeGycjkJ89jaAM1cm6u7P3VIZYGgvUxU4GOyNhjmayejHzCvjg4rT98uA4 9P+Q/mltDozuHQvh7Re9soQyl3eMQcU0CNszjZY93ndWTpg8zGXe X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" DBG() macro is defined at three places while used only one time at one place. Replace its only use by a pr_debug() and remove the macro. Signed-off-by: Christophe Leroy Reviewed-by: Pali Roh=C3=A1r --- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 10 +--------- arch/powerpc/platforms/85xx/mpc85xx_mds.c | 7 ------- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 9 --------- 3 files changed, 1 insertion(+), 25 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platfo= rms/85xx/mpc85xx_ds.c index 97e441878409..26257509aabf 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -34,14 +34,6 @@ =20 #include "mpc85xx.h" =20 -#undef DEBUG - -#ifdef DEBUG -#define DBG(fmt, args...) printk(KERN_ERR "%s: " fmt, __func__, ## args) -#else -#define DBG(fmt, args...) -#endif - #ifdef CONFIG_PPC_I8259 static void mpc85xx_8259_cascade(struct irq_desc *desc) { @@ -98,7 +90,7 @@ void __init mpc85xx_ds_pic_init(void) return; } =20 - DBG("mpc85xxds: cascade mapped to irq %d\n", cascade_irq); + pr_debug("mpc85xxds: cascade mapped to irq %d\n", cascade_irq); =20 i8259_init(cascade_node, 0); of_node_put(cascade_node); diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platf= orms/85xx/mpc85xx_mds.c index 3a2ac410af18..540ce17f0577 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c @@ -49,13 +49,6 @@ =20 #include "mpc85xx.h" =20 -#undef DEBUG -#ifdef DEBUG -#define DBG(fmt...) udbg_printf(fmt) -#else -#define DBG(fmt...) -#endif - #if IS_BUILTIN(CONFIG_PHYLIB) =20 #define MV88E1111_SCR 0x10 diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platf= orms/85xx/mpc85xx_rdb.c index d99aba158235..b5e9a6374edb 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c @@ -29,15 +29,6 @@ =20 #include "mpc85xx.h" =20 -#undef DEBUG - -#ifdef DEBUG -#define DBG(fmt, args...) printk(KERN_ERR "%s: " fmt, __func__, ## args) -#else -#define DBG(fmt, args...) -#endif - - void __init mpc85xx_rdb_pic_init(void) { struct mpic *mpic; --=20 2.39.1 From nobody Wed Sep 10 21:46:42 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E16CDC636D6 for ; Wed, 22 Feb 2023 14:43:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232031AbjBVOn4 (ORCPT ); Wed, 22 Feb 2023 09:43:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232045AbjBVOnr (ORCPT ); Wed, 22 Feb 2023 09:43:47 -0500 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 851BF3A091 for ; Wed, 22 Feb 2023 06:43:42 -0800 (PST) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4PMJmz28wLz9sTL; Wed, 22 Feb 2023 15:43:31 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sDcWV7853Llc; Wed, 22 Feb 2023 15:43:31 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4PMJmw72vbz9sTR; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id E2EF38B781; Wed, 22 Feb 2023 15:43:28 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id XBs0U_H5tzDi; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 929FF8B78B; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 31MEhLeT1187101 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 22 Feb 2023 15:43:21 +0100 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 31MEhLeX1187100; Wed, 22 Feb 2023 15:43:21 +0100 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Michael Ellerman , Nicholas Piggin Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v4 04/17] powerpc/85xx: Remove #ifdefs CONFIG_PCI in mpc85xx_ds Date: Wed, 22 Feb 2023 15:42:51 +0100 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1677076979; l=1249; s=20211009; h=from:subject:message-id; bh=JCayyRoure02691uo1aI3JU4oKI7/DRa3WvvOlic8tE=; b=a+Z0wj7IUdMg0vSAIlWoXp4iCqBx/Hk+1rPswmjNvlZjQ2THYMWD3CNY2cFW5aC0atypHdC22w2r 4hPWi14wALH5IN54/B6u6t8s3QwW5SqKfhZXBvAYQD9zozJ55API X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" All necessary items are declared all the time, no need to use a #ifdef CONFIG_PCI. Signed-off-by: Christophe Leroy Reviewed-by: Pali Roh=C3=A1r --- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platfo= rms/85xx/mpc85xx_ds.c index 26257509aabf..f385cd288a76 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -99,7 +99,6 @@ void __init mpc85xx_ds_pic_init(void) #endif /* CONFIG_PPC_I8259 */ } =20 -#ifdef CONFIG_PCI static struct device_node *pci_with_uli; =20 static int mpc85xx_exclude_device(struct pci_controller *hose, @@ -110,13 +109,14 @@ static int mpc85xx_exclude_device(struct pci_controll= er *hose, =20 return PCIBIOS_SUCCESSFUL; } -#endif /* CONFIG_PCI */ =20 static void __init mpc85xx_ds_uli_init(void) { -#ifdef CONFIG_PCI struct device_node *node; =20 + if (!IS_ENABLED(CONFIG_PCI)) + return; + /* See if we have a ULI under the primary */ =20 node =3D of_find_node_by_name(NULL, "uli1575"); @@ -129,7 +129,6 @@ static void __init mpc85xx_ds_uli_init(void) break; } } -#endif } =20 /* --=20 2.39.1 From nobody Wed Sep 10 21:46:42 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD591C64EC7 for ; Wed, 22 Feb 2023 15:20:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232396AbjBVPUQ (ORCPT ); Wed, 22 Feb 2023 10:20:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232050AbjBVPUM (ORCPT ); Wed, 22 Feb 2023 10:20:12 -0500 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 898882D161 for ; Wed, 22 Feb 2023 07:20:11 -0800 (PST) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4PMJnB12Kbz9sTg; Wed, 22 Feb 2023 15:43:42 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aWaEFULo5Z-Q; Wed, 22 Feb 2023 15:43:42 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4PMJmx17JYz9sTh; Wed, 22 Feb 2023 15:43:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 05DD98B77B; Wed, 22 Feb 2023 15:43:29 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 9RNyldFIo-oW; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id A20AF8B790; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 31MEhLjX1187105 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 22 Feb 2023 15:43:21 +0100 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 31MEhLDg1187104; Wed, 22 Feb 2023 15:43:21 +0100 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Michael Ellerman , Nicholas Piggin Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v4 05/17] powerpc/85xx: mpc85xx_{ds/rdb} compact the call to mpic_alloc() Date: Wed, 22 Feb 2023 15:42:52 +0100 Message-Id: <140762117c761ae01a2af5fadb188f4954c45e04.1677076552.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1677076979; l=2290; s=20211009; h=from:subject:message-id; bh=Hjk5ZcAbV8BioWqMJJGLsAg35wIlaIiZSdBaLte+aDY=; b=ZtR8PoqCDWhPaZZIzz1IX7PDiKlg2VCbwqdEos7OC7xErsM9XNpzPsv2XHVG9G7VucD+39fiiIlz jUFNgNZrDyXDiMvdtf4CfPoOII3MGvq5RKrtQS64gGLGcA2MTMes X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Reduce number of lines in the call to mpic_alloc(). Signed-off-by: Christophe Leroy Reviewed-by: Pali Roh=C3=A1r --- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 18 ++++++------------ arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 16 +++++----------- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platfo= rms/85xx/mpc85xx_ds.c index f385cd288a76..1e6e89136948 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -50,23 +50,17 @@ static void mpc85xx_8259_cascade(struct irq_desc *desc) void __init mpc85xx_ds_pic_init(void) { struct mpic *mpic; + int flags =3D MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU; #ifdef CONFIG_PPC_I8259 struct device_node *np; struct device_node *cascade_node =3D NULL; int cascade_irq; #endif - if (of_machine_is_compatible("fsl,MPC8572DS-CAMP")) { - mpic =3D mpic_alloc(NULL, 0, - MPIC_NO_RESET | - MPIC_BIG_ENDIAN | - MPIC_SINGLE_DEST_CPU, - 0, 256, " OpenPIC "); - } else { - mpic =3D mpic_alloc(NULL, 0, - MPIC_BIG_ENDIAN | - MPIC_SINGLE_DEST_CPU, - 0, 256, " OpenPIC "); - } + + if (of_machine_is_compatible("fsl,MPC8572DS-CAMP")) + flags |=3D MPIC_NO_RESET; + + mpic =3D mpic_alloc(NULL, 0, flags, 0, 256, " OpenPIC "); =20 BUG_ON(mpic =3D=3D NULL); mpic_init(mpic); diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platf= orms/85xx/mpc85xx_rdb.c index b5e9a6374edb..110365d7b997 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c @@ -32,18 +32,12 @@ void __init mpc85xx_rdb_pic_init(void) { struct mpic *mpic; + int flags =3D MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU; =20 - if (of_machine_is_compatible("fsl,MPC85XXRDB-CAMP")) { - mpic =3D mpic_alloc(NULL, 0, MPIC_NO_RESET | - MPIC_BIG_ENDIAN | - MPIC_SINGLE_DEST_CPU, - 0, 256, " OpenPIC "); - } else { - mpic =3D mpic_alloc(NULL, 0, - MPIC_BIG_ENDIAN | - MPIC_SINGLE_DEST_CPU, - 0, 256, " OpenPIC "); - } + if (of_machine_is_compatible("fsl,MPC85XXRDB-CAMP")) + flags |=3D MPIC_NO_RESET; + + mpic =3D mpic_alloc(NULL, 0, flags, 0, 256, " OpenPIC "); =20 BUG_ON(mpic =3D=3D NULL); mpic_init(mpic); --=20 2.39.1 From nobody Wed Sep 10 21:46:42 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F1F0C636D6 for ; Wed, 22 Feb 2023 14:47:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232187AbjBVOq7 (ORCPT ); Wed, 22 Feb 2023 09:46:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231905AbjBVOq4 (ORCPT ); Wed, 22 Feb 2023 09:46:56 -0500 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBD723B64C for ; Wed, 22 Feb 2023 06:46:36 -0800 (PST) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4PMJn55S4fz9sTB; Wed, 22 Feb 2023 15:43:37 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pXQ3f5oAxHkq; Wed, 22 Feb 2023 15:43:37 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4PMJmx0XBqz9sTc; Wed, 22 Feb 2023 15:43:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id F14F48B78F; Wed, 22 Feb 2023 15:43:28 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id RG1DkPmcq6k5; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 76CFE8B77D; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 31MEhLbs1187109 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 22 Feb 2023 15:43:21 +0100 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 31MEhLdp1187108; Wed, 22 Feb 2023 15:43:21 +0100 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Michael Ellerman , Nicholas Piggin Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v4 06/17] powerpc/85xx: mpc85xx_{ds/rdb} replace BUG_ON() by WARN_ON() Date: Wed, 22 Feb 2023 15:42:53 +0100 Message-Id: <91130c7e284476e2a8aa19416864589e78dd5515.1677076552.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1677076979; l=1226; s=20211009; h=from:subject:message-id; bh=J0gI6WV59yjXxNFPuk75305uWFjcMDSVSKEr9Sk5b8A=; b=SgpzlsWRljgUCyIjhkkQgs35rXJOufgljw68YBs22ixAVopfts46A4Vf266OsDV/vA63FOCaFzS8 FQZ+64dTAC7pSFdaDRMguHEr+jn17z6aP9H9nr6xKA3QVFEOKO1j X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" No need to BUG() in case mpic_alloc() fails. Use WARN_ON(). Signed-off-by: Christophe Leroy Reviewed-by: Pali Roh=C3=A1r --- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 4 +++- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platfo= rms/85xx/mpc85xx_ds.c index 1e6e89136948..60d473d9b8ee 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -62,7 +62,9 @@ void __init mpc85xx_ds_pic_init(void) =20 mpic =3D mpic_alloc(NULL, 0, flags, 0, 256, " OpenPIC "); =20 - BUG_ON(mpic =3D=3D NULL); + if (WARN_ON(!mpic)) + return; + mpic_init(mpic); =20 #ifdef CONFIG_PPC_I8259 diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platf= orms/85xx/mpc85xx_rdb.c index 110365d7b997..34b65441661e 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c @@ -39,7 +39,9 @@ void __init mpc85xx_rdb_pic_init(void) =20 mpic =3D mpic_alloc(NULL, 0, flags, 0, 256, " OpenPIC "); =20 - BUG_ON(mpic =3D=3D NULL); + if (WARN_ON(!mpic)) + return; + mpic_init(mpic); } =20 --=20 2.39.1 From nobody Wed Sep 10 21:46:42 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 577FEC636D6 for ; Wed, 22 Feb 2023 14:43:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232064AbjBVOns (ORCPT ); Wed, 22 Feb 2023 09:43:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231819AbjBVOnh (ORCPT ); Wed, 22 Feb 2023 09:43:37 -0500 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EED5830187 for ; Wed, 22 Feb 2023 06:43:33 -0800 (PST) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4PMJmx0CJkz9sTS; Wed, 22 Feb 2023 15:43:29 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g40_R-pM2LYA; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4PMJmw6S1Gz9sTB; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id CD7398B792; Wed, 22 Feb 2023 15:43:28 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id N7c-RGXU8gm7; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 6EC268B763; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 31MEhLmU1187113 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 22 Feb 2023 15:43:22 +0100 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 31MEhLPk1187112; Wed, 22 Feb 2023 15:43:21 +0100 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Michael Ellerman , Nicholas Piggin Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v4 07/17] powerpc/85xx: mpc85xx_{ds/rdb} replace prink by pr_xxx macro Date: Wed, 22 Feb 2023 15:42:54 +0100 Message-Id: <7ae9b975a748d4f6363b2b16cf004228c0b07201.1677076552.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1677076980; l=1861; s=20211009; h=from:subject:message-id; bh=zQ8/c7+TvYXkwm4Y4srKRxXjUkN4RF8MxkzWsUPn0Pw=; b=x4mdee88ParytD4/l4TUCDwqWamtnCaC2qGYnLQWK1HtsDBOTURqqxTneQ3E5UfzNKGghgQX8f1D NCcfpLGeBWNXOWE7fhBLUPdm3CZTO9U51ujnxduK9gg+XVxN+UKU X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Use pr_debug() instead of printk(KERN_DEBUG Use pr_err() instead of printk(KERN_ERR Use pr_info() instead of printk(KERN_INFO or printk(" Signed-off-by: Christophe Leroy Reviewed-by: Pali Roh=C3=A1r --- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 6 +++--- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platfo= rms/85xx/mpc85xx_ds.c index 60d473d9b8ee..e995c939c14d 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -76,13 +76,13 @@ void __init mpc85xx_ds_pic_init(void) } =20 if (cascade_node =3D=3D NULL) { - printk(KERN_DEBUG "Could not find i8259 PIC\n"); + pr_debug("Could not find i8259 PIC\n"); return; } =20 cascade_irq =3D irq_of_parse_and_map(cascade_node, 0); if (!cascade_irq) { - printk(KERN_ERR "Failed to map cascade interrupt\n"); + pr_err("Failed to map cascade interrupt\n"); return; } =20 @@ -140,7 +140,7 @@ static void __init mpc85xx_ds_setup_arch(void) mpc85xx_ds_uli_init(); mpc85xx_smp_init(); =20 - printk("MPC85xx DS board from Freescale Semiconductor\n"); + pr_info("MPC85xx DS board from Freescale Semiconductor\n"); } =20 /* diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platf= orms/85xx/mpc85xx_rdb.c index 34b65441661e..8b0d81f0e1c9 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c @@ -92,7 +92,7 @@ static void __init mpc85xx_rdb_setup_arch(void) #endif #endif /* CONFIG_QUICC_ENGINE */ =20 - printk(KERN_INFO "MPC85xx RDB board from Freescale Semiconductor\n"); + pr_info("MPC85xx RDB board from Freescale Semiconductor\n"); } =20 machine_arch_initcall(p2020_rdb, mpc85xx_common_publish_devices); --=20 2.39.1 From nobody Wed Sep 10 21:46:42 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C465CC636D6 for ; Wed, 22 Feb 2023 14:45:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232138AbjBVOpN (ORCPT ); Wed, 22 Feb 2023 09:45:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232124AbjBVOpJ (ORCPT ); Wed, 22 Feb 2023 09:45:09 -0500 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28EFF2201B for ; Wed, 22 Feb 2023 06:44:34 -0800 (PST) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4PMJn24BcHz9sTK; Wed, 22 Feb 2023 15:43:34 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1B_hiUGDNoUU; Wed, 22 Feb 2023 15:43:34 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4PMJmw6rcyz9sTP; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id DA1F98B798; Wed, 22 Feb 2023 15:43:28 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id tVgWbnZBDkVp; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 9FBE58B78F; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 31MEhM2J1187117 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 22 Feb 2023 15:43:22 +0100 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 31MEhMbw1187116; Wed, 22 Feb 2023 15:43:22 +0100 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Michael Ellerman , Nicholas Piggin Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v4 08/17] powerpc/85xx: Remove #ifdefs CONFIG_PPC_I8259 in mpc85xx_ds Date: Wed, 22 Feb 2023 15:42:55 +0100 Message-Id: <3fc29340ba57d61921ddf395ac80a3a83b37783b.1677076552.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1677076980; l=2267; s=20211009; h=from:subject:message-id; bh=nWBQe8lwquK/CyACk0YHIWCQ+dvzXRrfH8PjQNsiwUc=; b=vOen4Nhkhe/fay27COFNi0kjTgJH/0sSQB9xScuRfbh1tOmbIxSyKhI5R0RYOVy5gNMmzoQY/+Wm WE46ykuwBIwVWB6AkHyNgQXFfTSB20Ayxjzsz1DLYrVrlxzbpAYz X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" All necessary items are declared all the time, no need to use a #ifdef CONFIG_PPC_I8259. Refactor CONFIG_PPC_I8259 actions into a dedicated init function. Signed-off-by: Christophe Leroy Reviewed-by: Pali Roh=C3=A1r --- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 37 +++++++++++++----------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platfo= rms/85xx/mpc85xx_ds.c index e995c939c14d..2b3e9aecb3ad 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -34,7 +34,6 @@ =20 #include "mpc85xx.h" =20 -#ifdef CONFIG_PPC_I8259 static void mpc85xx_8259_cascade(struct irq_desc *desc) { struct irq_chip *chip =3D irq_desc_get_chip(desc); @@ -45,29 +44,16 @@ static void mpc85xx_8259_cascade(struct irq_desc *desc) } chip->irq_eoi(&desc->irq_data); } -#endif /* CONFIG_PPC_I8259 */ =20 -void __init mpc85xx_ds_pic_init(void) +static void __init mpc85xx_8259_init(void) { - struct mpic *mpic; - int flags =3D MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU; -#ifdef CONFIG_PPC_I8259 struct device_node *np; struct device_node *cascade_node =3D NULL; int cascade_irq; -#endif =20 - if (of_machine_is_compatible("fsl,MPC8572DS-CAMP")) - flags |=3D MPIC_NO_RESET; - - mpic =3D mpic_alloc(NULL, 0, flags, 0, 256, " OpenPIC "); - - if (WARN_ON(!mpic)) + if (!IS_ENABLED(CONFIG_PPC_I8259)) return; =20 - mpic_init(mpic); - -#ifdef CONFIG_PPC_I8259 /* Initialize the i8259 controller */ for_each_node_by_type(np, "interrupt-controller") if (of_device_is_compatible(np, "chrp,iic")) { @@ -92,7 +78,24 @@ void __init mpc85xx_ds_pic_init(void) of_node_put(cascade_node); =20 irq_set_chained_handler(cascade_irq, mpc85xx_8259_cascade); -#endif /* CONFIG_PPC_I8259 */ +} + +void __init mpc85xx_ds_pic_init(void) +{ + struct mpic *mpic; + int flags =3D MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU; + + if (of_machine_is_compatible("fsl,MPC8572DS-CAMP")) + flags |=3D MPIC_NO_RESET; + + mpic =3D mpic_alloc(NULL, 0, flags, 0, 256, " OpenPIC "); + + if (WARN_ON(!mpic)) + return; + + mpic_init(mpic); + + mpc85xx_8259_init(); } =20 static struct device_node *pci_with_uli; --=20 2.39.1 From nobody Wed Sep 10 21:46:42 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7AEACC64EC4 for ; Wed, 22 Feb 2023 15:20:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232397AbjBVPU0 (ORCPT ); Wed, 22 Feb 2023 10:20:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232392AbjBVPUX (ORCPT ); Wed, 22 Feb 2023 10:20:23 -0500 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02B61367F8 for ; Wed, 22 Feb 2023 07:20:20 -0800 (PST) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4PMJnG0W4Pz9sTL; Wed, 22 Feb 2023 15:43:46 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LgTnPlj-2oPb; Wed, 22 Feb 2023 15:43:45 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4PMJmx28Sjz9sTr; Wed, 22 Feb 2023 15:43:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id F24038B792; Wed, 22 Feb 2023 15:43:28 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id FV-r4SVnOsZX; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 833568B783; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 31MEhMIX1187121 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 22 Feb 2023 15:43:22 +0100 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 31MEhMlq1187120; Wed, 22 Feb 2023 15:43:22 +0100 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Michael Ellerman , Nicholas Piggin Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v4 09/17] powerpc/85xx: Remove #ifdef CONFIG_QUICC_ENGINE in mpc85xx_rdb Date: Wed, 22 Feb 2023 15:42:56 +0100 Message-Id: <8202c15a1966d05af229f8c7d99ffe2b62b8cc47.1677076552.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1677076980; l=1031; s=20211009; h=from:subject:message-id; bh=HyIayM5wtFL/jvAxFSkkjDvO/jj+rU8jvc5UkswkaG0=; b=5QO5iP0N0PEx8iTgcUK2fBAkLz5BtvCNL1SgkEHPzCWLm83IsxZlZcFm9c4TLWZ/oC7ex6h2GqGT 8guERp8HB5ttEEhhJRw/mGMZQWvys/IzxWzq3HdA6cwLIfnIq9nL X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" mpc85xx_qe_par_io_init() is a stub when CONFIG_QUICC_ENGINE is not set. CONFIG_UCC_GETH and CONFIG_SERIAL_QE depend on CONFIG_QUICC_ENGINE. Remove #ifdef CONFIG_QUICC_ENGINE Signed-off-by: Christophe Leroy Reviewed-by: Pali Roh=C3=A1r --- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platf= orms/85xx/mpc85xx_rdb.c index 8b0d81f0e1c9..b23f826339b5 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c @@ -57,7 +57,6 @@ static void __init mpc85xx_rdb_setup_arch(void) =20 fsl_pci_assign_primary(); =20 -#ifdef CONFIG_QUICC_ENGINE mpc85xx_qe_par_io_init(); #if defined(CONFIG_UCC_GETH) || defined(CONFIG_SERIAL_QE) if (machine_is(p1025_rdb)) { @@ -90,7 +89,6 @@ static void __init mpc85xx_rdb_setup_arch(void) =20 } #endif -#endif /* CONFIG_QUICC_ENGINE */ =20 pr_info("MPC85xx RDB board from Freescale Semiconductor\n"); } --=20 2.39.1 From nobody Wed Sep 10 21:46:42 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92114C64EC4 for ; Wed, 22 Feb 2023 14:44:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232105AbjBVOoC (ORCPT ); Wed, 22 Feb 2023 09:44:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232045AbjBVOn4 (ORCPT ); Wed, 22 Feb 2023 09:43:56 -0500 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E4113B657 for ; Wed, 22 Feb 2023 06:43:47 -0800 (PST) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4PMJn066llz9sTJ; Wed, 22 Feb 2023 15:43:32 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6q3ZA31B1M0O; Wed, 22 Feb 2023 15:43:32 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4PMJmw6vXjz9sTQ; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id DA14B8B796; Wed, 22 Feb 2023 15:43:28 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 9Lfg7obgQvSE; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 9104B8B788; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 31MEhMVT1187125 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 22 Feb 2023 15:43:22 +0100 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 31MEhMPL1187124; Wed, 22 Feb 2023 15:43:22 +0100 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Michael Ellerman , Nicholas Piggin Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v4 10/17] powerpc/85xx: p2020: Move all P2020 DS machine descriptions to p2020.c Date: Wed, 22 Feb 2023 15:42:57 +0100 Message-Id: <22c431f139b205527920fcfe4022432409fdb6f6.1677076552.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Developer-Signature: v=1; a=ed25519-sha256; t=1677076980; l=5462; i=christophe.leroy@csgroup.eu; s=20211009; h=from:subject:message-id; bh=RhbfMxmAEQR9W3sTeOv71BYFTCTQBU8uKEjkMHP7+TU=; b=DuP9Mzxn4wcR2Ziq3Qp6/BG8BFnJtBvPPI/G1OmoSPFYcUJmsGZ6zaGUwmSWGxtNsQbnFZe6BH97 tcGe6rHxDOT7fKQyj4UWCxUphvNtIhgzWd2PEFkDeWj1U5IM4ZCZ X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pali Roh=C3=A1r This moves machine descriptions and all related code for all P2020 boards into new p2020.c source file. This is preparation for code de-duplication and providing one unified machine description for all P2020 boards. In follow-up patches would be copied functions refactored and simplified to be specific just for P2020 boards. Signed-off-by: Pali Roh=C3=A1r [chleroy: Split in two patches: one for DS, one for RDB and keep helpers ou= t] Signed-off-by: Christophe Leroy Reviewed-by: Pali Roh=C3=A1r --- arch/powerpc/platforms/85xx/Makefile | 2 +- arch/powerpc/platforms/85xx/mpc85xx.h | 3 ++ arch/powerpc/platforms/85xx/mpc85xx_ds.c | 25 +--------- arch/powerpc/platforms/85xx/p2020.c | 59 ++++++++++++++++++++++++ 4 files changed, 64 insertions(+), 25 deletions(-) create mode 100644 arch/powerpc/platforms/85xx/p2020.c diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/= 85xx/Makefile index 260fbad7967b..1f54623db9b7 100644 --- a/arch/powerpc/platforms/85xx/Makefile +++ b/arch/powerpc/platforms/85xx/Makefile @@ -16,7 +16,7 @@ obj-$(CONFIG_MPC8540_ADS) +=3D mpc85xx_ads.o obj-$(CONFIG_MPC8560_ADS) +=3D mpc85xx_ads.o obj-$(CONFIG_MPC85xx_CDS) +=3D mpc85xx_cds.o obj-$(CONFIG_MPC8536_DS) +=3D mpc8536_ds.o -obj-$(CONFIG_MPC85xx_DS) +=3D mpc85xx_ds.o +obj-$(CONFIG_MPC85xx_DS) +=3D mpc85xx_ds.o p2020.o obj-$(CONFIG_MPC85xx_MDS) +=3D mpc85xx_mds.o obj-$(CONFIG_MPC85xx_RDB) +=3D mpc85xx_rdb.o obj-$(CONFIG_P1010_RDB) +=3D p1010rdb.o diff --git a/arch/powerpc/platforms/85xx/mpc85xx.h b/arch/powerpc/platforms= /85xx/mpc85xx.h index cb84c5c56c36..ca8b39e6b05a 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx.h +++ b/arch/powerpc/platforms/85xx/mpc85xx.h @@ -15,4 +15,7 @@ extern void mpc85xx_qe_par_io_init(void); static inline void __init mpc85xx_qe_par_io_init(void) {} #endif =20 +void __init mpc85xx_ds_pic_init(void); +void __init mpc85xx_ds_setup_arch(void); + #endif diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platfo= rms/85xx/mpc85xx_ds.c index 2b3e9aecb3ad..8594862ab3a4 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -133,7 +133,7 @@ static void __init mpc85xx_ds_uli_init(void) /* * Setup the architecture */ -static void __init mpc85xx_ds_setup_arch(void) +void __init mpc85xx_ds_setup_arch(void) { if (ppc_md.progress) ppc_md.progress("mpc85xx_ds_setup_arch()", 0); @@ -156,7 +156,6 @@ static int __init mpc8544_ds_probe(void) =20 machine_arch_initcall(mpc8544_ds, mpc85xx_common_publish_devices); machine_arch_initcall(mpc8572_ds, mpc85xx_common_publish_devices); -machine_arch_initcall(p2020_ds, mpc85xx_common_publish_devices); =20 /* * Called very early, device-tree isn't unflattened @@ -166,14 +165,6 @@ static int __init mpc8572_ds_probe(void) return !!of_machine_is_compatible("fsl,MPC8572DS"); } =20 -/* - * Called very early, device-tree isn't unflattened - */ -static int __init p2020_ds_probe(void) -{ - return !!of_machine_is_compatible("fsl,P2020DS"); -} - define_machine(mpc8544_ds) { .name =3D "MPC8544 DS", .probe =3D mpc8544_ds_probe, @@ -201,17 +192,3 @@ define_machine(mpc8572_ds) { .calibrate_decr =3D generic_calibrate_decr, .progress =3D udbg_progress, }; - -define_machine(p2020_ds) { - .name =3D "P2020 DS", - .probe =3D p2020_ds_probe, - .setup_arch =3D mpc85xx_ds_setup_arch, - .init_IRQ =3D mpc85xx_ds_pic_init, -#ifdef CONFIG_PCI - .pcibios_fixup_bus =3D fsl_pcibios_fixup_bus, - .pcibios_fixup_phb =3D fsl_pcibios_fixup_phb, -#endif - .get_irq =3D mpic_get_irq, - .calibrate_decr =3D generic_calibrate_decr, - .progress =3D udbg_progress, -}; diff --git a/arch/powerpc/platforms/85xx/p2020.c b/arch/powerpc/platforms/8= 5xx/p2020.c new file mode 100644 index 000000000000..2dfd150c6375 --- /dev/null +++ b/arch/powerpc/platforms/85xx/p2020.c @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Freescale P2020 board Setup + * + * Copyright 2007,2009,2012-2013 Freescale Semiconductor Inc. + * Copyright 2022 Pali Roh=C3=A1r + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include "smp.h" + +#include "mpc85xx.h" + +machine_arch_initcall(p2020_ds, mpc85xx_common_publish_devices); + +/* + * Called very early, device-tree isn't unflattened + */ +static int __init p2020_ds_probe(void) +{ + return !!of_machine_is_compatible("fsl,P2020DS"); +} + +define_machine(p2020_ds) { + .name =3D "P2020 DS", + .probe =3D p2020_ds_probe, + .setup_arch =3D mpc85xx_ds_setup_arch, + .init_IRQ =3D mpc85xx_ds_pic_init, +#ifdef CONFIG_PCI + .pcibios_fixup_bus =3D fsl_pcibios_fixup_bus, + .pcibios_fixup_phb =3D fsl_pcibios_fixup_phb, +#endif + .get_irq =3D mpic_get_irq, + .calibrate_decr =3D generic_calibrate_decr, + .progress =3D udbg_progress, +}; --=20 2.39.1 From nobody Wed Sep 10 21:46:42 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F2B5C61DA4 for ; Wed, 22 Feb 2023 15:20:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232392AbjBVPU2 (ORCPT ); Wed, 22 Feb 2023 10:20:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232050AbjBVPUX (ORCPT ); Wed, 22 Feb 2023 10:20:23 -0500 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2105236FFA for ; Wed, 22 Feb 2023 07:20:21 -0800 (PST) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4PMJnD1yt9z9sTk; Wed, 22 Feb 2023 15:43:44 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mZ-y7XAscdZc; Wed, 22 Feb 2023 15:43:44 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4PMJmx1KhCz9sTq; Wed, 22 Feb 2023 15:43:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 0DE978B77A; Wed, 22 Feb 2023 15:43:29 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id tKlf2-Sq28ET; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 8AF038B787; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 31MEhMD51187129 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 22 Feb 2023 15:43:22 +0100 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 31MEhMBj1187128; Wed, 22 Feb 2023 15:43:22 +0100 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Michael Ellerman , Nicholas Piggin Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v4 11/17] powerpc/85xx: p2020: Move all P2020 RDB machine descriptions to p2020.c Date: Wed, 22 Feb 2023 15:42:58 +0100 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Developer-Signature: v=1; a=ed25519-sha256; t=1677076980; l=7192; i=christophe.leroy@csgroup.eu; s=20211009; h=from:subject:message-id; bh=/APkHm0vLupHNPYOOM8QGlGxxbyS0eRfj8Vr8fKV8h8=; b=uZCMERUX4mYu6IcvpJ7tbiD3bAVw58YtS+ihVtjZeumhxehhhQ7i6H/Hzw+md2zf+x9Lg5eQ1FoV cQUPBqD2BUrNUxMK/5gQWW5swCyGL2NBRM5klG+BnctckxLQv0xY X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pali Roh=C3=A1r This moves machine descriptions and all related code for all P2020 boards into new p2020.c source file. This is preparation for code de-duplication and providing one unified machine description for all P2020 boards. In follow-up patches would be copied functions refactored and simplified to be specific just for P2020 boards. Signed-off-by: Pali Roh=C3=A1r [chleroy: Split in two patches: one for DS, one for RDB and keep helpers ou= t] Signed-off-by: Christophe Leroy Reviewed-by: Pali Roh=C3=A1r --- arch/powerpc/platforms/85xx/Makefile | 2 +- arch/powerpc/platforms/85xx/mpc85xx.h | 2 + arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 46 +----------------- arch/powerpc/platforms/85xx/p2020.c | 57 +++++++++++++++++++++++ 4 files changed, 61 insertions(+), 46 deletions(-) diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/= 85xx/Makefile index 1f54623db9b7..93451850ed83 100644 --- a/arch/powerpc/platforms/85xx/Makefile +++ b/arch/powerpc/platforms/85xx/Makefile @@ -18,7 +18,7 @@ obj-$(CONFIG_MPC85xx_CDS) +=3D mpc85xx_cds.o obj-$(CONFIG_MPC8536_DS) +=3D mpc8536_ds.o obj-$(CONFIG_MPC85xx_DS) +=3D mpc85xx_ds.o p2020.o obj-$(CONFIG_MPC85xx_MDS) +=3D mpc85xx_mds.o -obj-$(CONFIG_MPC85xx_RDB) +=3D mpc85xx_rdb.o +obj-$(CONFIG_MPC85xx_RDB) +=3D mpc85xx_rdb.o p2020.o obj-$(CONFIG_P1010_RDB) +=3D p1010rdb.o obj-$(CONFIG_P1022_DS) +=3D p1022_ds.o obj-$(CONFIG_P1022_RDK) +=3D p1022_rdk.o diff --git a/arch/powerpc/platforms/85xx/mpc85xx.h b/arch/powerpc/platforms= /85xx/mpc85xx.h index ca8b39e6b05a..8f7b37c1de87 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx.h +++ b/arch/powerpc/platforms/85xx/mpc85xx.h @@ -17,5 +17,7 @@ static inline void __init mpc85xx_qe_par_io_init(void) {} =20 void __init mpc85xx_ds_pic_init(void); void __init mpc85xx_ds_setup_arch(void); +void __init mpc85xx_rdb_setup_arch(void); +void __init mpc85xx_rdb_pic_init(void); =20 #endif diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platf= orms/85xx/mpc85xx_rdb.c index b23f826339b5..d1f497e086ed 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c @@ -48,7 +48,7 @@ void __init mpc85xx_rdb_pic_init(void) /* * Setup the architecture */ -static void __init mpc85xx_rdb_setup_arch(void) +void __init mpc85xx_rdb_setup_arch(void) { if (ppc_md.progress) ppc_md.progress("mpc85xx_rdb_setup_arch()", 0); @@ -93,8 +93,6 @@ static void __init mpc85xx_rdb_setup_arch(void) pr_info("MPC85xx RDB board from Freescale Semiconductor\n"); } =20 -machine_arch_initcall(p2020_rdb, mpc85xx_common_publish_devices); -machine_arch_initcall(p2020_rdb_pc, mpc85xx_common_publish_devices); machine_arch_initcall(p1020_mbg_pc, mpc85xx_common_publish_devices); machine_arch_initcall(p1020_rdb, mpc85xx_common_publish_devices); machine_arch_initcall(p1020_rdb_pc, mpc85xx_common_publish_devices); @@ -107,13 +105,6 @@ machine_arch_initcall(p1024_rdb, mpc85xx_common_publis= h_devices); /* * Called very early, device-tree isn't unflattened */ -static int __init p2020_rdb_probe(void) -{ - if (of_machine_is_compatible("fsl,P2020RDB")) - return 1; - return 0; -} - static int __init p1020_rdb_probe(void) { if (of_machine_is_compatible("fsl,P1020RDB")) @@ -138,13 +129,6 @@ static int __init p1021_rdb_pc_probe(void) return 0; } =20 -static int __init p2020_rdb_pc_probe(void) -{ - if (of_machine_is_compatible("fsl,P2020RDB-PC")) - return 1; - return 0; -} - static int __init p1025_rdb_probe(void) { return of_machine_is_compatible("fsl,P1025RDB"); @@ -165,20 +149,6 @@ static int __init p1024_rdb_probe(void) return of_machine_is_compatible("fsl,P1024RDB"); } =20 -define_machine(p2020_rdb) { - .name =3D "P2020 RDB", - .probe =3D p2020_rdb_probe, - .setup_arch =3D mpc85xx_rdb_setup_arch, - .init_IRQ =3D mpc85xx_rdb_pic_init, -#ifdef CONFIG_PCI - .pcibios_fixup_bus =3D fsl_pcibios_fixup_bus, - .pcibios_fixup_phb =3D fsl_pcibios_fixup_phb, -#endif - .get_irq =3D mpic_get_irq, - .calibrate_decr =3D generic_calibrate_decr, - .progress =3D udbg_progress, -}; - define_machine(p1020_rdb) { .name =3D "P1020 RDB", .probe =3D p1020_rdb_probe, @@ -207,20 +177,6 @@ define_machine(p1021_rdb_pc) { .progress =3D udbg_progress, }; =20 -define_machine(p2020_rdb_pc) { - .name =3D "P2020RDB-PC", - .probe =3D p2020_rdb_pc_probe, - .setup_arch =3D mpc85xx_rdb_setup_arch, - .init_IRQ =3D mpc85xx_rdb_pic_init, -#ifdef CONFIG_PCI - .pcibios_fixup_bus =3D fsl_pcibios_fixup_bus, - .pcibios_fixup_phb =3D fsl_pcibios_fixup_phb, -#endif - .get_irq =3D mpic_get_irq, - .calibrate_decr =3D generic_calibrate_decr, - .progress =3D udbg_progress, -}; - define_machine(p1025_rdb) { .name =3D "P1025 RDB", .probe =3D p1025_rdb_probe, diff --git a/arch/powerpc/platforms/85xx/p2020.c b/arch/powerpc/platforms/8= 5xx/p2020.c index 2dfd150c6375..1b0def607749 100644 --- a/arch/powerpc/platforms/85xx/p2020.c +++ b/arch/powerpc/platforms/85xx/p2020.c @@ -34,16 +34,42 @@ =20 #include "mpc85xx.h" =20 +#ifdef CONFIG_MPC85xx_DS machine_arch_initcall(p2020_ds, mpc85xx_common_publish_devices); +#endif /* CONFIG_MPC85xx_DS */ + +#ifdef CONFIG_MPC85xx_RDB +machine_arch_initcall(p2020_rdb, mpc85xx_common_publish_devices); +machine_arch_initcall(p2020_rdb_pc, mpc85xx_common_publish_devices); +#endif /* CONFIG_MPC85xx_RDB */ =20 /* * Called very early, device-tree isn't unflattened */ +#ifdef CONFIG_MPC85xx_DS static int __init p2020_ds_probe(void) { return !!of_machine_is_compatible("fsl,P2020DS"); } +#endif /* CONFIG_MPC85xx_DS */ + +#ifdef CONFIG_MPC85xx_RDB +static int __init p2020_rdb_probe(void) +{ + if (of_machine_is_compatible("fsl,P2020RDB")) + return 1; + return 0; +} + +static int __init p2020_rdb_pc_probe(void) +{ + if (of_machine_is_compatible("fsl,P2020RDB-PC")) + return 1; + return 0; +} +#endif /* CONFIG_MPC85xx_RDB */ =20 +#ifdef CONFIG_MPC85xx_DS define_machine(p2020_ds) { .name =3D "P2020 DS", .probe =3D p2020_ds_probe, @@ -57,3 +83,34 @@ define_machine(p2020_ds) { .calibrate_decr =3D generic_calibrate_decr, .progress =3D udbg_progress, }; +#endif /* CONFIG_MPC85xx_DS */ + +#ifdef CONFIG_MPC85xx_RDB +define_machine(p2020_rdb) { + .name =3D "P2020 RDB", + .probe =3D p2020_rdb_probe, + .setup_arch =3D mpc85xx_rdb_setup_arch, + .init_IRQ =3D mpc85xx_rdb_pic_init, +#ifdef CONFIG_PCI + .pcibios_fixup_bus =3D fsl_pcibios_fixup_bus, + .pcibios_fixup_phb =3D fsl_pcibios_fixup_phb, +#endif + .get_irq =3D mpic_get_irq, + .calibrate_decr =3D generic_calibrate_decr, + .progress =3D udbg_progress, +}; + +define_machine(p2020_rdb_pc) { + .name =3D "P2020RDB-PC", + .probe =3D p2020_rdb_pc_probe, + .setup_arch =3D mpc85xx_rdb_setup_arch, + .init_IRQ =3D mpc85xx_rdb_pic_init, +#ifdef CONFIG_PCI + .pcibios_fixup_bus =3D fsl_pcibios_fixup_bus, + .pcibios_fixup_phb =3D fsl_pcibios_fixup_phb, +#endif + .get_irq =3D mpic_get_irq, + .calibrate_decr =3D generic_calibrate_decr, + .progress =3D udbg_progress, +}; +#endif /* CONFIG_MPC85xx_RDB */ --=20 2.39.1 From nobody Wed Sep 10 21:46:42 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6606C61DA4 for ; Wed, 22 Feb 2023 15:20:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232427AbjBVPUp (ORCPT ); Wed, 22 Feb 2023 10:20:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231308AbjBVPUm (ORCPT ); Wed, 22 Feb 2023 10:20:42 -0500 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 389743C7AC for ; Wed, 22 Feb 2023 07:20:30 -0800 (PST) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4PMJnC1tkPz9sTh; Wed, 22 Feb 2023 15:43:43 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Sfkms4YxWzkN; Wed, 22 Feb 2023 15:43:43 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4PMJmx1FV9z9sTk; Wed, 22 Feb 2023 15:43:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 08D098B781; Wed, 22 Feb 2023 15:43:29 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id P_oheMDO37ac; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 7AA0B8B77E; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 31MEhMnM1187133 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 22 Feb 2023 15:43:23 +0100 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 31MEhMII1187132; Wed, 22 Feb 2023 15:43:22 +0100 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Michael Ellerman , Nicholas Piggin Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v4 12/17] powerpc/85xx: p2020: Move i8259 code into own function Date: Wed, 22 Feb 2023 15:42:59 +0100 Message-Id: <6f7d71146a4da9d65e40af125616d665ec7425d2.1677076552.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Developer-Signature: v=1; a=ed25519-sha256; t=1677076980; l=5643; i=christophe.leroy@csgroup.eu; s=20211009; h=from:subject:message-id; bh=rZuafE0PtNaHeRlJCX+Mg+JesiTvfhb8xZ7Npg6/2uE=; b=lrvY9uS1YZfuqNQTPwZNH2/71Iuw+k+PtRJbfatTuR5PscJmI38nAan7ZBMCK5jftJIvdZLu6JFS ZHkRZhLXD02cH4sDcjWXu3+ZJBLdS8nakRdoj+TtqhDO0l649fZf X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pali Roh=C3=A1r Splits mpic and i8259 initialization codes into separate functions. Use 'if (IS_ENABLED(CONFIG_PPC_I8259))' instead of '#ifdef CONFIG_PPC_I8259= '. Signed-off-by: Pali Roh=C3=A1r [chleroy: Put into own C file] Signed-off-by: Christophe Leroy Reviewed-by: Pali Roh=C3=A1r --- arch/powerpc/platforms/85xx/Makefile | 3 +- arch/powerpc/platforms/85xx/mpc85xx.h | 6 ++ arch/powerpc/platforms/85xx/mpc85xx_8259.c | 78 ++++++++++++++++++++++ arch/powerpc/platforms/85xx/mpc85xx_ds.c | 46 ------------- 4 files changed, 86 insertions(+), 47 deletions(-) create mode 100644 arch/powerpc/platforms/85xx/mpc85xx_8259.c diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/= 85xx/Makefile index 93451850ed83..0a0011e8c63c 100644 --- a/arch/powerpc/platforms/85xx/Makefile +++ b/arch/powerpc/platforms/85xx/Makefile @@ -16,7 +16,8 @@ obj-$(CONFIG_MPC8540_ADS) +=3D mpc85xx_ads.o obj-$(CONFIG_MPC8560_ADS) +=3D mpc85xx_ads.o obj-$(CONFIG_MPC85xx_CDS) +=3D mpc85xx_cds.o obj-$(CONFIG_MPC8536_DS) +=3D mpc8536_ds.o -obj-$(CONFIG_MPC85xx_DS) +=3D mpc85xx_ds.o p2020.o +obj8259-$(CONFIG_PPC_I8259) +=3D mpc85xx_8259.o +obj-$(CONFIG_MPC85xx_DS) +=3D mpc85xx_ds.o p2020.o $(obj8259-y) obj-$(CONFIG_MPC85xx_MDS) +=3D mpc85xx_mds.o obj-$(CONFIG_MPC85xx_RDB) +=3D mpc85xx_rdb.o p2020.o obj-$(CONFIG_P1010_RDB) +=3D p1010rdb.o diff --git a/arch/powerpc/platforms/85xx/mpc85xx.h b/arch/powerpc/platforms= /85xx/mpc85xx.h index 8f7b37c1de87..e792907ee3d5 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx.h +++ b/arch/powerpc/platforms/85xx/mpc85xx.h @@ -15,6 +15,12 @@ extern void mpc85xx_qe_par_io_init(void); static inline void __init mpc85xx_qe_par_io_init(void) {} #endif =20 +#ifdef CONFIG_PPC_I8259 +void __init mpc85xx_8259_init(void); +#else +static inline void __init mpc85xx_8259_init(void) {} +#endif + void __init mpc85xx_ds_pic_init(void); void __init mpc85xx_ds_setup_arch(void); void __init mpc85xx_rdb_setup_arch(void); diff --git a/arch/powerpc/platforms/85xx/mpc85xx_8259.c b/arch/powerpc/plat= forms/85xx/mpc85xx_8259.c new file mode 100644 index 000000000000..eeb541b9f4bd --- /dev/null +++ b/arch/powerpc/platforms/85xx/mpc85xx_8259.c @@ -0,0 +1,78 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * MPC85xx 8259 functions for DS Board Setup + * + * Author Xianghua Xiao (x.xiao@freescale.com) + * Roy Zang + * - Add PCI/PCI Exprees support + * Copyright 2007 Freescale Semiconductor Inc. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include "smp.h" + +#include "mpc85xx.h" + +static void mpc85xx_8259_cascade(struct irq_desc *desc) +{ + struct irq_chip *chip =3D irq_desc_get_chip(desc); + unsigned int cascade_irq =3D i8259_irq(); + + if (cascade_irq) { + generic_handle_irq(cascade_irq); + } + chip->irq_eoi(&desc->irq_data); +} + +void __init mpc85xx_8259_init(void) +{ + struct device_node *np; + struct device_node *cascade_node =3D NULL; + int cascade_irq; + + /* Initialize the i8259 controller */ + for_each_node_by_type(np, "interrupt-controller") + if (of_device_is_compatible(np, "chrp,iic")) { + cascade_node =3D np; + break; + } + + if (cascade_node =3D=3D NULL) { + pr_debug("Could not find i8259 PIC\n"); + return; + } + + cascade_irq =3D irq_of_parse_and_map(cascade_node, 0); + if (!cascade_irq) { + pr_err("Failed to map cascade interrupt\n"); + return; + } + + pr_debug("mpc85xxds: cascade mapped to irq %d\n", cascade_irq); + + i8259_init(cascade_node, 0); + of_node_put(cascade_node); + + irq_set_chained_handler(cascade_irq, mpc85xx_8259_cascade); +} diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platfo= rms/85xx/mpc85xx_ds.c index 8594862ab3a4..011ae86d72f4 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -34,52 +34,6 @@ =20 #include "mpc85xx.h" =20 -static void mpc85xx_8259_cascade(struct irq_desc *desc) -{ - struct irq_chip *chip =3D irq_desc_get_chip(desc); - unsigned int cascade_irq =3D i8259_irq(); - - if (cascade_irq) { - generic_handle_irq(cascade_irq); - } - chip->irq_eoi(&desc->irq_data); -} - -static void __init mpc85xx_8259_init(void) -{ - struct device_node *np; - struct device_node *cascade_node =3D NULL; - int cascade_irq; - - if (!IS_ENABLED(CONFIG_PPC_I8259)) - return; - - /* Initialize the i8259 controller */ - for_each_node_by_type(np, "interrupt-controller") - if (of_device_is_compatible(np, "chrp,iic")) { - cascade_node =3D np; - break; - } - - if (cascade_node =3D=3D NULL) { - pr_debug("Could not find i8259 PIC\n"); - return; - } - - cascade_irq =3D irq_of_parse_and_map(cascade_node, 0); - if (!cascade_irq) { - pr_err("Failed to map cascade interrupt\n"); - return; - } - - pr_debug("mpc85xxds: cascade mapped to irq %d\n", cascade_irq); - - i8259_init(cascade_node, 0); - of_node_put(cascade_node); - - irq_set_chained_handler(cascade_irq, mpc85xx_8259_cascade); -} - void __init mpc85xx_ds_pic_init(void) { struct mpic *mpic; --=20 2.39.1 From nobody Wed Sep 10 21:46:43 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F780C64EC7 for ; Wed, 22 Feb 2023 14:50:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231292AbjBVOu4 (ORCPT ); Wed, 22 Feb 2023 09:50:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232206AbjBVOud (ORCPT ); Wed, 22 Feb 2023 09:50:33 -0500 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8457C37B68 for ; Wed, 22 Feb 2023 06:50:14 -0800 (PST) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4PMJn92wzTz9sTs; Wed, 22 Feb 2023 15:43:41 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mLG04kNAlVH9; Wed, 22 Feb 2023 15:43:41 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4PMJmx10Rxz9sTg; Wed, 22 Feb 2023 15:43:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 074EF8B77D; Wed, 22 Feb 2023 15:43:29 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id SmD7N2G290xu; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 9D8C28B78D; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 31MEhN7W1187137 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 22 Feb 2023 15:43:23 +0100 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 31MEhNYG1187136; Wed, 22 Feb 2023 15:43:23 +0100 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Michael Ellerman , Nicholas Piggin Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v4 13/17] powerpc/85xx: mpc85xx_ds: Move PCI code into own file Date: Wed, 22 Feb 2023 15:43:00 +0100 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Developer-Signature: v=1; a=ed25519-sha256; t=1677076980; l=4745; i=christophe.leroy@csgroup.eu; s=20211009; h=from:subject:message-id; bh=5GddNXS+Voh7uO5Ylrv63X9sNcGsdXR7TxDUZUFFlVA=; b=PQ+svHo1viKecl1we6C1Z7F/NKp6pFpQ5Knz39L7L+BMlCLWc/jVLlD0WetAblky8OysQ1cPBhTI JY3+alO+DGy91LVFUTNO7uScZcnKz+0Ejsi6e/Zt2xnUbwpT3KmQ X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pali Roh=C3=A1r In order to share between DS and P2020. Signed-off-by: Christophe Leroy Reviewed-by: Pali Roh=C3=A1r --- arch/powerpc/platforms/85xx/Makefile | 3 +- arch/powerpc/platforms/85xx/mpc85xx.h | 6 +++ arch/powerpc/platforms/85xx/mpc85xx_ds.c | 32 ------------ arch/powerpc/platforms/85xx/mpc85xx_uli.c | 64 +++++++++++++++++++++++ 4 files changed, 72 insertions(+), 33 deletions(-) create mode 100644 arch/powerpc/platforms/85xx/mpc85xx_uli.c diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/= 85xx/Makefile index 0a0011e8c63c..65abd5a161c0 100644 --- a/arch/powerpc/platforms/85xx/Makefile +++ b/arch/powerpc/platforms/85xx/Makefile @@ -17,7 +17,8 @@ obj-$(CONFIG_MPC8560_ADS) +=3D mpc85xx_ads.o obj-$(CONFIG_MPC85xx_CDS) +=3D mpc85xx_cds.o obj-$(CONFIG_MPC8536_DS) +=3D mpc8536_ds.o obj8259-$(CONFIG_PPC_I8259) +=3D mpc85xx_8259.o -obj-$(CONFIG_MPC85xx_DS) +=3D mpc85xx_ds.o p2020.o $(obj8259-y) +objpci-$(CONFIG_PCI) +=3D mpc85xx_uli.o +obj-$(CONFIG_MPC85xx_DS) +=3D mpc85xx_ds.o p2020.o $(obj8259-y) $(objpci-= y) obj-$(CONFIG_MPC85xx_MDS) +=3D mpc85xx_mds.o obj-$(CONFIG_MPC85xx_RDB) +=3D mpc85xx_rdb.o p2020.o obj-$(CONFIG_P1010_RDB) +=3D p1010rdb.o diff --git a/arch/powerpc/platforms/85xx/mpc85xx.h b/arch/powerpc/platforms= /85xx/mpc85xx.h index e792907ee3d5..b77bb9e7e79c 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx.h +++ b/arch/powerpc/platforms/85xx/mpc85xx.h @@ -21,6 +21,12 @@ void __init mpc85xx_8259_init(void); static inline void __init mpc85xx_8259_init(void) {} #endif =20 +#ifdef CONFIG_PCI +void __init mpc85xx_ds_uli_init(void); +#else +static inline void __init mpc85xx_ds_uli_init(void) {} +#endif + void __init mpc85xx_ds_pic_init(void); void __init mpc85xx_ds_setup_arch(void); void __init mpc85xx_rdb_setup_arch(void); diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platfo= rms/85xx/mpc85xx_ds.c index 011ae86d72f4..f9ac0b6022b1 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -52,38 +52,6 @@ void __init mpc85xx_ds_pic_init(void) mpc85xx_8259_init(); } =20 -static struct device_node *pci_with_uli; - -static int mpc85xx_exclude_device(struct pci_controller *hose, - u_char bus, u_char devfn) -{ - if (hose->dn =3D=3D pci_with_uli) - return uli_exclude_device(hose, bus, devfn); - - return PCIBIOS_SUCCESSFUL; -} - -static void __init mpc85xx_ds_uli_init(void) -{ - struct device_node *node; - - if (!IS_ENABLED(CONFIG_PCI)) - return; - - /* See if we have a ULI under the primary */ - - node =3D of_find_node_by_name(NULL, "uli1575"); - while ((pci_with_uli =3D of_get_parent(node))) { - of_node_put(node); - node =3D pci_with_uli; - - if (pci_with_uli =3D=3D fsl_pci_primary) { - ppc_md.pci_exclude_device =3D mpc85xx_exclude_device; - break; - } - } -} - /* * Setup the architecture */ diff --git a/arch/powerpc/platforms/85xx/mpc85xx_uli.c b/arch/powerpc/platf= orms/85xx/mpc85xx_uli.c new file mode 100644 index 000000000000..f91fe860985b --- /dev/null +++ b/arch/powerpc/platforms/85xx/mpc85xx_uli.c @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * MPC85xx PCI functions for DS Board Setup + * + * Author Xianghua Xiao (x.xiao@freescale.com) + * Roy Zang + * - Add PCI/PCI Exprees support + * Copyright 2007 Freescale Semiconductor Inc. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include "smp.h" + +#include "mpc85xx.h" + +static struct device_node *pci_with_uli; + +static int mpc85xx_exclude_device(struct pci_controller *hose, + u_char bus, u_char devfn) +{ + if (hose->dn =3D=3D pci_with_uli) + return uli_exclude_device(hose, bus, devfn); + + return PCIBIOS_SUCCESSFUL; +} + +void __init mpc85xx_ds_uli_init(void) +{ + struct device_node *node; + + /* See if we have a ULI under the primary */ + + node =3D of_find_node_by_name(NULL, "uli1575"); + while ((pci_with_uli =3D of_get_parent(node))) { + of_node_put(node); + node =3D pci_with_uli; + + if (pci_with_uli =3D=3D fsl_pci_primary) { + ppc_md.pci_exclude_device =3D mpc85xx_exclude_device; + break; + } + } +} --=20 2.39.1 From nobody Wed Sep 10 21:46:43 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40023C636D6 for ; Wed, 22 Feb 2023 14:46:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232153AbjBVOqS (ORCPT ); Wed, 22 Feb 2023 09:46:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231793AbjBVOqQ (ORCPT ); Wed, 22 Feb 2023 09:46:16 -0500 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 206B43BDA0 for ; Wed, 22 Feb 2023 06:45:45 -0800 (PST) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4PMJn41HPMz9sTY; Wed, 22 Feb 2023 15:43:36 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9dyDVIQfupDu; Wed, 22 Feb 2023 15:43:36 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4PMJmx0Q26z9sTB; Wed, 22 Feb 2023 15:43:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id ED99C8B786; Wed, 22 Feb 2023 15:43:28 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 4iTAaJkG6YZU; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 9AA768B78C; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 31MEhNA91187141 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 22 Feb 2023 15:43:23 +0100 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 31MEhNkg1187140; Wed, 22 Feb 2023 15:43:23 +0100 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Michael Ellerman , Nicholas Piggin Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v4 14/17] powerpc/85xx: p2020: Unify .setup_arch and .init_IRQ callbacks Date: Wed, 22 Feb 2023 15:43:01 +0100 Message-Id: <2d1831d5e1909bd415073a776f391b3f52016710.1677076552.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Developer-Signature: v=1; a=ed25519-sha256; t=1677076980; l=3876; i=christophe.leroy@csgroup.eu; s=20211009; h=from:subject:message-id; bh=O2l9QHBd+AJ68A/OHfStag+aRq9hgZ+JuScdkzGkTiE=; b=N90xsCpnuNjSQxcHW8vzaOJlqJh9OmnO3vPKrNPPnvc4OTOJbxO3DA2sRj+bqW9zYFWy4p940ceg Wc9BvMtFBxomDvPDqvdIF5ee94ub+3WJPNX6oZ6dQi2y2rPPInet X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pali Roh=C3=A1r Make just one .setup_arch and one .init_IRQ callback implementation for all P2020 board code. This deduplicate repeated and same code. Signed-off-by: Pali Roh=C3=A1r Signed-off-by: Christophe Leroy Reviewed-by: Pali Roh=C3=A1r --- arch/powerpc/platforms/85xx/mpc85xx.h | 5 --- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 4 +-- arch/powerpc/platforms/85xx/p2020.c | 38 +++++++++++++++++++---- 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx.h b/arch/powerpc/platforms= /85xx/mpc85xx.h index b77bb9e7e79c..0be681526a1a 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx.h +++ b/arch/powerpc/platforms/85xx/mpc85xx.h @@ -27,9 +27,4 @@ void __init mpc85xx_ds_uli_init(void); static inline void __init mpc85xx_ds_uli_init(void) {} #endif =20 -void __init mpc85xx_ds_pic_init(void); -void __init mpc85xx_ds_setup_arch(void); -void __init mpc85xx_rdb_setup_arch(void); -void __init mpc85xx_rdb_pic_init(void); - #endif diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platf= orms/85xx/mpc85xx_rdb.c index d1f497e086ed..aee12e68e46d 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c @@ -29,7 +29,7 @@ =20 #include "mpc85xx.h" =20 -void __init mpc85xx_rdb_pic_init(void) +static void __init mpc85xx_rdb_pic_init(void) { struct mpic *mpic; int flags =3D MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU; @@ -48,7 +48,7 @@ void __init mpc85xx_rdb_pic_init(void) /* * Setup the architecture */ -void __init mpc85xx_rdb_setup_arch(void) +static void __init mpc85xx_rdb_setup_arch(void) { if (ppc_md.progress) ppc_md.progress("mpc85xx_rdb_setup_arch()", 0); diff --git a/arch/powerpc/platforms/85xx/p2020.c b/arch/powerpc/platforms/8= 5xx/p2020.c index 1b0def607749..684ad1ea7362 100644 --- a/arch/powerpc/platforms/85xx/p2020.c +++ b/arch/powerpc/platforms/85xx/p2020.c @@ -34,6 +34,32 @@ =20 #include "mpc85xx.h" =20 +static void __init p2020_pic_init(void) +{ + struct mpic *mpic; + int flags =3D MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU; + + mpic =3D mpic_alloc(NULL, 0, flags, 0, 256, " OpenPIC "); + + if (WARN_ON(!mpic)) + return; + + mpic_init(mpic); + mpc85xx_8259_init(); +} + +/* + * Setup the architecture + */ +static void __init p2020_setup_arch(void) +{ + swiotlb_detect_4g(); + fsl_pci_assign_primary(); + mpc85xx_ds_uli_init(); + mpc85xx_smp_init(); + mpc85xx_qe_par_io_init(); +} + #ifdef CONFIG_MPC85xx_DS machine_arch_initcall(p2020_ds, mpc85xx_common_publish_devices); #endif /* CONFIG_MPC85xx_DS */ @@ -73,8 +99,8 @@ static int __init p2020_rdb_pc_probe(void) define_machine(p2020_ds) { .name =3D "P2020 DS", .probe =3D p2020_ds_probe, - .setup_arch =3D mpc85xx_ds_setup_arch, - .init_IRQ =3D mpc85xx_ds_pic_init, + .setup_arch =3D p2020_setup_arch, + .init_IRQ =3D p2020_pic_init, #ifdef CONFIG_PCI .pcibios_fixup_bus =3D fsl_pcibios_fixup_bus, .pcibios_fixup_phb =3D fsl_pcibios_fixup_phb, @@ -89,8 +115,8 @@ define_machine(p2020_ds) { define_machine(p2020_rdb) { .name =3D "P2020 RDB", .probe =3D p2020_rdb_probe, - .setup_arch =3D mpc85xx_rdb_setup_arch, - .init_IRQ =3D mpc85xx_rdb_pic_init, + .setup_arch =3D p2020_setup_arch, + .init_IRQ =3D p2020_pic_init, #ifdef CONFIG_PCI .pcibios_fixup_bus =3D fsl_pcibios_fixup_bus, .pcibios_fixup_phb =3D fsl_pcibios_fixup_phb, @@ -103,8 +129,8 @@ define_machine(p2020_rdb) { define_machine(p2020_rdb_pc) { .name =3D "P2020RDB-PC", .probe =3D p2020_rdb_pc_probe, - .setup_arch =3D mpc85xx_rdb_setup_arch, - .init_IRQ =3D mpc85xx_rdb_pic_init, + .setup_arch =3D p2020_setup_arch, + .init_IRQ =3D p2020_pic_init, #ifdef CONFIG_PCI .pcibios_fixup_bus =3D fsl_pcibios_fixup_bus, .pcibios_fixup_phb =3D fsl_pcibios_fixup_phb, --=20 2.39.1 From nobody Wed Sep 10 21:46:43 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38D30C636D6 for ; Wed, 22 Feb 2023 14:50:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231200AbjBVOuA (ORCPT ); Wed, 22 Feb 2023 09:50:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231558AbjBVOt2 (ORCPT ); Wed, 22 Feb 2023 09:49:28 -0500 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C89D03B858 for ; Wed, 22 Feb 2023 06:48:55 -0800 (PST) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4PMJn857bcz9sTc; Wed, 22 Feb 2023 15:43:40 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9AecQYCvWdz0; Wed, 22 Feb 2023 15:43:40 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4PMJmx0v5Cz9sTf; Wed, 22 Feb 2023 15:43:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 0602F8B77C; Wed, 22 Feb 2023 15:43:29 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id uNvHM5itcr58; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 7CAD18B780; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 31MEhNxg1187145 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 22 Feb 2023 15:43:23 +0100 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 31MEhNKe1187144; Wed, 22 Feb 2023 15:43:23 +0100 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Michael Ellerman , Nicholas Piggin Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v4 15/17] powerpc/85xx: p2020: Define just one machine description Date: Wed, 22 Feb 2023 15:43:02 +0100 Message-Id: <843250d1ec6f7a82cd1520a49fd7a0eb11d83dca.1677076552.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Developer-Signature: v=1; a=ed25519-sha256; t=1677076980; l=3635; i=christophe.leroy@csgroup.eu; s=20211009; h=from:subject:message-id; bh=shRj6KVTCIIsJ9Wf7rHrcIzp7ViO6jdaQQYKC3uM6e0=; b=Dpr9CGHpwoyGRrKfKcxdrjR7+FKJwT8irMxB0B1rNSCyuPLzQMUkhJ0RiiXTczuQbVgR5jyXd4I0 /x/Q28vjBRcv7JWFMQuJiBHUTHU73oNBrgtcjoTaj9bAjbCH8HzT X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pali Roh=C3=A1r Combine machine descriptions and code of all P2020 boards into just one generic unified P2020 machine description. This allows kernel to boot on any P2020-based board with P2020 DTS file without need to patch kernel and define a new machine description in 85xx powerpc platform directory. Signed-off-by: Pali Roh=C3=A1r Signed-off-by: Christophe Leroy Reviewed-by: Pali Roh=C3=A1r --- arch/powerpc/platforms/85xx/p2020.c | 77 ++++++----------------------- 1 file changed, 15 insertions(+), 62 deletions(-) diff --git a/arch/powerpc/platforms/85xx/p2020.c b/arch/powerpc/platforms/8= 5xx/p2020.c index 684ad1ea7362..21584d81f3d9 100644 --- a/arch/powerpc/platforms/85xx/p2020.c +++ b/arch/powerpc/platforms/85xx/p2020.c @@ -60,83 +60,36 @@ static void __init p2020_setup_arch(void) mpc85xx_qe_par_io_init(); } =20 -#ifdef CONFIG_MPC85xx_DS -machine_arch_initcall(p2020_ds, mpc85xx_common_publish_devices); -#endif /* CONFIG_MPC85xx_DS */ - -#ifdef CONFIG_MPC85xx_RDB -machine_arch_initcall(p2020_rdb, mpc85xx_common_publish_devices); -machine_arch_initcall(p2020_rdb_pc, mpc85xx_common_publish_devices); -#endif /* CONFIG_MPC85xx_RDB */ +machine_arch_initcall(p2020, mpc85xx_common_publish_devices); =20 /* * Called very early, device-tree isn't unflattened */ -#ifdef CONFIG_MPC85xx_DS -static int __init p2020_ds_probe(void) +static int __init p2020_probe(void) { - return !!of_machine_is_compatible("fsl,P2020DS"); -} -#endif /* CONFIG_MPC85xx_DS */ + struct device_node *p2020_cpu; =20 -#ifdef CONFIG_MPC85xx_RDB -static int __init p2020_rdb_probe(void) -{ - if (of_machine_is_compatible("fsl,P2020RDB")) - return 1; - return 0; -} + /* + * There is no common compatible string for all P2020 boards. + * The only common thing is "PowerPC,P2020@0" cpu node. + * So check for P2020 board via this cpu node. + */ + p2020_cpu =3D of_find_node_by_path("/cpus/PowerPC,P2020@0"); + of_node_put(p2020_cpu); =20 -static int __init p2020_rdb_pc_probe(void) -{ - if (of_machine_is_compatible("fsl,P2020RDB-PC")) - return 1; - return 0; + return !!p2020_cpu; } -#endif /* CONFIG_MPC85xx_RDB */ - -#ifdef CONFIG_MPC85xx_DS -define_machine(p2020_ds) { - .name =3D "P2020 DS", - .probe =3D p2020_ds_probe, - .setup_arch =3D p2020_setup_arch, - .init_IRQ =3D p2020_pic_init, -#ifdef CONFIG_PCI - .pcibios_fixup_bus =3D fsl_pcibios_fixup_bus, - .pcibios_fixup_phb =3D fsl_pcibios_fixup_phb, -#endif - .get_irq =3D mpic_get_irq, - .calibrate_decr =3D generic_calibrate_decr, - .progress =3D udbg_progress, -}; -#endif /* CONFIG_MPC85xx_DS */ - -#ifdef CONFIG_MPC85xx_RDB -define_machine(p2020_rdb) { - .name =3D "P2020 RDB", - .probe =3D p2020_rdb_probe, - .setup_arch =3D p2020_setup_arch, - .init_IRQ =3D p2020_pic_init, -#ifdef CONFIG_PCI - .pcibios_fixup_bus =3D fsl_pcibios_fixup_bus, - .pcibios_fixup_phb =3D fsl_pcibios_fixup_phb, -#endif - .get_irq =3D mpic_get_irq, - .calibrate_decr =3D generic_calibrate_decr, - .progress =3D udbg_progress, -}; =20 -define_machine(p2020_rdb_pc) { - .name =3D "P2020RDB-PC", - .probe =3D p2020_rdb_pc_probe, +define_machine(p2020) { + .name =3D "Freescale P2020", + .probe =3D p2020_probe, .setup_arch =3D p2020_setup_arch, .init_IRQ =3D p2020_pic_init, #ifdef CONFIG_PCI .pcibios_fixup_bus =3D fsl_pcibios_fixup_bus, - .pcibios_fixup_phb =3D fsl_pcibios_fixup_phb, + .pcibios_fixup_phb =3D fsl_pcibios_fixup_phb, #endif .get_irq =3D mpic_get_irq, .calibrate_decr =3D generic_calibrate_decr, .progress =3D udbg_progress, }; -#endif /* CONFIG_MPC85xx_RDB */ --=20 2.39.1 From nobody Wed Sep 10 21:46:43 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11A4DC61DA4 for ; Wed, 22 Feb 2023 14:43:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232081AbjBVOnw (ORCPT ); Wed, 22 Feb 2023 09:43:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231976AbjBVOnq (ORCPT ); Wed, 22 Feb 2023 09:43:46 -0500 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DED92CC43 for ; Wed, 22 Feb 2023 06:43:39 -0800 (PST) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4PMJmy4y4Yz9sTs; Wed, 22 Feb 2023 15:43:30 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rUlg6-EnXv2G; Wed, 22 Feb 2023 15:43:30 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4PMJmw6p45z9sTL; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id D6E638B763; Wed, 22 Feb 2023 15:43:28 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id GK2RkwgZnQLQ; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 887C38B786; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 31MEhNOh1187149 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 22 Feb 2023 15:43:23 +0100 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 31MEhNqe1187148; Wed, 22 Feb 2023 15:43:23 +0100 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Michael Ellerman , Nicholas Piggin Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v4 16/17] powerpc/85xx: p2020: Enable boards by new config option CONFIG_PPC_P2020 Date: Wed, 22 Feb 2023 15:43:03 +0100 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Developer-Signature: v=1; a=ed25519-sha256; t=1677076980; l=3571; i=christophe.leroy@csgroup.eu; s=20211009; h=from:subject:message-id; bh=VJynZgkJe+0PtJlCckWYiI+qUklGW/wOyMpT2M56Xp0=; b=K7t3cvOqXCBxUN01KQg0RoicRZVbN5lUmkyhc1po+Zq9biGxcOctwR3Ku7ZX+igODMeUCwaatArb EAX8pTIjDU7quIlzzgf924JVPIvTvjsov4wtG0xN7kSv4lwZrTSJ X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pali Roh=C3=A1r Generic unified P2020 machine description which supports all P2020-based boards is now in separate file p2020.c. So create a separate config option CONFIG_PPC_P2020 for it. Previously machine descriptions for P2020 boards were enabled by CONFIG_MPC85xx_DS or CONFIG_MPC85xx_RDB option. So set CONFIG_PPC_P2020 to be enabled by default when one of those option is enabled. This allows to compile support for P2020 boards without need to have enabled support for older mpc85xx boards. And to compile kernel for old mpc85xx boards without having enabled support for new P2020 boards. Signed-off-by: Pali Roh=C3=A1r Signed-off-by: Christophe Leroy Reviewed-by: Pali Roh=C3=A1r --- arch/powerpc/platforms/85xx/Kconfig | 22 ++++++++++++++++++---- arch/powerpc/platforms/85xx/Makefile | 5 +++-- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/8= 5xx/Kconfig index b92cb2b4d54d..90665882143b 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig @@ -78,16 +78,16 @@ config MPC8536_DS This option enables support for the MPC8536 DS board =20 config MPC85xx_DS - bool "Freescale MPC8544 DS / MPC8572 DS / P2020 DS" + bool "Freescale MPC8544 DS / MPC8572 DS" select PPC_I8259 select DEFAULT_UIMAGE select FSL_ULI1575 if PCI select SWIOTLB help - This option enables support for the MPC8544 DS, MPC8572 DS and P2020 DS= boards + This option enables support for the MPC8544 DS and MPC8572 DS boards =20 config MPC85xx_RDB - bool "Freescale P102x MBG/UTM/RDB and P2020 RDB" + bool "Freescale P102x MBG/UTM/RDB" select PPC_I8259 select DEFAULT_UIMAGE select FSL_ULI1575 if PCI @@ -95,7 +95,21 @@ config MPC85xx_RDB help This option enables support for the P1020 MBG PC, P1020 UTM PC, P1020 RDB PC, P1020 RDB PD, P1020 RDB, P1021 RDB PC, P1024 RDB, - P1025 RDB, P2020 RDB and P2020 RDB PC boards + and P1025 RDB boards + +config PPC_P2020 + bool "Freescale P2020" + default y if MPC85xx_DS || MPC85xx_RDB + select DEFAULT_UIMAGE + select SWIOTLB + imply PPC_I8259 + imply FSL_ULI1575 if PCI + help + This option enables generic unified support for any board with the + Freescale P2020 processor. + + For example: P2020 DS board, P2020 RDB board, P2020 RDB PC board or + CZ.NIC Turris 1.x boards. =20 config P1010_RDB bool "Freescale P1010 RDB" diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/= 85xx/Makefile index 65abd5a161c0..82cf7d5b4913 100644 --- a/arch/powerpc/platforms/85xx/Makefile +++ b/arch/powerpc/platforms/85xx/Makefile @@ -18,13 +18,14 @@ obj-$(CONFIG_MPC85xx_CDS) +=3D mpc85xx_cds.o obj-$(CONFIG_MPC8536_DS) +=3D mpc8536_ds.o obj8259-$(CONFIG_PPC_I8259) +=3D mpc85xx_8259.o objpci-$(CONFIG_PCI) +=3D mpc85xx_uli.o -obj-$(CONFIG_MPC85xx_DS) +=3D mpc85xx_ds.o p2020.o $(obj8259-y) $(objpci-= y) +obj-$(CONFIG_MPC85xx_DS) +=3D mpc85xx_ds.o $(obj8259-y) $(objpci-y) obj-$(CONFIG_MPC85xx_MDS) +=3D mpc85xx_mds.o -obj-$(CONFIG_MPC85xx_RDB) +=3D mpc85xx_rdb.o p2020.o +obj-$(CONFIG_MPC85xx_RDB) +=3D mpc85xx_rdb.o obj-$(CONFIG_P1010_RDB) +=3D p1010rdb.o obj-$(CONFIG_P1022_DS) +=3D p1022_ds.o obj-$(CONFIG_P1022_RDK) +=3D p1022_rdk.o obj-$(CONFIG_P1023_RDB) +=3D p1023_rdb.o +obj-$(CONFIG_PPC_P2020) +=3D p2020.o $(obj8259-y) $(objpci-y) obj-$(CONFIG_TWR_P102x) +=3D twr_p102x.o obj-$(CONFIG_CORENET_GENERIC) +=3D corenet_generic.o obj-$(CONFIG_FB_FSL_DIU) +=3D t1042rdb_diu.o --=20 2.39.1 From nobody Wed Sep 10 21:46:43 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C3C8C61DA4 for ; Wed, 22 Feb 2023 14:45:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231249AbjBVOpn (ORCPT ); Wed, 22 Feb 2023 09:45:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232097AbjBVOpi (ORCPT ); Wed, 22 Feb 2023 09:45:38 -0500 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F5723BDA1 for ; Wed, 22 Feb 2023 06:45:14 -0800 (PST) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4PMJn31PSJz9sTP; Wed, 22 Feb 2023 15:43:35 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yJmwpDiuBXHU; Wed, 22 Feb 2023 15:43:35 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4PMJmx0TM4z9sTY; Wed, 22 Feb 2023 15:43:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id EE8A18B788; Wed, 22 Feb 2023 15:43:28 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id yc2ncWCyzCVj; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 6FC3C8B77B; Wed, 22 Feb 2023 15:43:28 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 31MEhN9K1187153 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 22 Feb 2023 15:43:24 +0100 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 31MEhNvG1187152; Wed, 22 Feb 2023 15:43:23 +0100 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Michael Ellerman , Nicholas Piggin Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v4 17/17] powerpc: dts: turris1x.dts: Remove "fsl,P2020RDB-PC" compatible string Date: Wed, 22 Feb 2023 15:43:04 +0100 Message-Id: <30beb56b09c3dd41b98697b9c8fcdc07855e0fda.1677076552.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Developer-Signature: v=1; a=ed25519-sha256; t=1677076980; l=1150; i=christophe.leroy@csgroup.eu; s=20211009; h=from:subject:message-id; bh=bG9LC+/RzsKhMb2UtYvyKN8HbFdY0fg+4clblaWWLts=; b=oUMbxqYKE0YZJ+UkAMwzNiEutE3G7ufryEY4TSl/eWCbN88Zc5NaV2hyqFGvB1lLRx0ORAibLTz6 xw/e3Vi2CapfjHhiCleFPC5qxidT6c2+fIkdcI83F5pR6CI+tZ0I X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pali Roh=C3=A1r "fsl,P2020RDB-PC" compatible string was present in Turris 1.x DTS file just because Linux kernel required it for proper detection of P2020 processor during boot. This was quite a hack as CZ.NIC Turris 1.x is not compatible with Freescale P2020-RDB-PC board. Now when kernel has generic unified support for boards with P2020 processors, there is no need to have this "hack" in turris1x.dts file. So remove incorrect "fsl,P2020RDB-PC" compatible string from turris1x.dts. Signed-off-by: Pali Roh=C3=A1r Signed-off-by: Christophe Leroy Reviewed-by: Pali Roh=C3=A1r --- arch/powerpc/boot/dts/turris1x.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/boot/dts/turris1x.dts b/arch/powerpc/boot/dts/tur= ris1x.dts index e9cda34a140e..a95857de6858 100644 --- a/arch/powerpc/boot/dts/turris1x.dts +++ b/arch/powerpc/boot/dts/turris1x.dts @@ -15,7 +15,7 @@ =20 / { model =3D "Turris 1.x"; - compatible =3D "cznic,turris1x", "fsl,P2020RDB-PC"; /* fsl,P2020RDB-PC is= required for booting Linux */ + compatible =3D "cznic,turris1x"; =20 aliases { ethernet0 =3D &enet0; --=20 2.39.1