From patchwork Thu Jun 2 08:03:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 12867665 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10CEFC433EF for ; Thu, 2 Jun 2022 08:26:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231332AbiFBI00 (ORCPT ); Thu, 2 Jun 2022 04:26:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232347AbiFBI0Z (ORCPT ); Thu, 2 Jun 2022 04:26:25 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E8B82A46F9 for ; Thu, 2 Jun 2022 01:26:22 -0700 (PDT) Received: from ipservice-092-217-081-045.092.217.pools.vodafone-ip.de ([92.217.81.45] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1nwfoH-0006H9-Hg; Thu, 02 Jun 2022 10:04:01 +0200 From: Martin Kaiser To: Shawn Guo , Pengutronix Kernel Team , Fabio Estevam Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 1/3] ARM: imx25: support silicon revision 1.2 Date: Thu, 2 Jun 2022 10:03:42 +0200 Message-Id: <20220602080344.208702-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220602080344.208702-1-martin@kaiser.cx> References: <20220602080344.208702-1-martin@kaiser.cx> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Update the mx25_read_cpu_rev function to recognize silicon revision 1.2 for imx25 chipsets. Silicon revision 1.2 is mentioned in the errata document at https://www.nxp.com/docs/en/errata/IMX25CE.pdf. The imx25 chips on my test boards show revision 1.2 as well. Signed-off-by: Martin Kaiser --- arch/arm/mach-imx/cpu-imx25.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-imx/cpu-imx25.c b/arch/arm/mach-imx/cpu-imx25.c index b2e1963f473d..3e63445cde06 100644 --- a/arch/arm/mach-imx/cpu-imx25.c +++ b/arch/arm/mach-imx/cpu-imx25.c @@ -32,6 +32,8 @@ static int mx25_read_cpu_rev(void) return IMX_CHIP_REVISION_1_0; case 0x01: return IMX_CHIP_REVISION_1_1; + case 0x02: + return IMX_CHIP_REVISION_1_2; default: return IMX_CHIP_REVISION_UNKNOWN; } From patchwork Thu Jun 2 08:03:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 12867666 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1EC9C43334 for ; Thu, 2 Jun 2022 08:26:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231571AbiFBI03 (ORCPT ); Thu, 2 Jun 2022 04:26:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231879AbiFBI01 (ORCPT ); Thu, 2 Jun 2022 04:26:27 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B68D92A46EA for ; Thu, 2 Jun 2022 01:26:26 -0700 (PDT) Received: from ipservice-092-217-081-045.092.217.pools.vodafone-ip.de ([92.217.81.45] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1nwfoJ-0006H9-Cr; Thu, 02 Jun 2022 10:04:03 +0200 From: Martin Kaiser To: Shawn Guo , Pengutronix Kernel Team , Fabio Estevam Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 2/3] clk: imx25: print silicon revision during init Date: Thu, 2 Jun 2022 10:03:43 +0200 Message-Id: <20220602080344.208702-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220602080344.208702-1-martin@kaiser.cx> References: <20220602080344.208702-1-martin@kaiser.cx> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Print the imx25 silicon revision when the clocks are initialised. Use the same mechanism as for imx27, i.e. call mx25_revision. This function is unused at the moment. Signed-off-by: Martin Kaiser --- drivers/clk/imx/clk-imx25.c | 3 +++ include/soc/imx/revision.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/clk/imx/clk-imx25.c b/drivers/clk/imx/clk-imx25.c index 66192fe0a898..263409fca1eb 100644 --- a/drivers/clk/imx/clk-imx25.c +++ b/drivers/clk/imx/clk-imx25.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "clk.h" @@ -220,6 +221,8 @@ static int __init __mx25_clocks_init(void __iomem *ccm_base) imx_register_uart_clocks(6); + imx_print_silicon_rev("i.MX25", mx25_revision()); + return 0; } diff --git a/include/soc/imx/revision.h b/include/soc/imx/revision.h index b2a55dafaf0a..b122d2fc8881 100644 --- a/include/soc/imx/revision.h +++ b/include/soc/imx/revision.h @@ -22,6 +22,7 @@ #define IMX_CHIP_REVISION_3_3 0x33 #define IMX_CHIP_REVISION_UNKNOWN 0xff +int mx25_revision(void); int mx27_revision(void); int mx31_revision(void); int mx35_revision(void); From patchwork Thu Jun 2 08:03:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 12867664 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FC70C433EF for ; Thu, 2 Jun 2022 08:26:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231551AbiFBI0W (ORCPT ); Thu, 2 Jun 2022 04:26:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231879AbiFBI0V (ORCPT ); Thu, 2 Jun 2022 04:26:21 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 549952A46F1 for ; Thu, 2 Jun 2022 01:26:20 -0700 (PDT) Received: from ipservice-092-217-081-045.092.217.pools.vodafone-ip.de ([92.217.81.45] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1nwfoK-0006H9-Ik; Thu, 02 Jun 2022 10:04:04 +0200 From: Martin Kaiser To: Shawn Guo , Pengutronix Kernel Team , Fabio Estevam Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 3/3] clk: imx25: make __mx25_clocks_init return void Date: Thu, 2 Jun 2022 10:03:44 +0200 Message-Id: <20220602080344.208702-4-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220602080344.208702-1-martin@kaiser.cx> References: <20220602080344.208702-1-martin@kaiser.cx> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org The __mx25_clocks_init function always returns 0 and its only caller does not check the return value. Let's remove it. Signed-off-by: Martin Kaiser --- drivers/clk/imx/clk-imx25.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/imx/clk-imx25.c b/drivers/clk/imx/clk-imx25.c index 263409fca1eb..72b30dd7f05f 100644 --- a/drivers/clk/imx/clk-imx25.c +++ b/drivers/clk/imx/clk-imx25.c @@ -74,7 +74,7 @@ enum mx25_clks { static struct clk *clk[clk_max]; -static int __init __mx25_clocks_init(void __iomem *ccm_base) +static void __init __mx25_clocks_init(void __iomem *ccm_base) { BUG_ON(!ccm_base); @@ -222,8 +222,6 @@ static int __init __mx25_clocks_init(void __iomem *ccm_base) imx_register_uart_clocks(6); imx_print_silicon_rev("i.MX25", mx25_revision()); - - return 0; } static void __init mx25_clocks_init_dt(struct device_node *np)