From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 92D95C433FE for ; Fri, 11 Nov 2022 02:47:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tggy77z55uJpbSHiVKjDjQtZ97y2msCJCr0bxpKSu8Y=; b=JipLyOlHKki0t8 3zzhzWoR9thaVZP4LhsnYW4/n+Y4Rv1RLBvoGyapZOY6ZcDM0XXeB0/Ily2T5it+N2rkbUx9uFX/u Yu2102iSUr0raKgJzwnxn+99jCkRgaozPsn7n4onEt9/aDFQSayYil8czxR+To5my5FdxihDQ5TT3 4a9jL2n9gY4Aw2MDa1xhZgqT/moitKbeNyGj9/728AsFgDzgxUcnfuJRdJFlxh0ylEvlILD84gjSa iDyW9uufBfX7J6Fjw0788D2cnLGuxX50c6fVaF6ju8Q7uZAeC23kriyyI+Kj9vpA5vQ8hdwjb1Gdo qMYD9qns5EiTxMrfaNgQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1otK3j-00CFKG-Md; Fri, 11 Nov 2022 02:46:23 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1otK3g-00CFIn-I2 for linux-arm-kernel@lists.infradead.org; Fri, 11 Nov 2022 02:46:22 +0000 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 sin.source.kernel.org (Postfix) with ESMTPS id 96110CE233A; Fri, 11 Nov 2022 02:46:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D67ECC433D6; Fri, 11 Nov 2022 02:46:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668134776; bh=hK0Hb0SQpdbGB49liGsSZv160x+zEaDEMydY7ou7aws=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lILdkFCMaBoscWIl4NtDFMMToWNX8NSQ+0QtDj8UNCC2TvTO4PVAOKcCUzSLWiR2D p2BpuIgBHL/WJ1x7APKPq2tvCBwPJmM2sHWZXL7krm8U7d4IcBuMb8cabyWoaQg9iu Y3bLQUpNyjvNaTaEM+m4dCq+hiTcMLcYAJl1jNBMSTrUQJ1o6cn9SY0iL01rLRl7E2 Itg05poKP0+wV7qxhYD1nu+REbsuIhgy9HQaskB7EAYG8H8kwkiu1fxpOoRBV9WD8j ShWS7cHrLyN13EzvBwbctgDztLRAdWTLxLo1R/BbxhqclyuhTMN5W3FI7CnWpItxV6 BJJpU30cYeqXg== Date: Fri, 11 Nov 2022 10:46:07 +0800 From: Shawn Guo To: Xiaolei Wang Cc: s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, l.stach@pengutronix.de, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] soc: imx8m: Increase the clock enable before reading the register Message-ID: <20221111024607.GH125525@dragon> References: <20221028041418.4033261-1-xiaolei.wang@windriver.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221028041418.4033261-1-xiaolei.wang@windriver.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221110_184620_801106_02EC89CA X-CRM114-Status: GOOD ( 20.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Oct 28, 2022 at 12:14:18PM +0800, Xiaolei Wang wrote: > When executing kdump to start the second kernel, > since IMX-OCOTP has turned off the clock, the clock > needs to be re-enabled, otherwise the system will hang. > > Fixes: ac34de14ac30 ("Revert "soc: imx8m: change to use platform driver"") Are you saying this fixes a regression caused by ac34de14ac30? Shawn > Signed-off-by: Xiaolei Wang > --- > drivers/soc/imx/soc-imx8m.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/soc/imx/soc-imx8m.c b/drivers/soc/imx/soc-imx8m.c > index cc57a384d74d..28144c699b0c 100644 > --- a/drivers/soc/imx/soc-imx8m.c > +++ b/drivers/soc/imx/soc-imx8m.c > @@ -11,6 +11,7 @@ > #include > #include > #include > +#include > > #define REV_B1 0x21 > > @@ -56,6 +57,7 @@ static u32 __init imx8mq_soc_revision(void) > void __iomem *ocotp_base; > u32 magic; > u32 rev; > + struct clk *clk; > > np = of_find_compatible_node(NULL, NULL, "fsl,imx8mq-ocotp"); > if (!np) > @@ -63,6 +65,13 @@ static u32 __init imx8mq_soc_revision(void) > > ocotp_base = of_iomap(np, 0); > WARN_ON(!ocotp_base); > + clk = of_clk_get_by_name(np, NULL); > + if (!clk) { > + WARN_ON(!clk); > + return 0; > + } > + > + clk_prepare_enable(clk); > > /* > * SOC revision on older imx8mq is not available in fuses so query > @@ -79,6 +88,8 @@ static u32 __init imx8mq_soc_revision(void) > soc_uid <<= 32; > soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW); > > + clk_disable_unprepare(clk); > + clk_put(clk); > iounmap(ocotp_base); > of_node_put(np); > > -- > 2.25.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel