Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp232547ybh; Tue, 10 Mar 2020 23:41:14 -0700 (PDT) X-Google-Smtp-Source: ADFU+vudUGh68r9WXbrS3MUpXvofev7+jqZKbOpViP1ST2B6iARq0aGdpzlYwa5R0MuFqmtlkKnq X-Received: by 2002:a05:6830:2110:: with SMTP id i16mr1111476otc.337.1583908873830; Tue, 10 Mar 2020 23:41:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583908873; cv=none; d=google.com; s=arc-20160816; b=ENlRFBLG3KFKeREM2ghg+zJ9fZJmvrGaBIIDZw09yjPc5uCg1njTIXCdlZpdApcq/M qli4uCKSrb+jvAzm/7q3dOthpps96YkuUaTuBgRLdKwv98AVViqa7vPhnVZTIgVsCoaR SiVncnYU+ERhBSfnEFtn16f9pPXWJTMyI0/KKeTWEjOJs4qKLjCckLDbvWictwGaCbaU qwm/fTGmBUjo+I7mastDE/udGJK0rEIfshE+3wiypQGIuSZ15alouQNRSj2V7n/wbHho 1JzJNRBNjkf1Gcx1mQ2oCrtSMLfRcffZoEVeqQTeZ7WRWY7VbzuNQUfkUcVnTAtZlEB8 1U4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=iRSn8S1ccGw3BFpu0njPJfRCctg1YCeGwUbkPiAiVyI=; b=BnATIsRJAClBBAhfdWoHqAVOWqlj9al4nGQfh0/fifI9ZryI7AOHg6cfOR4sbp1h4+ Eu1TrZifQVFduBO4apX1zxoUmwuBXNaZoh8V7BTtBWSQAaUajfw0ocLEU91wpATda6bO jXX3eNVG+/qfAKnAS6HpiS68zL/Mw3qrDxNAdYmTYZQNbcFuE6U4+FhmGPjECs3OnMhz BLWmFcueCprZRl8S1lVTd3orrvbzzhAhpWpaEKTwBYKRk/wr3ViRzSH64VDmcNXWJE/5 c4amHWlBPDD8YPdCEKIp54xgCmDxIATjU545BFtMHlt8EDnPBHE/eRSxjoO23llpcLj8 tjkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=din59zve; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m81si697398oig.190.2020.03.10.23.41.01; Tue, 10 Mar 2020 23:41:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=din59zve; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728260AbgCKGkP (ORCPT + 99 others); Wed, 11 Mar 2020 02:40:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:55744 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725976AbgCKGkP (ORCPT ); Wed, 11 Mar 2020 02:40:15 -0400 Received: from dragon (80.251.214.228.16clouds.com [80.251.214.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1E2DB2192A; Wed, 11 Mar 2020 06:40:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583908814; bh=pmJS1KPAVu0tCjnfh13UknbuRkIWI610a6eXK2eKvFU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=din59zveAKkT42o8gjyMV9c31EJn1iJ/B75t1hHffEOkhU4QFIcVZ6M7l40ltYyD0 4/axfTn//VT63Z/66gWFkte+SDZP2uiUoQdnywhYphWU3+2O7XRmpKd7YKwfnpVSew hrKlx4q9/mJ8sfF1bHt4Mo7YHXlN+82wH0w214Wg= Date: Wed, 11 Mar 2020 14:40:05 +0800 From: Shawn Guo To: Anson Huang Cc: mturquette@baylibre.com, sboyd@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, leonard.crestez@nxp.com, abel.vesa@nxp.com, peng.fan@nxp.com, ping.bai@nxp.com, fugang.duan@nxp.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linux-imx@nxp.com Subject: Re: [PATCH 1/4] clk: imx8mn: A53 core clock no need to be critical Message-ID: <20200311064005.GE29269@dragon> References: <1582620554-32689-1-git-send-email-Anson.Huang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1582620554-32689-1-git-send-email-Anson.Huang@nxp.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 25, 2020 at 04:49:11PM +0800, Anson Huang wrote: > 'A53_CORE' is just a mux and no need to be critical, being critical > will cause its parent clock always ON which does NOT make sense, I do not quite understand what problem this patch is trying to fix. In the end, all the ancestor clocks of "arm", including "arm_a53_core" will still be ON, as "arm" has CLK_IS_CRITICAL flag. What is the difference you are trying to make here? Shawn > to make sure CPU's hardware clock source NOT being disabled during > clock tree setup, need to move the 'A53_SRC'/'A53_CORE' reparent > operations to after critical clock 'ARM_CLK' setup finished. > > Signed-off-by: Anson Huang > --- > drivers/clk/imx/clk-imx8mn.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c > index 83618af..0bc7070 100644 > --- a/drivers/clk/imx/clk-imx8mn.c > +++ b/drivers/clk/imx/clk-imx8mn.c > @@ -428,7 +428,7 @@ static int imx8mn_clocks_probe(struct platform_device *pdev) > hws[IMX8MN_CLK_GPU_SHADER_DIV] = hws[IMX8MN_CLK_GPU_SHADER]; > > /* CORE SEL */ > - hws[IMX8MN_CLK_A53_CORE] = imx_clk_hw_mux2_flags("arm_a53_core", base + 0x9880, 24, 1, imx8mn_a53_core_sels, ARRAY_SIZE(imx8mn_a53_core_sels), CLK_IS_CRITICAL); > + hws[IMX8MN_CLK_A53_CORE] = imx_clk_hw_mux2("arm_a53_core", base + 0x9880, 24, 1, imx8mn_a53_core_sels, ARRAY_SIZE(imx8mn_a53_core_sels)); > > /* BUS */ > hws[IMX8MN_CLK_MAIN_AXI] = imx8m_clk_hw_composite_critical("main_axi", imx8mn_main_axi_sels, base + 0x8800); > @@ -559,15 +559,15 @@ static int imx8mn_clocks_probe(struct platform_device *pdev) > > hws[IMX8MN_CLK_DRAM_ALT_ROOT] = imx_clk_hw_fixed_factor("dram_alt_root", "dram_alt", 1, 4); > > - clk_hw_set_parent(hws[IMX8MN_CLK_A53_SRC], hws[IMX8MN_SYS_PLL1_800M]); > - clk_hw_set_parent(hws[IMX8MN_CLK_A53_CORE], hws[IMX8MN_ARM_PLL_OUT]); > - > hws[IMX8MN_CLK_ARM] = imx_clk_hw_cpu("arm", "arm_a53_core", > hws[IMX8MN_CLK_A53_CORE]->clk, > hws[IMX8MN_CLK_A53_CORE]->clk, > hws[IMX8MN_ARM_PLL_OUT]->clk, > hws[IMX8MN_CLK_A53_DIV]->clk); > > + clk_hw_set_parent(hws[IMX8MN_CLK_A53_SRC], hws[IMX8MN_SYS_PLL1_800M]); > + clk_hw_set_parent(hws[IMX8MN_CLK_A53_CORE], hws[IMX8MN_ARM_PLL_OUT]); > + > imx_check_clk_hws(hws, IMX8MN_CLK_END); > > ret = of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_hw_data); > -- > 2.7.4 >