From patchwork Sat Apr 8 14:01:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81221 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp891227vqo; Sat, 8 Apr 2023 07:03:32 -0700 (PDT) X-Google-Smtp-Source: AKy350ZaUS+K7mwrUAcWdzbsoBPiNsAnpZZCa454l+BmFIbTwhzpUq4KlsiR4VYDHBXOBkqRmNjN X-Received: by 2002:a17:90b:1c91:b0:22b:b832:d32 with SMTP id oo17-20020a17090b1c9100b0022bb8320d32mr6797595pjb.9.1680962612502; Sat, 08 Apr 2023 07:03:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680962612; cv=none; d=google.com; s=arc-20160816; b=GXnlRhL+pHjR9YD5JM0ynI7cXGBqlnmy10tXz8lHhqZnYXcaSgefgNa6zCDG8q1M02 wdwi/J2wQX+5DCtLCxmku5a6RpvZ8duGYgvKj3V6fUVLAmnH96YKiXhkg295EnrEL2C6 a3apJFeIlF4/JlcVw/gy7LAeKMa4FPhVTLBxNiDK9t+IQ7co6I/qA/17nNpgRmV/JsV2 xdpZSHQWOffms4OUTSWIri2d+P9tzNBxtpZ6PpA755yzukZrSigVyCyU6nHcRppnlja0 22oBwpxjX6nqmPYQ4E1/4PFnN8CXdcISu6ticblme49U3++qhSmZUFNL88SnW1Qp7aTu nb5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8gps1o87f11PqqLfhn6vxh3vr0vrM2+sD4NrQlnAlks=; b=PSTz8kM/U7fwSOiETAzJLkuuWDPfeg3yJKgTq4D8w5szGY2Ipl3KIVXifmHxuvOnrd OrB+JX4xTgiwx7RQrAMVTNYXfMC0M/44OjKtxDsazAHj3zoatb8p8O8T1OthrxORBHzw o0Dcb7FStTKD07xYwk5mmJ98RGbQtItAkCB6oYxd4W8Ej4vdBOl32NnV8nK24upCmugi NOWGSO8Pj+6J3vTVmNyiu4VRK43ubvLYQp9i7uJCO0XURo/uQ85fLd1fh6LtgzFJtmHE oaOHDjINBFYn2pCRJcuLiiLEpAkpo71ZP1T4dfCpMq6OlyzDl5JEOzDrf+HlU3aOT5es MrFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="BX/RaH8w"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x12-20020a17090a8a8c00b0023d1463524dsi6066767pjn.113.2023.04.08.07.03.20; Sat, 08 Apr 2023 07:03:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="BX/RaH8w"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229916AbjDHOCj (ORCPT + 99 others); Sat, 8 Apr 2023 10:02:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229540AbjDHOCe (ORCPT ); Sat, 8 Apr 2023 10:02:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DDC8EF92 for ; Sat, 8 Apr 2023 07:02:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C00886158D for ; Sat, 8 Apr 2023 14:02:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F25CC4339B; Sat, 8 Apr 2023 14:02:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680962548; bh=j6cuKCL8daQ4YjtlzqbN7C113FAR+BvOj+ptz+yrr+s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BX/RaH8wjzhP+zDsQEIBv8GZ4xZ7X4mioXuKhKe09FxtjmZw1MbKvEe+4cJX11164 zT8nNldgw3qrmW2ILjuldN3n4yIg1Q3BqREGSUOziM2poySlU/asXG2dRboejZY7Xb ItUV3ybPI4TzXgMucWgjWKwgCCegPlgbxmoT4JeqqI2NvjQQ4Q7oO3YHYi9v3PTRkd uV4Cfn8CnygHmlr+ElnS6fD8+addmvf5qzPVHzE82H9BDNRNvhPplCbdZ/lBWbb6ZU LH1fKgYzYnbmiEKcwl1N7xXVLrzKkQ+/SRTJ8m52a0cGCptW4L8rG8STOscdKXd90t tNDwrcynHh5WA== Received: by pali.im (Postfix) id A90771BE4; Sat, 8 Apr 2023 16:02:25 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 01/13] powerpc/85xx: Remove DBG() macro Date: Sat, 8 Apr 2023 16:01:10 +0200 Message-Id: <20230408140122.25293-2-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408140122.25293-1-pali@kernel.org> References: <20230408140122.25293-1-pali@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762617052516274781?= X-GMAIL-MSGID: =?utf-8?q?1762617052516274781?= From: Christophe Leroy 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 Signed-off-by: Pali Rohár --- 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/platforms/85xx/mpc85xx_ds.c index c474da3eeea8..25edfe1b8ae1 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -34,14 +34,6 @@ #include "mpc85xx.h" -#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; } - DBG("mpc85xxds: cascade mapped to irq %d\n", cascade_irq); + pr_debug("mpc85xxds: cascade mapped to irq %d\n", cascade_irq); i8259_init(cascade_node, 0); of_node_put(cascade_node); diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c index 28a04928250f..0546f19416c2 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c @@ -49,13 +49,6 @@ #include "mpc85xx.h" -#undef DEBUG -#ifdef DEBUG -#define DBG(fmt...) udbg_printf(fmt) -#else -#define DBG(fmt...) -#endif - #if IS_BUILTIN(CONFIG_PHYLIB) #define MV88E1111_SCR 0x10 diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c index aa24793ad25c..acc4145adcf7 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c @@ -29,15 +29,6 @@ #include "mpc85xx.h" -#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; From patchwork Sat Apr 8 14:01:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81224 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp903385vqo; Sat, 8 Apr 2023 07:25:05 -0700 (PDT) X-Google-Smtp-Source: AKy350aGR6w3xQpfx0TNhtFwQjMZOyHJ2wOqPEZzD78eW1ONbbgZa3Sv0eStn5V0G98SQ5UVDtz9 X-Received: by 2002:a05:6402:6ce:b0:4af:6c5e:225c with SMTP id n14-20020a05640206ce00b004af6c5e225cmr4937717edy.33.1680963905790; Sat, 08 Apr 2023 07:25:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680963905; cv=none; d=google.com; s=arc-20160816; b=srwLLx9+Bp7/+p1JKGx/08Bog0HnxynarEHyFQAmi0oEOgFIz7Y10+quXN70sdQbBE sZIotcCWCY1m+yXo2wq/dvE8VkVmACGhGmFPuahYjZGvSoPmLQU9EdVQcz1vJSfAjeXI y7Sqh7gjwprGUEu5uvG8tXwGOxuzKt/6gylgoEUrZT3RjVg9eXZGgWUTxLswslYVz2Y/ pG53EF9IlL81h/98C+SHbEMNq9BnHyP3LBaNuFvBNcUiqCjXx7YO5eQtdMRuqpf+c+4/ gN8LueGC2BvDWzq2K2T4/J8o76ym1jB7RJNTUKCRKPgX3hKff37Zl1gtmm1fMRWFmOjK Ve8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=u3DWw7LeGVUXKqZ7zi0+pDAM1BglSJxpia4mYyLPJds=; b=dwfEzySKW5yxCoP1Y1gtlBXwpGm6TTvatd8bmGxgC4BsqPHBzh/lOmcJvKoTtuhEAd 4KSRh8ugyu7p+XinnAkJtFNNg6sSRTuV+Oz/ukZUjPA56kwDQCydyHEQDh5eLbmmsWTL JbGCu/M9r2gcfrNTh5QClXDkP7DV0ftr87WSCe8zM/J3Te0vvQFgfyJAVn7x7LEDROcC zJp0W1NhHU4BqYxFyFziskVrV2zZDRkZFH9Y6JVgeaM2YQk66zFXG+w8oFH56K0lPxoc L26v6GHQi7MdHKcAugEIJzSt5404Gf+B3jrCyKQsKHbHlMTAFbOFIM1xcJfS4nu19bH8 WHqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JTlRNgAr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h17-20020aa7de11000000b005048c65e064si1180155edv.452.2023.04.08.07.24.41; Sat, 08 Apr 2023 07:25:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JTlRNgAr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229996AbjDHOCo (ORCPT + 99 others); Sat, 8 Apr 2023 10:02:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229721AbjDHOCe (ORCPT ); Sat, 8 Apr 2023 10:02:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AAF6EFBD for ; Sat, 8 Apr 2023 07:02:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C96136142C for ; Sat, 8 Apr 2023 14:02:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13F5CC433EF; Sat, 8 Apr 2023 14:02:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680962548; bh=z4CMNIF+qP0p1YpfeYDlFb1xIAtUPldYnJb0Qxk6MbA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JTlRNgAr6TjlIcgmsijbR4WXf7ZyxtKssulrtvr2jCkDNoKJTRgR9WpZejL5SFGbH 0MdsufXtLcjQ2Ojiv1yUOYYT+j2kYkVceCybtLtuZBe7gU4lZRxpHE4D81TCR7p72q naKzPrvJPRNB+27A4b/2NezePV2LLg0iv0xY/LWJzMwfUb8Znxmf9mRXlDf9N2V+TG KaSx8wA4akLn9zUPLzOVUuWqO7syL16K5yDUBIkGANHcx50HIPoM4kJQD46zneXzBz fLhDcdWR/xKZU2v/MpkpZgvOxaMD1VQd0r1TcjP4ywsZmQiqosbnK5YwFWE7VB93mv cazH65j0kHJew== Received: by pali.im (Postfix) id CC2521C97; Sat, 8 Apr 2023 16:02:25 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 02/13] powerpc/85xx: mpc85xx_{ds/rdb} compact the call to mpic_alloc() Date: Sat, 8 Apr 2023 16:01:11 +0200 Message-Id: <20230408140122.25293-3-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408140122.25293-1-pali@kernel.org> References: <20230408140122.25293-1-pali@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762618408596261352?= X-GMAIL-MSGID: =?utf-8?q?1762618408596261352?= From: Christophe Leroy Reduce number of lines in the call to mpic_alloc(). Signed-off-by: Christophe Leroy Signed-off-by: Pali Rohár --- 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/platforms/85xx/mpc85xx_ds.c index 25edfe1b8ae1..c6016915264c 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 = MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU; #ifdef CONFIG_PPC_I8259 struct device_node *np; struct device_node *cascade_node = NULL; int cascade_irq; #endif - if (of_machine_is_compatible("fsl,MPC8572DS-CAMP")) { - mpic = mpic_alloc(NULL, 0, - MPIC_NO_RESET | - MPIC_BIG_ENDIAN | - MPIC_SINGLE_DEST_CPU, - 0, 256, " OpenPIC "); - } else { - mpic = mpic_alloc(NULL, 0, - MPIC_BIG_ENDIAN | - MPIC_SINGLE_DEST_CPU, - 0, 256, " OpenPIC "); - } + + if (of_machine_is_compatible("fsl,MPC8572DS-CAMP")) + flags |= MPIC_NO_RESET; + + mpic = mpic_alloc(NULL, 0, flags, 0, 256, " OpenPIC "); BUG_ON(mpic == NULL); mpic_init(mpic); diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c index acc4145adcf7..c7ce8a79992d 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 = MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU; - if (of_machine_is_compatible("fsl,MPC85XXRDB-CAMP")) { - mpic = mpic_alloc(NULL, 0, MPIC_NO_RESET | - MPIC_BIG_ENDIAN | - MPIC_SINGLE_DEST_CPU, - 0, 256, " OpenPIC "); - } else { - mpic = mpic_alloc(NULL, 0, - MPIC_BIG_ENDIAN | - MPIC_SINGLE_DEST_CPU, - 0, 256, " OpenPIC "); - } + if (of_machine_is_compatible("fsl,MPC85XXRDB-CAMP")) + flags |= MPIC_NO_RESET; + + mpic = mpic_alloc(NULL, 0, flags, 0, 256, " OpenPIC "); BUG_ON(mpic == NULL); mpic_init(mpic); From patchwork Sat Apr 8 14:01:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81231 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp907522vqo; Sat, 8 Apr 2023 07:33:31 -0700 (PDT) X-Google-Smtp-Source: AKy350YhBozT2iLhZP316BsnbKiva4vJu7aV8LtDN16cY4qUHwk5mnUA4X+88js/BNM/IFhLyZrh X-Received: by 2002:a17:902:dad1:b0:1a2:7d:17f2 with SMTP id q17-20020a170902dad100b001a2007d17f2mr7184160plx.69.1680964411497; Sat, 08 Apr 2023 07:33:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680964411; cv=none; d=google.com; s=arc-20160816; b=RWRM6BzeoS8bAECd4fkWShVIDbd3WmZD2nBaNc9bXs6LBc27vr1gY1XaafqjWnsgaA k90oKkplrkRw5l5i3ohInibTtdWFklIPaLHrZU+EAjm2gBUxvJLkMwLBip0v7NXBC/kP Q0NNmPA1OQ5WjVqAsihqFkfpRzXf24NWKeHAYEIRSzJYzwWVXb7O+VzEA4CVLKwhyYLQ 6U3mIbKX6o+ROL48yo6/Zi7KaIl2ypKE6nAeiqxh/KXoUTKYUtC5U9GGyuAGHRiforvB NAUXmH8kjhIffSRnslmLB6uon48+UQOe6GAqpGZDQb8VHpMsiMEirHNCAz+YSPIwML2s koYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Mk351Ml+vIs78ZOe9f4tkYXtHAofgpeA4vqYZ4m9XMI=; b=ZjL7tjfx+woG+/DJaKhJKUexsSZNRrC+9CFkcIX+hJSmQ5PneIWwC064rDfbhFU/G3 oCI+rYDmyYEnkGUO05m0x3qbRo7D5IGiJkL2iySnzjW1lK87q+VswQoVnA56oCkXmfr3 FGlePNRZkXgCY6rsqYUStpoQB/tM1IzNZPDHNDdklwehkIiKHcEha8bFEg3ZMRhHBmbv dsDa7wxhnXo8BGlZXe+z1yswFLmVPywBLe193fcqq8R3HyKmlsqM0SBsU6WjjLzO0PwQ yzsU3bAZbaFoRbCi1N3hHPZr4TZPeaa3kJcIdWrWpnriPYIWUPUKWdC0hnyAqGZbPdGh muyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aAFWvUzO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a19-20020a1709027d9300b001a1faf63622si6149132plm.464.2023.04.08.07.33.18; Sat, 08 Apr 2023 07:33:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aAFWvUzO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229957AbjDHOCm (ORCPT + 99 others); Sat, 8 Apr 2023 10:02:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229770AbjDHOCe (ORCPT ); Sat, 8 Apr 2023 10:02:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1CFFFF01 for ; Sat, 8 Apr 2023 07:02:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 212FD61595 for ; Sat, 8 Apr 2023 14:02:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59ED7C4339C; Sat, 8 Apr 2023 14:02:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680962548; bh=JyNl4ARckRodp1O8pkh/0UW7Q6hGHn4B98FxtpuA1Dk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aAFWvUzOXYu18nPeredW7o6B3Fa9NCeR9t0aWYkUFruuCfIl5mv2wOOjnSZO/9JBU JTo0nEZEu+tEXfY1BlYSXhYMcRpEWqBP41/oxdrve1dAan2Chh+iWSLfefRQTElU16 5DXmVRnUbdT+7Uv94BjavuD/SPD7LQJ8oEQkNT6FKd6buxiEgluzPfosVMesHSTxKb qXhQc+kXEHpWf+wOyz57N246mb/Eb3IGlr4NKUHIANRKeY1VVmEAU/spRniEFZjsVx wvzgkvrKJor8awTg+FyGOu1fB2o/OtwO65EdEK+yxGANxvBaMoQe5w5+V9/WHqNHzc Go1R6+MbULNXw== Received: by pali.im (Postfix) id 010B52047; Sat, 8 Apr 2023 16:02:25 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 03/13] powerpc/85xx: mpc85xx_{ds/rdb} replace BUG_ON() by WARN_ON() Date: Sat, 8 Apr 2023 16:01:12 +0200 Message-Id: <20230408140122.25293-4-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408140122.25293-1-pali@kernel.org> References: <20230408140122.25293-1-pali@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762618938924009427?= X-GMAIL-MSGID: =?utf-8?q?1762618938924009427?= From: Christophe Leroy No need to BUG() in case mpic_alloc() fails. Use WARN_ON(). Signed-off-by: Christophe Leroy Signed-off-by: Pali Rohár --- 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/platforms/85xx/mpc85xx_ds.c index c6016915264c..98cca1102e0b 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) mpic = mpic_alloc(NULL, 0, flags, 0, 256, " OpenPIC "); - BUG_ON(mpic == NULL); + if (WARN_ON(!mpic)) + return; + mpic_init(mpic); #ifdef CONFIG_PPC_I8259 diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c index c7ce8a79992d..a802053b37b3 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) mpic = mpic_alloc(NULL, 0, flags, 0, 256, " OpenPIC "); - BUG_ON(mpic == NULL); + if (WARN_ON(!mpic)) + return; + mpic_init(mpic); } From patchwork Sat Apr 8 14:01:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81222 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp891341vqo; Sat, 8 Apr 2023 07:03:42 -0700 (PDT) X-Google-Smtp-Source: AKy350YePHOfT6U8ws+uWWHZCi1qYzp00eqxgRYDZNcuMMzDenEKEdHsM/YQJU4Wdhw+IJHV8WsI X-Received: by 2002:a17:902:e749:b0:1a2:19c1:a952 with SMTP id p9-20020a170902e74900b001a219c1a952mr7570406plf.61.1680962622489; Sat, 08 Apr 2023 07:03:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680962622; cv=none; d=google.com; s=arc-20160816; b=FX9IAt1I1VVx+fVHrlL+C4wSCQSta7IXA/hN8psFVgIsqPH89Rxbxh3TZBPn5c2jI6 CSve1uv+enIS4pXfR1eUU+RV+Gd/b8u5ShePaKPxinAj3eCv0haxk3KCur2vS7OvBeoz ehJkNj2rY/ZXEM0peRtPHocJxlqXdhC8BL5SJQ0FYMRKZYF5Ap1DH3Z8R8hzSQYwyWcM lAE1R/RoL0keRMx8JKTJir6ekZzD0QnMiphMbUv922zblQjUha8AHEzGI6joRT0lHs7Y A8ku+Cm+yMdVBAklQwHqWwj3q38TWU5RAw5Zd57B06swO0w3+771XZKq+XB0qFMXRQGl Efig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=W+CtITXZLm6pqnel90rDmMI753VThd3I5i2k9Treixw=; b=FLZYBnutepgaPHEY3jXj3Vqoy7BOK/fArhlrVqAmDVdaBjJZsMPg/MZs7fCHl+tKAE WmRiY6iEJa1V+W96cxJAvEY55cjmdBpWJ5wlMonMIT1RjBZfawwFbN9iWr6Z8aSCxMyv J/SmR+LaWYuXLXDjaFLah2FdJqUrtd+xygkP7dPUEvIHJTCxpDgrTWztLLejomOUyb6L HpU3cGD8NyDJD/9VvNY/nMH1xBBz6ga4VR99LGH4cP5qHegBO3MIPCIkc0PhQhuDkDMZ wa6rsFvi1YJldIgqwQUoPuWg8im7Hx60trhdoSVhmuhDRUllFtTuGFbBHCqvalvDxt7f sSnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PcQ+lKN7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s2-20020a170902ea0200b001a22e9d0291si6729901plg.570.2023.04.08.07.03.29; Sat, 08 Apr 2023 07:03:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PcQ+lKN7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230038AbjDHOCs (ORCPT + 99 others); Sat, 8 Apr 2023 10:02:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229698AbjDHOCf (ORCPT ); Sat, 8 Apr 2023 10:02:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAB03FF09 for ; Sat, 8 Apr 2023 07:02:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 41EB061598 for ; Sat, 8 Apr 2023 14:02:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81AB5C4339E; Sat, 8 Apr 2023 14:02:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680962548; bh=BetVWQQ1Px1KBs5A5CIK9YDSLjKUAhqlUhnTQwa8n9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PcQ+lKN74rGwX1D5L7CC8afdmO61Wr7xmapsvOnd7/6PRzFm6KqLiT9KZcP5B3JqU 3VdYaIvy5mPjPDSFQi0bnu7kypznqauVlK+YREwTLoTlhI/7rszE561buBRPGVctk+ kZH189Yv80NPvdF2QauURCZ6j7iRwuTaTvgetRD5aQj6MgF/0JgIPIUV1pS7RUKqgf +I7+VmnD4DSWVCMWRZCB1jk3qJbmYmQ/r4pVkX7NW1C3oJNiBgOLWcAqL5IRwKE1dP ExpM/ZopX0NGZjBbYThd3oifZiCybr/7LJZi05rpkkYz1mrGGQNodgOpjPLQYCuOkt HKG7GfOKwA7Tg== Received: by pali.im (Postfix) id 28365209C; Sat, 8 Apr 2023 16:02:26 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 04/13] powerpc/85xx: mpc85xx_{ds/rdb} replace prink by pr_xxx macro Date: Sat, 8 Apr 2023 16:01:13 +0200 Message-Id: <20230408140122.25293-5-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408140122.25293-1-pali@kernel.org> References: <20230408140122.25293-1-pali@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762617062856416321?= X-GMAIL-MSGID: =?utf-8?q?1762617062856416321?= From: Christophe Leroy 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 Signed-off-by: Pali Rohár --- 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/platforms/85xx/mpc85xx_ds.c index 98cca1102e0b..d8d13438e18f 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) } if (cascade_node == NULL) { - printk(KERN_DEBUG "Could not find i8259 PIC\n"); + pr_debug("Could not find i8259 PIC\n"); return; } cascade_irq = 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; } @@ -108,7 +108,7 @@ static void __init mpc85xx_ds_setup_arch(void) uli_init(); mpc85xx_smp_init(); - printk("MPC85xx DS board from Freescale Semiconductor\n"); + pr_info("MPC85xx DS board from Freescale Semiconductor\n"); } machine_arch_initcall(mpc8544_ds, mpc85xx_common_publish_devices); diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c index a802053b37b3..64badacf126d 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 */ - printk(KERN_INFO "MPC85xx RDB board from Freescale Semiconductor\n"); + pr_info("MPC85xx RDB board from Freescale Semiconductor\n"); } machine_arch_initcall(p2020_rdb, mpc85xx_common_publish_devices); From patchwork Sat Apr 8 14:01:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81223 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp891354vqo; Sat, 8 Apr 2023 07:03:44 -0700 (PDT) X-Google-Smtp-Source: AKy350Z62A0hYyxg4uv41rZc2zcqmUd8So5cdS1IKwYbLbnVr6s58lbtuuoy9xg0XHfBb7P4oG1R X-Received: by 2002:a05:6a20:c527:b0:d9:adc3:6a6e with SMTP id gm39-20020a056a20c52700b000d9adc36a6emr4420227pzb.56.1680962623907; Sat, 08 Apr 2023 07:03:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680962623; cv=none; d=google.com; s=arc-20160816; b=yfNcwXxTvnxweAXz943e1t5dlyz/oFAi/Evl4+0sjzPau0SgJ51HTl+xzOQn6Xl4s4 s2E0x3IvagzELR/WFoYp29+v+pAfnZMLI1xV18bZ165nF7Q4uvHnOBQcxmjZNZ99lOjb U8LUGCVuQtJJC2PA5OrTRBw6hRaDV9hUwoa/PJxiw2FMIE/9cRp7k3kEVMosmALBAVb5 bAHOHEf/LfSgFFHO7nuaaVSGUVYiKr3ykYk3etvl86ncTwEXfLcSENzQrxnNJQIwq+e8 Y4t5f+nnFAUEMg+NsnuwJQp1p5UkDVBGj52KfJ2EILSimUMipjqoNao01ZPTRuxSaTxw aaWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/1vpvubavBSyVGidKcdknStxOcjoTeeHq/6CZ6Ur3iA=; b=I2gcKf55NofPqXnQZaNyVnS1oWQynrpxxg+UlDKNpkbCweqFUBrLHd0h7Y+m+WAIY1 9yyoXGGLAq5fBQltQD2yTGW2FeE5J7bcVT6iTAjM2QGLNg1JW51vtwaUtSZ/D/agBKoy ib2DhZXhEwFSvuZWgRbYFbZOrks7HMsCsvyVFMy9FGW0oH/ANNUl3k/WP6PpSKBlVCyt qFkzzoqXDgCxH5TsJ0ILDAe82r3AVy55jFnW3XM1Vd7t8rtb9MljvtgOwLXfSTtkbdrY Zd/u9XokgbiPJ3+v77Atm0yUmyCm+G+XZYnZxJhAicEzpLzv1Yf5EkvT+Mp7LBqRnx5i /2rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d63wSgO8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a31-20020a631a5f000000b005141973fd45si5880222pgm.329.2023.04.08.07.03.31; Sat, 08 Apr 2023 07:03:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d63wSgO8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230075AbjDHOCv (ORCPT + 99 others); Sat, 8 Apr 2023 10:02:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229839AbjDHOCh (ORCPT ); Sat, 8 Apr 2023 10:02:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE582EF96 for ; Sat, 8 Apr 2023 07:02:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5656861596 for ; Sat, 8 Apr 2023 14:02:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92FCCC433A1; Sat, 8 Apr 2023 14:02:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680962548; bh=Rp++EnLZvDWAyB3q+nRICzltKHVA/IpPx8P+WV9axbQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d63wSgO8NZTCjjxPXd+AmDEIQe+gyDYiMgcKB8PSi4WpJqpieDf5zMXaM0MXknU3H hNvoseYGoWP+XqUj9z05uG/IRYTB6bjtf++dRdJ0QWv9zcxbCiE3PIFrYxmI8pHKAK xEQt3+R4OuIta+Dtbh2cSfbrfRQTdau7nhXXoFCFrqRFh3FDBb0fZbH/jTvWF6Sn6u po2epwl+rSDUnJ62BpssBUkJ+s4DGZ3YbeQ8q+xOtkBkhs8PWLuXVyAmRNtfcXsh9N rAVMWtCNFp8jq7mZDr7D2FLJoAuhLu/djyHxdS/+tFCP03/vCA4rlxOH3xf93knNFp dLxyieFTLfNYw== Received: by pali.im (Postfix) id 66F7D20A8; Sat, 8 Apr 2023 16:02:26 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 05/13] powerpc/85xx: Remove #ifdefs CONFIG_PPC_I8259 in mpc85xx_ds Date: Sat, 8 Apr 2023 16:01:14 +0200 Message-Id: <20230408140122.25293-6-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408140122.25293-1-pali@kernel.org> References: <20230408140122.25293-1-pali@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762617064224004873?= X-GMAIL-MSGID: =?utf-8?q?1762617064224004873?= From: Christophe Leroy 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 Signed-off-by: Pali Rohár --- 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/platforms/85xx/mpc85xx_ds.c index d8d13438e18f..4ae300e76c2d 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -34,7 +34,6 @@ #include "mpc85xx.h" -#ifdef CONFIG_PPC_I8259 static void mpc85xx_8259_cascade(struct irq_desc *desc) { struct irq_chip *chip = 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 */ -void __init mpc85xx_ds_pic_init(void) +static void __init mpc85xx_8259_init(void) { - struct mpic *mpic; - int flags = MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU; -#ifdef CONFIG_PPC_I8259 struct device_node *np; struct device_node *cascade_node = NULL; int cascade_irq; -#endif - if (of_machine_is_compatible("fsl,MPC8572DS-CAMP")) - flags |= MPIC_NO_RESET; - - mpic = mpic_alloc(NULL, 0, flags, 0, 256, " OpenPIC "); - - if (WARN_ON(!mpic)) + if (!IS_ENABLED(CONFIG_PPC_I8259)) return; - 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); 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 = MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU; + + if (of_machine_is_compatible("fsl,MPC8572DS-CAMP")) + flags |= MPIC_NO_RESET; + + mpic = mpic_alloc(NULL, 0, flags, 0, 256, " OpenPIC "); + + if (WARN_ON(!mpic)) + return; + + mpic_init(mpic); + + mpc85xx_8259_init(); } /* From patchwork Sat Apr 8 14:01:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81230 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp907503vqo; Sat, 8 Apr 2023 07:33:30 -0700 (PDT) X-Google-Smtp-Source: AKy350aSCpBihKSfB2k/4AO5HNh+/Nl3JAbSJCx+TVLIe6sBBxxk20+BoqJdRwlVEFJO3+mrysHO X-Received: by 2002:a17:90a:193:b0:23f:7d05:8762 with SMTP id 19-20020a17090a019300b0023f7d058762mr6537815pjc.23.1680964409734; Sat, 08 Apr 2023 07:33:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680964409; cv=none; d=google.com; s=arc-20160816; b=XyctXvPcqy6t9BbWd9hR8HC7JRn+g77UD0fZRuBcj4/c6KT/IG8SW+nR09m9wXiVlk d4TTg1E57470pyFu0HwTmupYVCkZ64Z/wXJa6LEHAv1NiOkJeQjjEqChoQsu6znvbz0x y03ZqkDuYnxUK4gSw/5dEEIsRtjEkPCFcxYeIVIdxJVuMd+LQn+8YypKQ819D4CjfuBQ X64UAAplqK6A9+hW7tj6t7MdQl5eGK0VWnlHyvNq+agw7phkt8f8TYDwi7Ehvd0mMtAF NLtJ4Nf2/EAVgKWIwqPV9JQT1wxhf22r4WCRRWm3xrTNXjHkjpP2WCD8x9fUfi0ebRaz 7+gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WtN7zYqB8p85xQMjcxuuVz1iVUwUD1/BRBloG12ijH0=; b=JiruEtdY9thyDQRE9CiUSYCGmybyueG57tqb/kKqeXS7hQn+qRBykEf+e2j9a8h7oo aMtsUskPKaaPS6vaKsIpBt5tYk7MY1qdZCw3+B8Z8VfyPSdbSfZZXBkdAU1qzNQih//X U5FIutleGP0HSn8NUuy4BG4PN8tbR3sE6Sap/GZVNPAxz4JI2sSNtymM54BMB1Urs31Q au1iqgj3GHcPbsbwziN/KQesPJ16j2bYQQ4Oip2cb4OVs9wMNihL9gmYicf56UKaIk3w 1JL9UXdJXcpKLnBzDpiRkJV5niaiCdPdjZD3CVNEI/lwMEb+VXMJD5v1x0CHXrzGR/eK YReA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UPnN8Gzz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q5-20020a17090311c500b001a217a73d56si6946760plh.161.2023.04.08.07.33.17; Sat, 08 Apr 2023 07:33:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UPnN8Gzz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229896AbjDHOCz (ORCPT + 99 others); Sat, 8 Apr 2023 10:02:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229852AbjDHOCh (ORCPT ); Sat, 8 Apr 2023 10:02:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0583EF99 for ; Sat, 8 Apr 2023 07:02:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 59C686159D for ; Sat, 8 Apr 2023 14:02:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A8D9C433A0; Sat, 8 Apr 2023 14:02:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680962548; bh=GGCC6nIysok7nRf7iQxTO/BAJu5Xzrmg55AbDqZKllk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UPnN8GzzL8eSxC1PHevEiO0J6Y3trRJtHFRr9FNNO/ug6afpyJzXnxKCIObo0eB9Q ctTRyaNDi78kHf/33i0MfdM2rN88ZBkjsJwLtDKbtKcZBrYWQy2juJoTANT2tq9pP3 /YrkOHisbFnduPcDzguSX27zC7gt6Xk4ZE1sOjwwfb3NfHvg4ut7+90Cle8rxI1xTq cLOQJCimaVkVJaeJEV9MwhI9f5ixfsfDqq0m5eXOzXOEtZHF+ex5q1fH9uuNvVSbcv g/w1lKEP5eDDq1WWIBX8uNTQaPJTyVwgKi/O2appN15WD/ynNPM4Ye5GJ9op11ObJY zj9bu1+1M8VGQ== Received: by pali.im (Postfix) id A01CA20C8; Sat, 8 Apr 2023 16:02:26 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 06/13] powerpc/85xx: Remove #ifdef CONFIG_QUICC_ENGINE in mpc85xx_rdb Date: Sat, 8 Apr 2023 16:01:15 +0200 Message-Id: <20230408140122.25293-7-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408140122.25293-1-pali@kernel.org> References: <20230408140122.25293-1-pali@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762618936678347275?= X-GMAIL-MSGID: =?utf-8?q?1762618936678347275?= From: Christophe Leroy 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 Signed-off-by: Pali Rohár --- 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/platforms/85xx/mpc85xx_rdb.c index 64badacf126d..cdafecaecf56 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) fsl_pci_assign_primary(); -#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) } #endif -#endif /* CONFIG_QUICC_ENGINE */ pr_info("MPC85xx RDB board from Freescale Semiconductor\n"); } From patchwork Sat Apr 8 14:01:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81226 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp903935vqo; Sat, 8 Apr 2023 07:26:26 -0700 (PDT) X-Google-Smtp-Source: AKy350YuUpM4776NX2eHM1ZcQcN/nzoAq6yXEx62LiSU1k1YX4ULzSgeZjkA9RhvhhJNi6yzpxyL X-Received: by 2002:a17:906:5653:b0:931:f132:5c61 with SMTP id v19-20020a170906565300b00931f1325c61mr1716731ejr.47.1680963985959; Sat, 08 Apr 2023 07:26:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680963985; cv=none; d=google.com; s=arc-20160816; b=wkaw5mvpqRTFecrPBQsmq+PiScwyHTxvpFTwV27LH/mgrTY7Wm3Kxj+CzFLXWoXEMe /Dus9Jwb0kdLFfzlrnaeLdgobRH3hHAJKuq6LE9idx6Bd1FNPAah8/GZzK4KA2KPHZNX EwCk7/as1A+7Hpq8ac3PK9jsxrtNkj2ED6jAyRaqOcpzXgiHAX/NHYp7001dwQVqf4s/ dPaCW2zzOjqjBnK2mxqY1ardm69OA3/cqhoC+9VqCpQynVGNWby+Za4zSKyzFIBq/ddS AD8LXg3Mfm10+QSt8Zb+0IE7HbaLdVPWSHV9aOuZ3lMFtl8CZcox+aLzZAOqK4PKnyMe LEvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6/l6Mh+HjWxXMk5zY0LpeJpjmj+njCscOnA1IBeqqJk=; b=YKmTdPFPsSu7vZYByh8n3WjafGzbc07hdxkOKbDoTNyWOIuIADTSsZh2zetlGLaS0t GvBratice2nM/3zXqomBkWYxih4Lk3wxyZSinaEiMK5pQmboLnl56BkZYIrOno3dC4+f Y8h/ACkeyEyV1umz2hwokcFIytuzHba1R9Mc25UOTMKzUTt1ls8//o349q3/kG5fn0GT OxrHNoiCqj3vvT6wgd0jbClXCKZIBwgYqcRQ0BjzFuOyHBCDGkLPvQm/eqOPfyx7PwDg u1UaS4VZMIQOaeQqhcHEFTS3W1/CKIs0ObsxrlxspnfIT6PHMpIIKE31Cw4UimcdmCYD 9X7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jchH2BAp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n20-20020a056402515400b005021d88ac44si4796330edd.381.2023.04.08.07.26.01; Sat, 08 Apr 2023 07:26:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jchH2BAp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230099AbjDHODB (ORCPT + 99 others); Sat, 8 Apr 2023 10:03:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229905AbjDHOCi (ORCPT ); Sat, 8 Apr 2023 10:02:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31995FF22 for ; Sat, 8 Apr 2023 07:02:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5F5FE61594 for ; Sat, 8 Apr 2023 14:02:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79470C433D2; Sat, 8 Apr 2023 14:02:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680962550; bh=c2v6S7SrkyA9rVz69Nj+MQ69+ndU/wcEsy0ubY3+aNY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jchH2BAp2vyIZoRO6phcZztt+dP4wGidcQtV4IkDPOZpN3WLcnYKfIyJo0EbAGfNz uxPeqq0VDCrrIWgqM7f/Yc+ZUY/Q8RxLNJThmpwEi4/ZDiTZp5oEdWg9uQa8deEG+o vQGnp0N5M5T0OAKO4X5qnfgi2qMM2W0pS9VGX6ZzJXunOaWCbvpKf7CGt0PJzRLR6G hbGil+jTKGWzVZCmBoryjTU8tsDfS7LWCid237SUqf+XI6CliP/VtVtkJu/k3+6vaq BM6+V7ns4VVbxXKS9mJggDOc3ZK9QSqvxJjBdUOTZswhFlWHBbq7tsjEBS8hxkpBj1 XGYGoTACRs9QQ== Received: by pali.im (Postfix) id CF3DB213C; Sat, 8 Apr 2023 16:02:26 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 07/13] powerpc/85xx: p2020: Move all P2020 DS machine descriptions to p2020.c Date: Sat, 8 Apr 2023 16:01:16 +0200 Message-Id: <20230408140122.25293-8-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408140122.25293-1-pali@kernel.org> References: <20230408140122.25293-1-pali@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762618492926361728?= X-GMAIL-MSGID: =?utf-8?q?1762618492926361728?= This moves P2020 DS machine descriptions into new p2020.c source file. This is preparation for code de-duplication and providing one unified machine description for all P2020 boards. Signed-off-by: Pali Rohár Signed-off-by: Christophe Leroy --- Changes in v5: * Fix commit message * Reduce includes --- arch/powerpc/platforms/85xx/Makefile | 2 +- arch/powerpc/platforms/85xx/mpc85xx.h | 3 ++ arch/powerpc/platforms/85xx/mpc85xx_ds.c | 16 +-------- arch/powerpc/platforms/85xx/p2020.c | 41 ++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 16 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) += mpc85xx_ads.o obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o obj-$(CONFIG_MPC8536_DS) += mpc8536_ds.o -obj-$(CONFIG_MPC85xx_DS) += mpc85xx_ds.o +obj-$(CONFIG_MPC85xx_DS) += mpc85xx_ds.o p2020.o obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o obj-$(CONFIG_MPC85xx_RDB) += mpc85xx_rdb.o obj-$(CONFIG_P1010_RDB) += 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 +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/platforms/85xx/mpc85xx_ds.c index 4ae300e76c2d..af2cafec4f0a 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -101,7 +101,7 @@ void __init mpc85xx_ds_pic_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); @@ -116,7 +116,6 @@ static void __init mpc85xx_ds_setup_arch(void) 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); define_machine(mpc8544_ds) { .name = "MPC8544 DS", @@ -143,16 +142,3 @@ define_machine(mpc8572_ds) { .get_irq = mpic_get_irq, .progress = udbg_progress, }; - -define_machine(p2020_ds) { - .name = "P2020 DS", - .compatible = "fsl,P2020DS", - .setup_arch = mpc85xx_ds_setup_arch, - .init_IRQ = mpc85xx_ds_pic_init, -#ifdef CONFIG_PCI - .pcibios_fixup_bus = fsl_pcibios_fixup_bus, - .pcibios_fixup_phb = fsl_pcibios_fixup_phb, -#endif - .get_irq = mpic_get_irq, - .progress = udbg_progress, -}; diff --git a/arch/powerpc/platforms/85xx/p2020.c b/arch/powerpc/platforms/85xx/p2020.c new file mode 100644 index 000000000000..356335122153 --- /dev/null +++ b/arch/powerpc/platforms/85xx/p2020.c @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Freescale P2020 board Setup + * + * Copyright 2007,2009,2012-2013 Freescale Semiconductor Inc. + * Copyright 2022-2023 Pali Rohár + */ + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include "smp.h" +#include "mpc85xx.h" + +#ifdef CONFIG_MPC85xx_DS +machine_arch_initcall(p2020_ds, mpc85xx_common_publish_devices); +#endif /* CONFIG_MPC85xx_DS */ + +#ifdef CONFIG_MPC85xx_DS +define_machine(p2020_ds) { + .name = "P2020 DS", + .compatible = "fsl,P2020DS", + .setup_arch = mpc85xx_ds_setup_arch, + .init_IRQ = mpc85xx_ds_pic_init, +#ifdef CONFIG_PCI + .pcibios_fixup_bus = fsl_pcibios_fixup_bus, + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, +#endif + .get_irq = mpic_get_irq, + .progress = udbg_progress, +}; +#endif /* CONFIG_MPC85xx_DS */ From patchwork Sat Apr 8 14:01:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81236 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp908395vqo; Sat, 8 Apr 2023 07:35:15 -0700 (PDT) X-Google-Smtp-Source: AKy350aWLWei7cpxnhI176GDzIRJ2lgzwrff9L5tQ4w6enft7yv6Wyt99hKm8pRRlOQMAP8dOV6D X-Received: by 2002:a62:1b8d:0:b0:62a:c1fa:b253 with SMTP id b135-20020a621b8d000000b0062ac1fab253mr2384897pfb.31.1680964515580; Sat, 08 Apr 2023 07:35:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680964515; cv=none; d=google.com; s=arc-20160816; b=zQwa6nagEbT5urIXWRspjBwf0zOtgCuOhGOj6IKcV8zGq9ourHRIja3AT9BvJ2+Qx6 cPffoiTLxScazHV4wpzXX8ipMKHTXraOJlujGV8cxRaOpDRFNoehyUoS7IsQ5Tjia+re 4fXLnSn9JUJpuiuI3KEsM3GOaFZLdhhL+Xx+4kbTLQbkrQIXDpvPBZP8tr4ZOn5GBcmf xyVsbgP3iiFaxI5IOLP5kIScL5s0ynexDE817kYuE+22t7n6/fkCPyqkDtuh0Na0PMPo kYsMcAx7NKY29T2pdvKhll7yvK5WQBpUAHG5I8tcI9oZsX0JZjOLPW3YjVzVMPm6IFH7 q9gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eAh60WHVNKWn0OOjhGeSAg9zuN3nFoyEr5XB7npZius=; b=udJ57n/yBgXH0nCJUuTLW5iwcciTC8+z+RORSoJXC3mmByAyo5T+CcyRQWgmmzxIeA uQFq2Fxd4iSkyi9y2B6eWwHfzAlbjftFBxQXYWC7o8aKrmCx7MGFMkMU+V7gxQ+lZWWy HKuPsQAtL9Cda8A3u3XshS/T64f91ABlVECGMH0BJotWvcSzrREuz9kixg1dLN7gHQxO JkecXzAg2Nd6sEBF6+unavPq8z4yXIuM7nsfYjRc1r0QceQ5uioscvvteTUNkPjZA7mI gFFr+ttVnIfUuw/0eCgEqieb3W5DDwuMVuW5WtJMePfWm+0thxwUdu68MPCqWmHZZbo4 32ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=apch3ZsR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n7-20020a6543c7000000b005032da21acasi5849987pgp.204.2023.04.08.07.35.03; Sat, 08 Apr 2023 07:35:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=apch3ZsR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230095AbjDHOCx (ORCPT + 99 others); Sat, 8 Apr 2023 10:02:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229888AbjDHOCi (ORCPT ); Sat, 8 Apr 2023 10:02:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25C42EFAD for ; Sat, 8 Apr 2023 07:02:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8BD5A615A1 for ; Sat, 8 Apr 2023 14:02:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4459C433A4; Sat, 8 Apr 2023 14:02:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680962549; bh=jbQirVnPPVloFTYjJFk7nyK5o6hQwE8ZafKlV8Ygph8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=apch3ZsRdK68wnRVwCB9cxtfA8GAzqAr4nVPQ8kE9cEItnHE6Rtno8tgkJLwKfaYp 8Et3BeR3vltGc/KD7ta4Y3I0/9us0PASidQf8Tbq27N8ab5BJtTSMwFZwTIl1K/Kyr dCuyLX2J0qycSQCUEymYrtl7n9hltcUKxC4226iLgHw7EFO7xPFwgMXZ37+2hZ02LJ OBEa0wFXd/h9o6g4yTEAMFIy6/0FwPqdBee7OJjuq8skfuc23zjcY/J0oHOKQwbgOv 6mpk0DnCF04/5FUNczWN+Y8egf9iHFzDZpfTxYQ/TKaAoa1oe4xoOHSXq25PdWBuJf 0Dq/W0+4ZhOYw== Received: by pali.im (Postfix) id EFD622317; Sat, 8 Apr 2023 16:02:26 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 08/13] powerpc/85xx: p2020: Move all P2020 RDB machine descriptions to p2020.c Date: Sat, 8 Apr 2023 16:01:17 +0200 Message-Id: <20230408140122.25293-9-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408140122.25293-1-pali@kernel.org> References: <20230408140122.25293-1-pali@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762619047787346197?= X-GMAIL-MSGID: =?utf-8?q?1762619047787346197?= This moves P2020 RDB machine descriptions into new p2020.c source file. This is preparation for code de-duplication and providing one unified machine description for all P2020 boards. Signed-off-by: Pali Rohár Signed-off-by: Christophe Leroy --- Changes in v5: * Fix commit message * Reduce includes --- arch/powerpc/platforms/85xx/Makefile | 2 +- arch/powerpc/platforms/85xx/mpc85xx.h | 2 ++ arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 30 +-------------------- arch/powerpc/platforms/85xx/p2020.c | 33 +++++++++++++++++++++++ 4 files changed, 37 insertions(+), 30 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) += mpc85xx_cds.o obj-$(CONFIG_MPC8536_DS) += mpc8536_ds.o obj-$(CONFIG_MPC85xx_DS) += mpc85xx_ds.o p2020.o obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o -obj-$(CONFIG_MPC85xx_RDB) += mpc85xx_rdb.o +obj-$(CONFIG_MPC85xx_RDB) += mpc85xx_rdb.o p2020.o obj-$(CONFIG_P1010_RDB) += p1010rdb.o obj-$(CONFIG_P1022_DS) += p1022_ds.o obj-$(CONFIG_P1022_RDK) += 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) {} 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/platforms/85xx/mpc85xx_rdb.c index cdafecaecf56..dbedffc57ce8 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"); } -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); @@ -104,19 +102,6 @@ machine_arch_initcall(p1021_rdb_pc, mpc85xx_common_publish_devices); machine_arch_initcall(p1025_rdb, mpc85xx_common_publish_devices); machine_arch_initcall(p1024_rdb, mpc85xx_common_publish_devices); -define_machine(p2020_rdb) { - .name = "P2020 RDB", - .compatible = "fsl,P2020RDB", - .setup_arch = mpc85xx_rdb_setup_arch, - .init_IRQ = mpc85xx_rdb_pic_init, -#ifdef CONFIG_PCI - .pcibios_fixup_bus = fsl_pcibios_fixup_bus, - .pcibios_fixup_phb = fsl_pcibios_fixup_phb, -#endif - .get_irq = mpic_get_irq, - .progress = udbg_progress, -}; - define_machine(p1020_rdb) { .name = "P1020 RDB", .compatible = "fsl,P1020RDB", @@ -143,19 +128,6 @@ define_machine(p1021_rdb_pc) { .progress = udbg_progress, }; -define_machine(p2020_rdb_pc) { - .name = "P2020RDB-PC", - .compatible = "fsl,P2020RDB-PC", - .setup_arch = mpc85xx_rdb_setup_arch, - .init_IRQ = mpc85xx_rdb_pic_init, -#ifdef CONFIG_PCI - .pcibios_fixup_bus = fsl_pcibios_fixup_bus, - .pcibios_fixup_phb = fsl_pcibios_fixup_phb, -#endif - .get_irq = mpic_get_irq, - .progress = udbg_progress, -}; - define_machine(p1025_rdb) { .name = "P1025 RDB", .compatible = "fsl,P1025RDB", diff --git a/arch/powerpc/platforms/85xx/p2020.c b/arch/powerpc/platforms/85xx/p2020.c index 356335122153..41bba8c0e335 100644 --- a/arch/powerpc/platforms/85xx/p2020.c +++ b/arch/powerpc/platforms/85xx/p2020.c @@ -25,6 +25,11 @@ 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 */ + #ifdef CONFIG_MPC85xx_DS define_machine(p2020_ds) { .name = "P2020 DS", @@ -39,3 +44,31 @@ define_machine(p2020_ds) { .progress = udbg_progress, }; #endif /* CONFIG_MPC85xx_DS */ + +#ifdef CONFIG_MPC85xx_RDB +define_machine(p2020_rdb) { + .name = "P2020 RDB", + .compatible = "fsl,P2020RDB", + .setup_arch = mpc85xx_rdb_setup_arch, + .init_IRQ = mpc85xx_rdb_pic_init, +#ifdef CONFIG_PCI + .pcibios_fixup_bus = fsl_pcibios_fixup_bus, + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, +#endif + .get_irq = mpic_get_irq, + .progress = udbg_progress, +}; + +define_machine(p2020_rdb_pc) { + .name = "P2020RDB-PC", + .compatible = "fsl,P2020RDB-PC", + .setup_arch = mpc85xx_rdb_setup_arch, + .init_IRQ = mpc85xx_rdb_pic_init, +#ifdef CONFIG_PCI + .pcibios_fixup_bus = fsl_pcibios_fixup_bus, + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, +#endif + .get_irq = mpic_get_irq, + .progress = udbg_progress, +}; +#endif /* CONFIG_MPC85xx_RDB */ From patchwork Sat Apr 8 14:01:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81228 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp905932vqo; Sat, 8 Apr 2023 07:30:49 -0700 (PDT) X-Google-Smtp-Source: AKy350Z+bj1d00Lh8SIg7QTkVPcAeK/iCv1TbuZ2X/1UQqqV1vn099ZAbXQhThtaH1tVKup7lkx9 X-Received: by 2002:a17:906:71c9:b0:930:123:8cc8 with SMTP id i9-20020a17090671c900b0093001238cc8mr2769701ejk.21.1680964249346; Sat, 08 Apr 2023 07:30:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680964249; cv=none; d=google.com; s=arc-20160816; b=CZo28FSd3FmYnn3P5E0brv3TeuIC9gp0lEk5CqFU5kRQPaoOEHIkLIzckYFIsWqfuu T6xn4HMf3y2nvh/fwRZks9hmEXpwnEIyBWjy4GpZy055+TgZ7Z3U5pY55gzQmNqjjcXh t4F3vcgG6s4PjDc6kR21cRA1FhsNGSojzhtHS6Nw+Ox1vbakIoJhZ+pjSblR1a6LXpNT B6RpEjputFnKTwndNZjnlz8yfSlzI8DOPpKedoIxsDR+epPQNgOuSy3U2QwWpSuPpOv1 MWSZ7jxeq7mUNa07906B854q5DIPPUpQIvtU6+Gyh0aIjzXjNfS7JGWWTto7nTs4/loz z++w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ftM7YfX5DrxbS57hJ+PVXejVqoR1cdfj/HOtWA1GblU=; b=wW4ICxqylc8chVx557cUG5nor+TBk1zpnyMHnDycd8oFEPfdeyv5mY2BUrUbxr7BU4 wWCaJM7UpbVrMavIqwGGTwUfhVfRkW0cxLfeyhxmN4teavy2+F4R8tXVzVuJd9mLkTzG xQeOv6vWazD79XxZMX03kRIETyYVvA38oOg4VWLdtgIt0gS21SLWCCu6gfYMiQN/AnSC X3f/F0vMHFmiZdm/bEIgSPs9SzeckcE9SUAHZKrvNkZPmfNScdGbw1gLsYW3qKbxWAMp T4RftjMq1XBt4lzIwbzArlKBi5UbzM3MkJRm/xrP6UKD/n9epQfDeR0mWoadcXoXNPJv MgjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sKf7mAmJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h6-20020a170906584600b00933e8f8ccf9si5341769ejs.1001.2023.04.08.07.30.24; Sat, 08 Apr 2023 07:30:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sKf7mAmJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230217AbjDHODH (ORCPT + 99 others); Sat, 8 Apr 2023 10:03:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229932AbjDHOCj (ORCPT ); Sat, 8 Apr 2023 10:02:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 842C1FF01 for ; Sat, 8 Apr 2023 07:02:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6D9EB615A7 for ; Sat, 8 Apr 2023 14:02:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87B03C4339C; Sat, 8 Apr 2023 14:02:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680962550; bh=sZRplt/lMcAukd6t3lKV858Ua+TaEabv3t/I3yOFmVE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sKf7mAmJJD/vTvASkaS7x4T3zKeHCXwQglDpQHxkPN+FIa2fO7m29njShZXeeW9Xw Vd8unuLC4jemEBX7WWfTGvF8ORjyoK/SCl61XoxhlKmyy9TTxFo4FsOF8Sn8bd46nU 2NcTP4B0q/UvDxLnoTNAHzR9UsULOcNAP4lB8HupQmauTkeS3OaeLE7hN0ZH9I2eWG xu0iWADr3JYdj0GHpaDqxbOog05ftD9D+pEPkDmGzEaenmB8uQmhHZLnepBCJe6wSO 2hhFmKvdkEC6g47lwhpVnQrQc7MWhRAXlR5SRKgA7EutYnZugdHCkHsoh/vDDTeFky HZE/S2p8d9RDg== Received: by pali.im (Postfix) id 18FE3233A; Sat, 8 Apr 2023 16:02:27 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 09/13] powerpc/85xx: mpc85xx_ds: Move i8259 code into own file Date: Sat, 8 Apr 2023 16:01:18 +0200 Message-Id: <20230408140122.25293-10-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408140122.25293-1-pali@kernel.org> References: <20230408140122.25293-1-pali@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762618768948546268?= X-GMAIL-MSGID: =?utf-8?q?1762618768948546268?= In order to share mpc85xx i8259 code between DS and P2020. Prefix i8259 debug and error messages by i8259 word. Signed-off-by: Pali Rohár Signed-off-by: Christophe Leroy --- Changes in v5: * Add prefix for err/dbg messages * Fix commit message * Reduce includes --- arch/powerpc/platforms/85xx/Makefile | 3 +- arch/powerpc/platforms/85xx/mpc85xx.h | 6 +++ arch/powerpc/platforms/85xx/mpc85xx_8259.c | 63 ++++++++++++++++++++++ arch/powerpc/platforms/85xx/mpc85xx_ds.c | 46 ---------------- 4 files changed, 71 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) += mpc85xx_ads.o obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o obj-$(CONFIG_MPC8536_DS) += mpc8536_ds.o -obj-$(CONFIG_MPC85xx_DS) += mpc85xx_ds.o p2020.o +obj8259-$(CONFIG_PPC_I8259) += mpc85xx_8259.o +obj-$(CONFIG_MPC85xx_DS) += mpc85xx_ds.o p2020.o $(obj8259-y) obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o obj-$(CONFIG_MPC85xx_RDB) += mpc85xx_rdb.o p2020.o obj-$(CONFIG_P1010_RDB) += 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 +#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/platforms/85xx/mpc85xx_8259.c new file mode 100644 index 000000000000..82e881606049 --- /dev/null +++ b/arch/powerpc/platforms/85xx/mpc85xx_8259.c @@ -0,0 +1,63 @@ +// 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 "mpc85xx.h" + +static void mpc85xx_8259_cascade(struct irq_desc *desc) +{ + struct irq_chip *chip = irq_desc_get_chip(desc); + unsigned int cascade_irq = 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 = 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 = np; + break; + } + + if (cascade_node == NULL) { + pr_debug("i8259: Could not find i8259 PIC\n"); + return; + } + + cascade_irq = irq_of_parse_and_map(cascade_node, 0); + if (!cascade_irq) { + pr_err("i8259: Failed to map cascade interrupt\n"); + return; + } + + pr_debug("i8259: 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/platforms/85xx/mpc85xx_ds.c index af2cafec4f0a..db4cf76c0fd1 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -34,52 +34,6 @@ #include "mpc85xx.h" -static void mpc85xx_8259_cascade(struct irq_desc *desc) -{ - struct irq_chip *chip = irq_desc_get_chip(desc); - unsigned int cascade_irq = 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 = 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 = np; - break; - } - - if (cascade_node == NULL) { - pr_debug("Could not find i8259 PIC\n"); - return; - } - - cascade_irq = 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; From patchwork Sat Apr 8 14:01:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81229 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp906626vqo; Sat, 8 Apr 2023 07:31:59 -0700 (PDT) X-Google-Smtp-Source: AKy350adFdKgYpnHevU1PAEuCAcSNFKqmYKOVzkcTiML/XlFvertRP/cgC7K7asv53sVwE1PT5Zf X-Received: by 2002:aa7:d949:0:b0:502:91c9:4567 with SMTP id l9-20020aa7d949000000b0050291c94567mr1303563eds.12.1680964318747; Sat, 08 Apr 2023 07:31:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680964318; cv=none; d=google.com; s=arc-20160816; b=AZ6as509cwm948qcfpIqnnUFBupENcwSSVwZHL1VPO/7FF50rxKAXGYsCYS3SAam9z x/J5tPhepLv9QrkwWvNZTlr9drbHvj6oFZ5H3BbFZmKZawPJKWDPc4Kq2LNxO6SsSSr/ nEErAEHm5mRLKtpbc6npFFVF9HC9w3NErofR+Mka+7Pz9+jbK0UU7IGN/bEEPJ5OztLp GDB9xF8y6r1Yvvoa3FLkSkvHMHejPSqB1OLrpAxp+rjfe7Ko+OGWPRKNHrnphe5rgUum 1z4XM/FqJXsY1cwsHFehBvfhLVlVqSynGQqPjm0VfzV4nQxU8ztR8FWFuM9ftAadFnxc bbmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ohM4+pfY7dKgPbOYtbAcbcDtKyfZTZDB4VqbM15/2AE=; b=ustGg+r8P90sYnUjvlhAy8uv0Cn+ZRsW6z61sKMg1bK+ub/J7W/JBxfDAzSKxftEol xh9/b2bybS95OBl2sUEfWxBv/02e/2+oDQbAw85dWvU7YhnMqbXVVWLG1F746n45MHFO wOxSyM/DRo+oIbYWu2JdpksnkywIFM6JqP4jPux3z8KPwtd8xFSbJzkjqMERe9YG3+ul hWU2U1e/0bwx8Ak/0Uqs4kLoqZXpdg6HUM3PJrpYTMKjtEdj/t1VBzX5TbzzCsC5RJip LvCXUj2pjssPZ7iQfAj6EGmF7M4xjYiLYEEoBTOBjjgpV1Tt9D1rOCeuW0VgWxIx2c+p r76w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fBBkYvEp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r20-20020aa7da14000000b0050492e18d8dsi453172eds.596.2023.04.08.07.31.32; Sat, 08 Apr 2023 07:31:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fBBkYvEp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230118AbjDHODK (ORCPT + 99 others); Sat, 8 Apr 2023 10:03:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229914AbjDHOCj (ORCPT ); Sat, 8 Apr 2023 10:02:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70A93EFBD for ; Sat, 8 Apr 2023 07:02:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6DA94615A8 for ; Sat, 8 Apr 2023 14:02:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 878B9C433EF; Sat, 8 Apr 2023 14:02:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680962550; bh=a38Nb5+8BNBu5WNBdOxVHDnSVobRmoKRlk/8DEiKyc4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fBBkYvEpUI8SwbbzlPd2D0k2OvEpwpC+5BqBS8Z0u8CDD+F9eZEnh0euO/f+HwRx/ s3qd2JdMkWkkSs9zm9vAZDXJhfRra6u+5K/0iltAoeQ69TINxpP3a/TIp7/wUvL2XH DvtP+wWyJ3siCNd72JqNhIPpptnDIgIhojgRWu338t/F+4tyHUEpxUoSxURjh2WuHz 5KwGNW8ZCTWlhEdKExquwDBqR50QSCzqiN3ExmObLpRY9M7RJqrUZCmCRbYN/rqyUF 0n1IwbBM/gnnczWxqw6TEGFDERNPVEMgctBqZMlqmFEcCV9ADx2iSllhgccbUOBo7g PMgylgktVCeWA== Received: by pali.im (Postfix) id 3B0E924CB; Sat, 8 Apr 2023 16:02:27 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 10/13] powerpc/85xx: p2020: Unify .setup_arch and .init_IRQ callbacks Date: Sat, 8 Apr 2023 16:01:19 +0200 Message-Id: <20230408140122.25293-11-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408140122.25293-1-pali@kernel.org> References: <20230408140122.25293-1-pali@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762618841897112748?= X-GMAIL-MSGID: =?utf-8?q?1762618841897112748?= 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ár Signed-off-by: Christophe Leroy --- Changes in v5: * Make mpc85xx_ds_pic_init() and mpc85xx_ds_setup_arch() static too. --- arch/powerpc/platforms/85xx/mpc85xx.h | 5 --- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 4 +-- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 4 +-- arch/powerpc/platforms/85xx/p2020.c | 38 +++++++++++++++++++---- 4 files changed, 36 insertions(+), 15 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx.h b/arch/powerpc/platforms/85xx/mpc85xx.h index e792907ee3d5..c764d7551ef1 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx.h +++ b/arch/powerpc/platforms/85xx/mpc85xx.h @@ -21,9 +21,4 @@ void __init mpc85xx_8259_init(void); 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); -void __init mpc85xx_rdb_pic_init(void); - #endif diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index db4cf76c0fd1..4347d629b567 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -34,7 +34,7 @@ #include "mpc85xx.h" -void __init mpc85xx_ds_pic_init(void) +static void __init mpc85xx_ds_pic_init(void) { struct mpic *mpic; int flags = MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU; @@ -55,7 +55,7 @@ void __init mpc85xx_ds_pic_init(void) /* * Setup the architecture */ -void __init mpc85xx_ds_setup_arch(void) +static void __init mpc85xx_ds_setup_arch(void) { if (ppc_md.progress) ppc_md.progress("mpc85xx_ds_setup_arch()", 0); diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c index dbedffc57ce8..c42a68da6dfd 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c @@ -29,7 +29,7 @@ #include "mpc85xx.h" -void __init mpc85xx_rdb_pic_init(void) +static void __init mpc85xx_rdb_pic_init(void) { struct mpic *mpic; int flags = 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/85xx/p2020.c index 41bba8c0e335..0e7be454b2de 100644 --- a/arch/powerpc/platforms/85xx/p2020.c +++ b/arch/powerpc/platforms/85xx/p2020.c @@ -21,6 +21,32 @@ #include "smp.h" #include "mpc85xx.h" +static void __init p2020_pic_init(void) +{ + struct mpic *mpic; + int flags = MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU; + + mpic = 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(); + 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 */ @@ -34,8 +60,8 @@ machine_arch_initcall(p2020_rdb_pc, mpc85xx_common_publish_devices); define_machine(p2020_ds) { .name = "P2020 DS", .compatible = "fsl,P2020DS", - .setup_arch = mpc85xx_ds_setup_arch, - .init_IRQ = mpc85xx_ds_pic_init, + .setup_arch = p2020_setup_arch, + .init_IRQ = p2020_pic_init, #ifdef CONFIG_PCI .pcibios_fixup_bus = fsl_pcibios_fixup_bus, .pcibios_fixup_phb = fsl_pcibios_fixup_phb, @@ -49,8 +75,8 @@ define_machine(p2020_ds) { define_machine(p2020_rdb) { .name = "P2020 RDB", .compatible = "fsl,P2020RDB", - .setup_arch = mpc85xx_rdb_setup_arch, - .init_IRQ = mpc85xx_rdb_pic_init, + .setup_arch = p2020_setup_arch, + .init_IRQ = p2020_pic_init, #ifdef CONFIG_PCI .pcibios_fixup_bus = fsl_pcibios_fixup_bus, .pcibios_fixup_phb = fsl_pcibios_fixup_phb, @@ -62,8 +88,8 @@ define_machine(p2020_rdb) { define_machine(p2020_rdb_pc) { .name = "P2020RDB-PC", .compatible = "fsl,P2020RDB-PC", - .setup_arch = mpc85xx_rdb_setup_arch, - .init_IRQ = mpc85xx_rdb_pic_init, + .setup_arch = p2020_setup_arch, + .init_IRQ = p2020_pic_init, #ifdef CONFIG_PCI .pcibios_fixup_bus = fsl_pcibios_fixup_bus, .pcibios_fixup_phb = fsl_pcibios_fixup_phb, From patchwork Sat Apr 8 14:01:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81227 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp905586vqo; Sat, 8 Apr 2023 07:30:16 -0700 (PDT) X-Google-Smtp-Source: AKy350bHAbOWhKSpQwavwI5z+eO23PSxDkN4ha5kBvg9+X5HwvTWQ9i/a3bYHzve6Mb7K5a0uljP X-Received: by 2002:a17:906:5a9a:b0:8b1:2d0e:281 with SMTP id l26-20020a1709065a9a00b008b12d0e0281mr2566062ejq.18.1680964216710; Sat, 08 Apr 2023 07:30:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680964216; cv=none; d=google.com; s=arc-20160816; b=N2kjdOM4X5keTDX9OvSvC67l8fh9+YvnT7XrLZ2ylVsdJ3WIfu/+812LXMdt/FU4Gw axyPVk8R2p2TM/1GpgDjOgul4syiTf3dEM4I5IJJqVbubItJulB4/Wrc+3ozgjOmZH2R bSN++FZiS0llwoogZcuDoXsDfB+hIV/MQ4a6AzRGRScSSc7dPWD2ipzBsF7LUVVxiI95 B637B9+ZamwbxYRlQH2cuNn0BeBS2uPovqddtLPTPbqJxa7isOW2ZXJHGoHUVYSA8FHZ MAZp4bxcmTSKR/90aySG8Nw4LSounowFi8wyO7b7bkqGOin2jnLoMsVLlx5qo0/OckYq lI2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=A18eWG86IvkcxYqkA4fdj0onbOlI4j0cKkJC2vqMM3Y=; b=yjLIUgRo8PLNAj2vBMMDy0wWIT50ejdtNqaNALIDRmBKuvRXo5VaOD7jIODweF9UUS 8Q6kxH8BW4Mu7Z+XB53newOkYNmm76leH78lCHS9Xc2UzEEUnLxgBACVJJVNzd6+7tyR kxQ7ax8TYdUe50FZDmrJsc3OsBXPBzhbfm3wnByHQJ26DqHgawNBoHEkcygDxfspVOsd XSxXy1cF5MHVj2B6O9DeY3Srch93mHEMGiiqOtC3ih9LwBrOfzGzZAD0AAged2y3qg5N g57qNTuhoRAJkXJiRYDQMaunAr41nL1QP2pXSCtEm0ysZw7zRv/nBO+YSyYm/wAfrPZV Haag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vHYPZPhc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id va28-20020a17090711dc00b00947d1b5d562si5562206ejb.379.2023.04.08.07.29.52; Sat, 08 Apr 2023 07:30:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vHYPZPhc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230157AbjDHOC6 (ORCPT + 99 others); Sat, 8 Apr 2023 10:02:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229881AbjDHOCi (ORCPT ); Sat, 8 Apr 2023 10:02:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25DCBEFBF for ; Sat, 8 Apr 2023 07:02:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A13EB615A3 for ; Sat, 8 Apr 2023 14:02:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6314C433EF; Sat, 8 Apr 2023 14:02:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680962549; bh=EYkoivVbC90IhkNPwKngRi4B+5+jGi4J3fzGRmyKcFU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vHYPZPhc78lA/uUbvXLHHqeJqDcvHneiTOHaghStzw3BIeGPRys0pIOSXMIXODAzM xbrqXHMcOwuO9XdYY6VDf1bgpt8Maet79lgtdwXdf6XxkgePMz3vJr5yiHyU7fD+uX V5Y1tLjnbWyozbBSsu5FYS6pfQv6a4hVMozkEZC4t8u1lpcrp+MFyGK4zTiFXYbsYm PKx0ZWCFYpjcinHlK19DFhLnyV7Ul8zSS7TAiKZWbw+VeWOp0UMY9MWaaxOGXWcusW 3o4dBZN5eVVh0nM2uhuXtpM8CsYU0yyEwe3xA/HcYCUq0UO870BgCzj+IjWlDiFqa1 rvdVCKJWNV/lA== Received: by pali.im (Postfix) id 5665432FC; Sat, 8 Apr 2023 16:02:27 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 11/13] powerpc/85xx: p2020: Define just one machine description Date: Sat, 8 Apr 2023 16:01:20 +0200 Message-Id: <20230408140122.25293-12-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408140122.25293-1-pali@kernel.org> References: <20230408140122.25293-1-pali@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762618734566492973?= X-GMAIL-MSGID: =?utf-8?q?1762618734566492973?= 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ár Signed-off-by: Christophe Leroy --- arch/powerpc/platforms/85xx/p2020.c | 57 ++++++++++------------------- 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a/arch/powerpc/platforms/85xx/p2020.c b/arch/powerpc/platforms/85xx/p2020.c index 0e7be454b2de..0e4d715145af 100644 --- a/arch/powerpc/platforms/85xx/p2020.c +++ b/arch/powerpc/platforms/85xx/p2020.c @@ -47,47 +47,29 @@ static void __init p2020_setup_arch(void) mpc85xx_qe_par_io_init(); } -#ifdef CONFIG_MPC85xx_DS -machine_arch_initcall(p2020_ds, mpc85xx_common_publish_devices); -#endif /* CONFIG_MPC85xx_DS */ +/* + * Called very early, device-tree isn't unflattened + */ +static int __init p2020_probe(void) +{ + struct device_node *p2020_cpu; -#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 */ + /* + * 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 = of_find_node_by_path("/cpus/PowerPC,P2020@0"); + of_node_put(p2020_cpu); -#ifdef CONFIG_MPC85xx_DS -define_machine(p2020_ds) { - .name = "P2020 DS", - .compatible = "fsl,P2020DS", - .setup_arch = p2020_setup_arch, - .init_IRQ = p2020_pic_init, -#ifdef CONFIG_PCI - .pcibios_fixup_bus = fsl_pcibios_fixup_bus, - .pcibios_fixup_phb = fsl_pcibios_fixup_phb, -#endif - .get_irq = mpic_get_irq, - .progress = udbg_progress, -}; -#endif /* CONFIG_MPC85xx_DS */ + return !!p2020_cpu; +} -#ifdef CONFIG_MPC85xx_RDB -define_machine(p2020_rdb) { - .name = "P2020 RDB", - .compatible = "fsl,P2020RDB", - .setup_arch = p2020_setup_arch, - .init_IRQ = p2020_pic_init, -#ifdef CONFIG_PCI - .pcibios_fixup_bus = fsl_pcibios_fixup_bus, - .pcibios_fixup_phb = fsl_pcibios_fixup_phb, -#endif - .get_irq = mpic_get_irq, - .progress = udbg_progress, -}; +machine_arch_initcall(p2020, mpc85xx_common_publish_devices); -define_machine(p2020_rdb_pc) { - .name = "P2020RDB-PC", - .compatible = "fsl,P2020RDB-PC", +define_machine(p2020) { + .name = "Freescale P2020", + .probe = p2020_probe, .setup_arch = p2020_setup_arch, .init_IRQ = p2020_pic_init, #ifdef CONFIG_PCI @@ -97,4 +79,3 @@ define_machine(p2020_rdb_pc) { .get_irq = mpic_get_irq, .progress = udbg_progress, }; -#endif /* CONFIG_MPC85xx_RDB */ From patchwork Sat Apr 8 14:01:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81225 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp903386vqo; Sat, 8 Apr 2023 07:25:06 -0700 (PDT) X-Google-Smtp-Source: AKy350aPehAev+/AvUAeVR4t1DW8LSUNeU8SHEKGnPM+Kmtn3xJLmp48RPWtv/VzQM4FjWp7j6XZ X-Received: by 2002:a17:906:e104:b0:931:8221:e168 with SMTP id gj4-20020a170906e10400b009318221e168mr2998232ejb.57.1680963905786; Sat, 08 Apr 2023 07:25:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680963905; cv=none; d=google.com; s=arc-20160816; b=lK10UoV0F755IjPZLngNZZojM/nQcsCqHubfR0C7A/Bg/RZHV3fwqsjKCuDTHMw1HK WLS1X9NS2n8S+1PvMAUBw2VE72coT1iMlfa5nShrdV0LeG2UzCkFpcoxLUKKEOZbN3Hc dUfFVsxiU3ef11H7Jm7mG0WmmAqb75eKV4HZ2TWOyTTMMEYlxGSpHMjBGERNh/Pwvdp8 3yUzNSqkGqwWqugOCWr+eQ2fZve7LDGVQqhMuagqtJOZb/0R4WAJ/+7zxyM1TQ7C/hIt z59v40YuLRG78DvNmKuD2scCTmpZsjeHA79ywuOaC+8DACfzEDnpwFDHD3LvS04+WOfU jbIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5TzER49BHYpnft4Jge3ImPr6ztfQbpWnEf7+loD1O24=; b=ryfvJU6lR9Cy/P2m8f7mSKdGp5Pd/qTIFaIJFT7qXIa+ybox6mxNM50dG8ng7ckS36 e9cza1T5jVBLIZYy8I+MGdAASpTG5a0h/dFqPgQlUu8keEoUuEIbRyqLHkH0iBsbCSbi SJroHJg7B8LY+aXzkNF83Wl4Im2X/KT6qZMVedmKFPxV1lVI9RYynb/lmdTXNnMuwNvq XLD6sKq7KTM5heY21EPHY/aMUM0GRGA7ZUeb0UC0FN73ZHMR21sDud7JRgHEi9HZYYrg spGHrkqBszui3MLnZ6GAyxR/MS1HHNDmmdr7xSumoYWTUF5dVoPtldwcWxBfEtkjUwpn 3GOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="m7/ul2Rk"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xd12-20020a170907078c00b00933433c48bbsi6468576ejb.572.2023.04.08.07.24.42; Sat, 08 Apr 2023 07:25:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="m7/ul2Rk"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230211AbjDHODF (ORCPT + 99 others); Sat, 8 Apr 2023 10:03:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229917AbjDHOCj (ORCPT ); Sat, 8 Apr 2023 10:02:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBC27FF0F for ; Sat, 8 Apr 2023 07:02:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 92E78615AD for ; Sat, 8 Apr 2023 14:02:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE934C4339B; Sat, 8 Apr 2023 14:02:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680962551; bh=UnGtV5BVxvXKqPWOEAt96UXn/bp5B5sv9wg2mMjagoY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m7/ul2RkVvHroOCKT+cSaOvKQnqE0kB+oOFBocBOs9GYpcWqlqkMWOpO54XsRwxi/ ADrOV+yqOFSq0OAjaWA/W1etZwvDqvrau2Ve/EvPK0iEsTpo/xWb9vr2Krkv0oLGH3 3Xn2MCJAhWe4VE8Yci2N2o+CYuoqa4+48uk1jxG7sC+L2IOz0b39D+ohY+TmrYQ0fW cwTZrM/HlIV+OnbmJ8QUacIP2sPug7i9og5z7KfYsUMq5RUx3QGja9wkfX8ZbqiOdc cH2AeCxwdhJwm4q46TTrJD91Ye1kTgFcv/WtDJQE4d7wLeaQmgoC+bV0TkKTJynoMl sy3lg8Iii/qRA== Received: by pali.im (Postfix) id 8492839D1; Sat, 8 Apr 2023 16:02:27 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 12/13] powerpc/85xx: p2020: Enable boards by new config option CONFIG_PPC_P2020 Date: Sat, 8 Apr 2023 16:01:21 +0200 Message-Id: <20230408140122.25293-13-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408140122.25293-1-pali@kernel.org> References: <20230408140122.25293-1-pali@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762618408527603871?= X-GMAIL-MSGID: =?utf-8?q?1762618408527603871?= 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ár Signed-off-by: Christophe Leroy --- 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/85xx/Kconfig index a8ce6616fd0a..9315a3b69d6d 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig @@ -78,23 +78,37 @@ config MPC8536_DS This option enables support for the MPC8536 DS board 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 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 SWIOTLB 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. config P1010_RDB bool "Freescale P1010 RDB" diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile index 0a0011e8c63c..e3d977624e33 100644 --- a/arch/powerpc/platforms/85xx/Makefile +++ b/arch/powerpc/platforms/85xx/Makefile @@ -17,13 +17,14 @@ obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o obj-$(CONFIG_MPC8536_DS) += mpc8536_ds.o obj8259-$(CONFIG_PPC_I8259) += mpc85xx_8259.o -obj-$(CONFIG_MPC85xx_DS) += mpc85xx_ds.o p2020.o $(obj8259-y) +obj-$(CONFIG_MPC85xx_DS) += mpc85xx_ds.o $(obj8259-y) obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o -obj-$(CONFIG_MPC85xx_RDB) += mpc85xx_rdb.o p2020.o +obj-$(CONFIG_MPC85xx_RDB) += mpc85xx_rdb.o obj-$(CONFIG_P1010_RDB) += p1010rdb.o obj-$(CONFIG_P1022_DS) += p1022_ds.o obj-$(CONFIG_P1022_RDK) += p1022_rdk.o obj-$(CONFIG_P1023_RDB) += p1023_rdb.o +obj-$(CONFIG_PPC_P2020) += p2020.o $(obj8259-y) obj-$(CONFIG_TWR_P102x) += twr_p102x.o obj-$(CONFIG_CORENET_GENERIC) += corenet_generic.o obj-$(CONFIG_FB_FSL_DIU) += t1042rdb_diu.o From patchwork Sat Apr 8 14:01:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 81235 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp908186vqo; Sat, 8 Apr 2023 07:34:53 -0700 (PDT) X-Google-Smtp-Source: AKy350bFTJKKrfL3Cna5TJMaE9hVEkW7M3VzRORqESLWsr3DLmia+U6DM3GoDbViejBLMbsTiY5P X-Received: by 2002:a17:903:784:b0:19f:3b86:4710 with SMTP id kn4-20020a170903078400b0019f3b864710mr2112756plb.49.1680964493200; Sat, 08 Apr 2023 07:34:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680964493; cv=none; d=google.com; s=arc-20160816; b=vSdnpOCwNGQpgS1idhNAHISTaLoYC3eOF2NVAdr9zWiRi+KFe/nIOMWnqJ5zoaSZP5 V73iWR9RbKWIHhT9Si8E+vdI7M7IioqNPeuDoQnt/hP81PLUIBIP+RlsRQXT//vJmNnM MgbSwbdsEAaDNOQY68wm5p5V3NZGgBiFOaj92m+Rz6GdzVE2NPrlztKKVJTMR+w//Oyo XuuodSeMDpkWclRhBMN/BQljRWm7x0ag0YObuQk8Jl3YyCzXCWRpuy0v1xDEWfShmyqi AegIK/hODCoMbIgl8UHkRPaiHEyuKorPDxL30MdPjIyC4HBW7b2t6HKR4jj7fm4hBrFw wyZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DVYaqegt5lrFSHg4zW9qA2+F/S5jpUZoTZfUujeNCaA=; b=i+7+gcqaVBXQG0+99cjK80FUcQ1QoJh5stNn5/8L1UjeOmoySKnBAEo+IyZlvrK9uF xHMBKaoQuwfL6sKPqLYVxfgL7G4tjhGDLGtMFrzYgnimXK3vlZKgNn8u/JZoRJjgfMzA 8Qa7tm8Vq5Me84xCmYjoyFfrv2tIib+YPbA6sea1lcZMXvn8E3Y9H3AiQhUvlWGyu717 n3xYGUwLMu2w9hnnN6oF2+U6ecDRvSKxry8o5PYbRw45KF0je0fdXdqrQdsHYQXsSesG hp4wylb/dobaAEPmSO031ztqNFkmJzrKBLnFZ/bXPLHWn1iohTdAZtsTPPim9FVpB68d ZnhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nWZl2aFK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q18-20020a17090311d200b0019a95ab6b4esi6619436plh.407.2023.04.08.07.34.40; Sat, 08 Apr 2023 07:34:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nWZl2aFK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230114AbjDHODD (ORCPT + 99 others); Sat, 8 Apr 2023 10:03:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229901AbjDHOCi (ORCPT ); Sat, 8 Apr 2023 10:02:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 310ECFF18 for ; Sat, 8 Apr 2023 07:02:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CBED8615A4 for ; Sat, 8 Apr 2023 14:02:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B476C433D2; Sat, 8 Apr 2023 14:02:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680962549; bh=rxdkN4YLGOwPjhnByZ2fzE4VRmzioCvI4RldmnDbTms=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nWZl2aFKl2WIxZCUtVfmGi2La9etvx9LsuSljyNuQuoL8X5936f+Q1GF5Xw/OYzso FoYGDjNEkoxs3FEe/k03f8z6pRq9P43xwb2wJzKYuUoeRQYou+Kz50FuehoQlEp4c2 nlN0MOSzr1iE+MduRUe5lbw2bijz43mTtT5wzHcD+LAsMi1oIzYn9U6pqKEXwVMB9U A+q9ipsWk/O/0X78BVNIiv/UdK7aQCw3ly4ZPj66yE+GHhyurB04rzPC3OzgQRYZvu a9eH7duN3zthM9eKxAg8e09zilYPDYDhi0JSoLmnZDyY4MMtqF3O0MdxPmamTAR0+v 0pLHz30dgH1Bw== Received: by pali.im (Postfix) id B461C3ABB; Sat, 8 Apr 2023 16:02:27 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 13/13] powerpc: dts: turris1x.dts: Remove "fsl,P2020RDB-PC" compatible string Date: Sat, 8 Apr 2023 16:01:22 +0200 Message-Id: <20230408140122.25293-14-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408140122.25293-1-pali@kernel.org> References: <20230408140122.25293-1-pali@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762619024267565793?= X-GMAIL-MSGID: =?utf-8?q?1762619024267565793?= "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ár Signed-off-by: Christophe Leroy --- 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/turris1x.dts index c9b619f6ed5c..6612160c19d5 100644 --- a/arch/powerpc/boot/dts/turris1x.dts +++ b/arch/powerpc/boot/dts/turris1x.dts @@ -15,7 +15,7 @@ / { model = "Turris 1.x"; - compatible = "cznic,turris1x", "fsl,P2020RDB-PC"; /* fsl,P2020RDB-PC is required for booting Linux */ + compatible = "cznic,turris1x"; aliases { ethernet0 = &enet0;