From patchwork Wed May 17 15:39:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 95408 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1258251vqo; Wed, 17 May 2023 09:18:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7AHdYHFWk8uKp8O5CbevzH0HvZHG3f337IEn6OTBdydT5IJZ/UhfJtH9rqMP1sJoLuE6Zg X-Received: by 2002:a17:90b:30c9:b0:250:69c7:a95e with SMTP id hi9-20020a17090b30c900b0025069c7a95emr107630pjb.48.1684340313335; Wed, 17 May 2023 09:18:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684340313; cv=none; d=google.com; s=arc-20160816; b=jglUS3phU1M9zb4OEVnAXje0zQmDvykGQ9MwgOoahrJgG1lsEkt3aeO18GaWbK4wrp UrAP+2CFkMmT0T2MaYTU2Buf1TKJXX9HXjHOjXza3OXQYZHL4LJMBQp00yyuRIYmPTWF 926qnWbErjvNYffl0VXOk5/OyybNIYXxtJLDPRwEev2PKFs2YxJTXjaoYm//ywARhsmE IK9oNXXRvQ1oqqcw6SNJIQKAIu+YJmwZ7ky7B5JSkotwmUsxx5wpiNTUDrNC7ifAIxNJ mL/DWTN2Yt2GIBg7U92zXUIDufsYCpvh27ESXKsq6f5FP/QxOdnUktRokGRrXqkCw41O +XBg== 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; bh=1JhVa5qnGK0IyWjwb2I5Rvt8U0fymSmO/6pgDoQHM8A=; b=XIZxrpENUHYld5MUknDLLTaFvJ+AllWO6Q1TdlM0xVRRwmNtEhwL1gHIuk4MdJ43Li Reb7IqhHdrs5uf6Md+Uwtq1GQSDTpdqT6RwSdZXka5Ul2QKqddLSNPjLadE+IaPjiGk8 SqKrDMrRNUAXy0RhG9FjTuQen5ECjxlOPkeWs94zQHeP4MOoxsoMj9VXwl1+IjBLQCab RrmWuvidgJZiV7i+MMOvOjVZ5ZMm8bT2eG2r2NkTLMZRnF11k+fpwgpTREerT6+eGiFj VJqbMWZKi4IRqKPrsIoIYlDNS3eYhcEB9uMBIJbAo4pg4awDECr9SAvKS0z3rmmU97MT XXRg== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f1-20020a17090ace0100b0022c9cb7662csi2041950pju.159.2023.05.17.09.18.21; Wed, 17 May 2023 09:18:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229866AbjEQQO4 (ORCPT + 99 others); Wed, 17 May 2023 12:14:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjEQQOy (ORCPT ); Wed, 17 May 2023 12:14:54 -0400 X-Greylist: delayed 2033 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 17 May 2023 09:14:51 PDT 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 4F2637AA9; Wed, 17 May 2023 09:14:51 -0700 (PDT) Received: from ipservice-092-217-095-237.092.217.pools.vodafone-ip.de ([92.217.95.237] 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 1pzJGh-0004yN-0U; Wed, 17 May 2023 17:40:47 +0200 From: Martin Kaiser To: Abel Vesa , Stephen Boyd Cc: Shawn Guo , Pengutronix Kernel Team , Fabio Estevam , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH v5 1/2] clk: imx25: print silicon revision during init Date: Wed, 17 May 2023 17:39:31 +0200 Message-Id: <20230517153932.172081-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230517153932.172081-1-martin@kaiser.cx> References: <20220815190748.102664-1-martin@kaiser.cx> <20230517153932.172081-1-martin@kaiser.cx> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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?1766158828242355635?= X-GMAIL-MSGID: =?utf-8?q?1766158828242355635?= 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 Reviewed-by: Fabio Estevam --- changes in v5: - rebase against today's linux-next changes in v4: - rebase against today's linux-next - add Fabio's Reviewed-by tag changes in v3: - rebase against today's linux-next changes in v2: - send the patch to the clk maintainers 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 cc013b343e62..bee3da2e21e1 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(); + 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 Wed May 17 15:39:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 95409 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1258320vqo; Wed, 17 May 2023 09:18:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ41N32E6nBUytJ9Ik+N2n8nNTKZJeLSDy0rEJ7720yoaUlEXBr/15Gf/VSEILJt8QBfDk/6 X-Received: by 2002:a05:6a00:2342:b0:645:834c:f521 with SMTP id j2-20020a056a00234200b00645834cf521mr1665092pfj.17.1684340318574; Wed, 17 May 2023 09:18:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684340318; cv=none; d=google.com; s=arc-20160816; b=uNjNizbvhbyqFXKyWia8DuAcMBdBTFdVyYSL/TzQ/KuKGoFcRl3iqabrUkxXwaZv8b WxnwWwfswVQCrSoiKiFbqvEN4MCdSUuy+vbUjmlLkDQJu9aCr2BjfixOFIt3/cuZH200 c4wPoozWUsW+1S/WpBQwyQcf4lRirQ4eW4lVCriHXzyw2G4qcTOgroixMJpSW6sV15XK DxYvtGSSiL7BOzu1+obPwfsVv/v/MTGSSTmZ/inI5MXf+9al0tcjobgmGr0NHzsDJu0N wM7gzlUEw2MVawEJfhDe0ucpKqU75UO7UZte9Y9FC6ucFzvpOIUGQqktOyvg44LwI3da yoNQ== 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; bh=T1lMRvVz0SQfwXSbzH4t7vnrkNyF3xPryydfhIFiTac=; b=Ge9Oh76SBno8rhW4vpEbutYm6nlMY2RpmwatT+QPesUl0tLjihr9ahhVD+w4tMcjEf pErTUCZ9ay90V7R65eGtoTXFTQ/1yMYADhDAg461/yFl8Z7B2oFMm+FpAgYd9kvxsE8M VK+Kjj+hwgdKnTRLrc+Ts8aSU0KL8MCkxxuC8dKxkgUivlZ7GjYUzp7+OObmoWliDnho n50cFYnsbrknaZ/MBVwq208nStOhuGA6HQU+SOIbrtDp9frQbB2ob2LW1L1j1ZC4YXcH 29QhWUd3DZc7ARf/uu3fDJtk2pD7+/5pC3EPEgbZlXgYe7Dw0bB/HnMT53lOz1kXyEcT Wj1Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f14-20020aa7968e000000b0063afd8a5b8dsi22803320pfk.186.2023.05.17.09.18.25; Wed, 17 May 2023 09:18:38 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230083AbjEQQPF (ORCPT + 99 others); Wed, 17 May 2023 12:15:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229875AbjEQQO6 (ORCPT ); Wed, 17 May 2023 12:14:58 -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 5A6647ABB; Wed, 17 May 2023 09:14:56 -0700 (PDT) Received: from ipservice-092-217-095-237.092.217.pools.vodafone-ip.de ([92.217.95.237] 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 1pzJGj-0004yN-6f; Wed, 17 May 2023 17:40:49 +0200 From: Martin Kaiser To: Abel Vesa , Stephen Boyd Cc: Shawn Guo , Pengutronix Kernel Team , Fabio Estevam , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH v5 2/2] clk: imx25: make __mx25_clocks_init return void Date: Wed, 17 May 2023 17:39:32 +0200 Message-Id: <20230517153932.172081-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230517153932.172081-1-martin@kaiser.cx> References: <20220815190748.102664-1-martin@kaiser.cx> <20230517153932.172081-1-martin@kaiser.cx> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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?1766158833867204401?= X-GMAIL-MSGID: =?utf-8?q?1766158833867204401?= 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 Reviewed-by: Fabio Estevam --- changes in v5: - rebase against today's linux-next changes in v4: - rebase against today's linux-next - add Fabio's Reviewed-by tag changes in v3: - rebase against today's linux-next changes in v2: - send the patch to the clk maintainers 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 bee3da2e21e1..c566be848c2d 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(); imx_print_silicon_rev("i.MX25", mx25_revision()); - - return 0; } static void __init mx25_clocks_init_dt(struct device_node *np)