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 589DEC54EBE for ; Fri, 13 Jan 2023 15:21:17 +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:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XgEaSwDflfZzk+cyMixfXv1DFzM3Vb8ONpYo4GRj0io=; b=ED5UiUYAdUdNlc tQ2vhLkGv8kANCBDNLPg+NUdxT0k5gRWCAGkNfbiRYLVeVhdgdy/Rdfy2b4xr1S3aKp4GtZzWc6W2 VX8H1pdihQQVcKrNFP+83hBLN/hr/Xb6oPzWjzadvqEJsETiVfdw3mTLb4qaizOHp2iZ0j/VpBSQ6 TS0hI7n7lOFoWxunDrled+BHO5sJYwIcPFoFco+jidCF2AtPNu4D/J2UjDNIEkSOfRMuwTygiUUjH ZSDaeR6NiR50emjDcq4Ox0Ye4fAbTXBQbRwUW/23Qo9Q1DbJWfBiQzFOaWl8ziLUHJhw09Vr2/8SB OV9MsyCnUd831kBgIAaA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGLqq-003ANi-1t; Fri, 13 Jan 2023 15:20:16 +0000 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGLqm-003AKp-QB for linux-arm-kernel@lists.infradead.org; Fri, 13 Jan 2023 15:20:14 +0000 Received: by mail-lj1-x232.google.com with SMTP id y18so19226480ljk.11 for ; Fri, 13 Jan 2023 07:20:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=SSgTXFHyKy3EKW5amzFNddURi7wwL3JPtHEB4W2PJIQ=; b=E+Ko3HoaAn/SbNq2+BoHjVxHOcFXzxcMw5eAnMS7INVdgfQwkd47z0/mJOV5XoH498 scTjG3apXZotcgyYBbdTB1cUhowgMekHOy1hfNWvlASySy0yRd7gG4cWcB5FR7gy/508 BxaNCdVHU/hZlmXCX11/vmpk7b3qlV3Mom9au2tVJ36szclEsWxoaKG1SrKU1+5r6TmC phFiurVXNenluvCVRtvFrmBL5DAxUUj/0PoGhJp1toeZdMGZkQujloCxNS+e1QNClM3X HsvM8DnHrtWSbIkFQrovljY1C8ndbwfkHRDo85zbuIaZCICMW2Dr1oAdkQ2yKx7O2mff 64mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SSgTXFHyKy3EKW5amzFNddURi7wwL3JPtHEB4W2PJIQ=; b=Jisw9tWHbOh+FZl53yChY+u9B1rnpPDTTPZX2I1QnVM7wwMPK1C4PjdRNM/0oy3jeE mAxQHPSR3h30GCAo1awUVIDZGa5NTOp0MUL9G/hKjzLczBByU0y4n04ScbGcUbU12xzd GI0BGil45l+FllJ+qqg7XX+/e6FHCQ/D4N28FVi5S8DNTpd/yUZsNzVYpqQdsc1NDG/M m3zy9w19fmJvmXeTBIRAGkSdcX0co2n9eC06nUdDrkfy48e3T4rFRXAYdTtedbw21SQO 8Tni85QVovxTd6Lypcu0dFOiCplwTxMVX4dx84bm1r6FEw+CKRuXDli3cUb7G9V/7LVf WfaA== X-Gm-Message-State: AFqh2koqKPjB1DJKUY13af3QOPYf+Ql/n0RDKHJyE9zAnFbV9xgzZtqC wHEkHGBSMrmW5qFOm9TZtbihZQ== X-Google-Smtp-Source: AMrXdXtlAwax9wzqDnNUzguINen9TYLIV91ebf6KZx6f+zkSZhQ803ZvgPpY7xs8wCz4XL7zPvUNXw== X-Received: by 2002:a2e:a48a:0:b0:281:e762:35aa with SMTP id h10-20020a2ea48a000000b00281e76235aamr62619lji.3.1673623208570; Fri, 13 Jan 2023 07:20:08 -0800 (PST) Received: from [192.168.1.101] (abym53.neoplus.adsl.tpnet.pl. [83.9.32.53]) by smtp.gmail.com with ESMTPSA id p6-20020a2ea406000000b00289cfd2088csm693673ljn.73.2023.01.13.07.20.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 Jan 2023 07:20:08 -0800 (PST) Message-ID: Date: Fri, 13 Jan 2023 16:20:06 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH 6/6] clk: qcom: Fix APSS PLL and RCG Configuration Content-Language: en-US To: devi priya , agross@kernel.org, andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, mturquette@baylibre.com, sboyd@kernel.org, jassisinghbrar@gmail.com, catalin.marinas@arm.com, will@kernel.org, shawnguo@kernel.org, arnd@arndb.de, marcel.ziswiler@toradex.com, dmitry.baryshkov@linaro.org, nfraprado@collabora.com, broonie@kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: quic_srichara@quicinc.com, quic_gokulsri@quicinc.com, quic_sjaganat@quicinc.com, quic_kathirav@quicinc.com, quic_arajkuma@quicinc.com, quic_anusha@quicinc.com, quic_poovendh@quicinc.com References: <20230113143647.14961-1-quic_devipriy@quicinc.com> <20230113143647.14961-7-quic_devipriy@quicinc.com> From: Konrad Dybcio In-Reply-To: <20230113143647.14961-7-quic_devipriy@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230113_072012_891387_EAD2A1D6 X-CRM114-Status: GOOD ( 22.38 ) 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 13.01.2023 15:36, devi priya wrote: > Included CLK_IS_CRITICAL flag which helps to properly enable > the APSS PLL during bootup. Please describe the issue and not only the user-visible impact it makes. Does the PLL get shut down by clk_ignore_unused? Maybe you would be interested in the sync_state changes that landed in recent -next that may solve it for you? I don't think it should be always-on, as you have an alternate source for low power modes, adding CLK_IS_CRITICAL will keep the PLL enabled even if you're not using it. > clk_rcg2_ops should be used for APSS clock RCG, as other ops > will not configure the RCG register RCG register meaning RCG register*s*, meaning in this case M/N/D which would be required for proper rate setting and not only input switching (which arguably doesn't seem to be of much concern on a single-parent clock)? This all is not obvious.. Konrad > > Co-developed-by: Praveenkumar I > Signed-off-by: Praveenkumar I > Signed-off-by: devi priya > --- > drivers/clk/qcom/apss-ipq-pll.c | 1 + > drivers/clk/qcom/apss-ipq6018.c | 8 +++++++- > 2 files changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/clk/qcom/apss-ipq-pll.c b/drivers/clk/qcom/apss-ipq-pll.c > index dd0c01bf5a98..75486a124fcd 100644 > --- a/drivers/clk/qcom/apss-ipq-pll.c > +++ b/drivers/clk/qcom/apss-ipq-pll.c > @@ -33,6 +33,7 @@ static struct clk_alpha_pll ipq_pll = { > }, > .num_parents = 1, > .ops = &clk_alpha_pll_huayra_ops, > + .flags = CLK_IS_CRITICAL, > }, > }, > }; > diff --git a/drivers/clk/qcom/apss-ipq6018.c b/drivers/clk/qcom/apss-ipq6018.c > index f2f502e2d5a4..0d0e7196a4dc 100644 > --- a/drivers/clk/qcom/apss-ipq6018.c > +++ b/drivers/clk/qcom/apss-ipq6018.c > @@ -33,15 +33,21 @@ static const struct parent_map parents_apcs_alias0_clk_src_map[] = { > { P_APSS_PLL_EARLY, 5 }, > }; > > +static const struct freq_tbl ftbl_apcs_alias0_clk_src[] = { > + { .src = P_APSS_PLL_EARLY, .pre_div = 1 }, > + { } > +}; > + > static struct clk_rcg2 apcs_alias0_clk_src = { > .cmd_rcgr = 0x0050, > + .freq_tbl = ftbl_apcs_alias0_clk_src, > .hid_width = 5, > .parent_map = parents_apcs_alias0_clk_src_map, > .clkr.hw.init = &(struct clk_init_data){ > .name = "apcs_alias0_clk_src", > .parent_data = parents_apcs_alias0_clk_src, > .num_parents = ARRAY_SIZE(parents_apcs_alias0_clk_src), > - .ops = &clk_rcg2_mux_closest_ops, > + .ops = &clk_rcg2_ops, > .flags = CLK_SET_RATE_PARENT, > }, > }; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel