Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5411369rwd; Mon, 12 Jun 2023 04:57:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Ts5ef8bNV5i1AvAfSE+fN20UosXZBCEqIQ16jeQOxXbcQq3mPpPYPlVhoFsN0rjzi7q7N X-Received: by 2002:a17:90a:fb4c:b0:256:257e:cba9 with SMTP id iq12-20020a17090afb4c00b00256257ecba9mr7968813pjb.13.1686571049228; Mon, 12 Jun 2023 04:57:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686571049; cv=none; d=google.com; s=arc-20160816; b=VLzaVdAt7jyXd5OQxMFqWR8NY8KrvoAdZ/sgIq2z4y/ePY7QKKa2Xol+ZEPERDWEhk rUmN6jjtdu+dfheWKE3GPpg/FulbjjjZS27S6g29Gz1RS5LxaM7fogTxnmjYxO5g4Zbn Dsvy33NsH8Qxcx9GSDAQKq7Y3ARjQg1mZuJaRUWttOS6k1DjacJW/rRrNZfXZ8ju1Zha 05Bxa9qFnR0BcxWEZvNorcxTFpidOGRBIII3qh0W9KaAXJar6d/NH3M9hresMijwibQF rn8/xNpu6Q2O19LGg217NUkanz/3xwB1JRsSLO+0Dzyp0fki8EDFYQXC6RfN96rUWtE9 /zVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Q3mDPxlhnfYT5SmnsxZrGTmX5gRHX8DqjzMmwO37aSY=; b=E2zW6U0ZnHc2iWLrwFvOryNSYgw3kBMP7eAJ9MfSRHnXj6ruJKEC/6hYdX0cqJW0Q5 WHwSdgvvr8xVhLZAS9q2fpQpnHV6qR894lbj2J4W5UOmxI4Aks7aNezDDNbHIoO/0+7w 7nCbdJn0gZwpKA4qNIKtSEydq3wcPpOKT0qjlL3b5iXL5W26mNvVgEQgTVDYieeB1U0W dQ3NZveRRcYOp57X/gduh7WM/V1QnfGOfx3mmTN93KmQ8ARUa+sTlCzzRYC4p8IZeN+p P/TUZ5YAulI/CUgPz1zD6WX/SFgSl8YP5AgutQR2MdqN3jRYjNUzHbNn10IgnOmg6pkj IKjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dA4FJQqM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a17090a460400b002597ed3cc4fsi6716268pjg.189.2023.06.12.04.57.16; Mon, 12 Jun 2023 04:57:29 -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; dkim=pass header.i=@linaro.org header.s=google header.b=dA4FJQqM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234644AbjFLLva (ORCPT + 99 others); Mon, 12 Jun 2023 07:51:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234820AbjFLLvQ (ORCPT ); Mon, 12 Jun 2023 07:51:16 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC23D10B for ; Mon, 12 Jun 2023 04:46:31 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2b227fdda27so31995151fa.1 for ; Mon, 12 Jun 2023 04:46:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686570389; x=1689162389; 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=Q3mDPxlhnfYT5SmnsxZrGTmX5gRHX8DqjzMmwO37aSY=; b=dA4FJQqMBagXhvCjRVBv3OHS4ExpERJL4B63lMj3OkTubHs7e5R716xmmfrg+T2UNJ MzlVdc9+67YDysbAWrBipVfbU3IUfxDsbkQvEhbWQE+jqoZtc3CG8W0m2XExHs4J0MqH gF6wIJzaPtf37EI/FmVjx8xWNVSkqBZ+tDANGwHRah0GAdtO+1sE5mhqI2bEY+O6+8k8 lrcH5/Hw/Vs8yXnGdD+C4XH0U52NltNZ/obzA0tiCWYPMQgLsaEtths7y8A6iwOoHdWg B43elsmofAZXzTywEGEGsy27JWEOitsNy98V1oXeMWTTwxL69vskbWMzKrH3nlkDY9YF PmBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686570389; x=1689162389; 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=Q3mDPxlhnfYT5SmnsxZrGTmX5gRHX8DqjzMmwO37aSY=; b=c7soRwQwJT0y7qQk/b/W8F/L2zv/pJ3w3nERd6xKr8ICDe1j3ATD8/BHAJRadkeJVV SepEzpZEtCtwuzWA4AMELliiKD84Zcd1IYzfLC3XGDDazMd0cPOoruBHhxyGhrCeQFEe t0CYb1eO+BDia5fex+evrUNwh0gtKkHf1TvPNkmG8uiToQJh8FBNGUuouF10qB4SgnCF 2mxGnqkSqBujMkE+raFfdJjOJaGiP4+FFRbYNLHTU58mapUgAixkXDK8LmfmDHrxfV/e jw26By5j/OsRVTaXAgktbK76gKVZKeRL56K+yDTjLOXgkCxcov3khggTsN7pnxEEGKSB sSbg== X-Gm-Message-State: AC+VfDwdFtMUF5k/ltDW7/rT3SHVhhlu9A9M0Sjt59M5YDv/7flB800P 3L2LGBNXo3+R8H4ayCxy5tmmhQ== X-Received: by 2002:a2e:3801:0:b0:2aa:e7cd:69f8 with SMTP id f1-20020a2e3801000000b002aae7cd69f8mr2059793lja.9.1686570388925; Mon, 12 Jun 2023 04:46:28 -0700 (PDT) Received: from [192.168.1.101] (abyj190.neoplus.adsl.tpnet.pl. [83.9.29.190]) by smtp.gmail.com with ESMTPSA id v10-20020a2e960a000000b002adbe01cd69sm1731403ljh.9.2023.06.12.04.46.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Jun 2023 04:46:28 -0700 (PDT) Message-ID: <8196144d-6cf1-897c-2520-3686e6414abb@linaro.org> Date: Mon, 12 Jun 2023 13:46:26 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH 2/2] clk: qcom: gcc-msm8996: Use read-only RCG ops for RPM bus clocks Content-Language: en-US To: Stephan Gerhold Cc: Bjorn Andersson , Andy Gross , Michael Turquette , Stephen Boyd , Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230612-topic-rcg2_ro-v1-0-e7d824aeb628@linaro.org> <20230612-topic-rcg2_ro-v1-2-e7d824aeb628@linaro.org> From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On 12.06.2023 12:17, Stephan Gerhold wrote: > On Mon, Jun 12, 2023 at 11:22:48AM +0200, Konrad Dybcio wrote: >> The config/periph/system NoC clocks are wholly controlled by the >> RPM firmware and Linux should never ever alter their configuration. >> >> Switch them over to read-only ops to avoid that. >> >> Fixes: b1e010c0730a ("clk: qcom: Add MSM8996 Global Clock Control (GCC) driver") >> Signed-off-by: Konrad Dybcio >> --- >> drivers/clk/qcom/gcc-msm8996.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/clk/qcom/gcc-msm8996.c b/drivers/clk/qcom/gcc-msm8996.c >> index 5e44d1bcca9e..588e3b67657a 100644 >> --- a/drivers/clk/qcom/gcc-msm8996.c >> +++ b/drivers/clk/qcom/gcc-msm8996.c >> @@ -264,7 +264,7 @@ static struct clk_rcg2 system_noc_clk_src = { >> .name = "system_noc_clk_src", >> .parent_data = gcc_xo_gpll0_gpll0_early_div, >> .num_parents = ARRAY_SIZE(gcc_xo_gpll0_gpll0_early_div), >> - .ops = &clk_rcg2_ops, >> + .ops = &clk_rcg2_ro_ops, >> }, >> }; >> >> @@ -284,7 +284,7 @@ static struct clk_rcg2 config_noc_clk_src = { >> .name = "config_noc_clk_src", >> .parent_data = gcc_xo_gpll0, >> .num_parents = ARRAY_SIZE(gcc_xo_gpll0), >> - .ops = &clk_rcg2_ops, >> + .ops = &clk_rcg2_ro_ops, >> }, >> }; >> >> @@ -306,7 +306,7 @@ static struct clk_rcg2 periph_noc_clk_src = { >> .name = "periph_noc_clk_src", >> .parent_data = gcc_xo_gpll0, >> .num_parents = ARRAY_SIZE(gcc_xo_gpll0), >> - .ops = &clk_rcg2_ops, >> + .ops = &clk_rcg2_ro_ops, >> }, >> }; >> > > If the rcg is read-only then it shouldn't need a .freq_tbl (the > .recalc_rate() works without it). These clocks have one for some reason. .get_parent needs it > > Maybe we should also set .flags = CLK_GET_RATE_NOCACHE to ensure that > clk_get_rate() doesn't return some stale value? Although I'm not sure if > it's enough to set it here or if it would need to be set on all child > clocks as well. Hm, I'm not sure if it makes sense for the children.. Konrad > > Thanks, > Stephan