Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5472749rwd; Mon, 12 Jun 2023 05:46:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4IVbK5gkv+4qQZwFNNLIOyLHz167pto/N1cT0SZPTrEOrmRG+nrQK/3DHSEzZafnaW+p8W X-Received: by 2002:a19:5f58:0:b0:4f6:5198:652c with SMTP id a24-20020a195f58000000b004f65198652cmr3536448lfj.62.1686574003204; Mon, 12 Jun 2023 05:46:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686574003; cv=none; d=google.com; s=arc-20160816; b=D+8cneh/ihqxiul1FTmFTAX4zouJXG/2rb00DojR17NmHWBBeoKDjbSDFUduRHMVGs kQ3c6LVWXBhfiGNIhFUykoZ8hEcg8MyD3UprgkgH6Alj54VFeI52K2kzjNCbKG7SCoy8 FBhyIT4+33WmLVMcagDWnpjvbC//Lp9IVrs1GOmZVSexR1WDzpiCdNjGEzED3sMT1O6v zleeHZvMfeJxesyBipRnRQtJubspfd8zgPNw0pXbwjM+nC0PZXwCIkEEr367j7SuBzXi kXYr9tJUEwKAQ1AJ68B3NVUXcUPVIcK97U9vgmWyRBVV7zvIqQS53OCpQMYYZnWt4R2C vyEw== 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=ihV2ctrJcHdhqHxaZ+65XW/djQqj6uqyI3HubS8KBYU=; b=MbNB2E1HWWZ1x3rVsJo7SZozl7VRW9ccMVLwstv591P2nulJ4bdiwR2kn8XzNJEyVE 4XmySc4bpB8WI7zu2Ifnf7FpjMpFgZf9JMfy7yfQCyC5PNsb9Qy6yrAORFmFJtc6bInr 5iI6oewqcyRF7Fpllcb4iFZVCVsX0fu+BP3CqFFKHjqHyW15Cu3gUeMoVuwFMgJMKuWL BGDLk0SAy+GmGWARgd7aMCwA5WMc3HzwcGDas8GBSEZTN2L6GtYBZMbZFgSQjQNRGRwK 6EAMl0Ac2yVjsjoX08gwlO9csEyD6w8t1MzHvtxS9aa3haTkEahN6yF3YiZcSpqaAWTO oMyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="k0y/h5g6"; 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 s1-20020aa7cb01000000b005148e5a8477si5804059edt.344.2023.06.12.05.46.17; Mon, 12 Jun 2023 05:46:43 -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="k0y/h5g6"; 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 S229777AbjFLMZ0 (ORCPT + 99 others); Mon, 12 Jun 2023 08:25:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbjFLMZZ (ORCPT ); Mon, 12 Jun 2023 08:25:25 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D871D8F for ; Mon, 12 Jun 2023 05:25:23 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2b1b06af50eso50291131fa.1 for ; Mon, 12 Jun 2023 05:25:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686572722; x=1689164722; 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=ihV2ctrJcHdhqHxaZ+65XW/djQqj6uqyI3HubS8KBYU=; b=k0y/h5g6xtVHe0ArFXGYe0k9OsGtwiZwrJkz4ayolmNYdqg2Aw9l3YE+AzQQ4+F5Mi Db5QxAzn9S46GaRIoljLsrh0Y7rjNUCjyu7G5Q3/yxliIX+uAuj+k2gof38elgwAccUw MjrGEzfQ1VSr2S+b++J68Ik1Z7JOkLrZlS7sVf4VxSW9KiIM0DS2QU9+qo3vCfq1wY8p ri148F4kcYQhObtSpM2gBB1dXTKWvCf3g/gbsoo1ZQMAIXoN8VBEhpyBnG8DMUBRLFqn q7HpfvW2KLbphiRHCNoe9Zw20SH3kqnzVEnKgBbm5WZUyG2Y4RmhfJh8wysV8j8to9Ol nXhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686572722; x=1689164722; 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=ihV2ctrJcHdhqHxaZ+65XW/djQqj6uqyI3HubS8KBYU=; b=AbfXygFYhmSPIYBxdMuyN+XULIkS7oJNeHbBaZBq0tGTlPESHJPwgQdBDskFgn2HxM Dz15aySdSjjQNRsA48cYt+k91fOCdLgRfp33wdQ4a/JtWdq8b9MGdBKQGqlPzZllVaju NYDJFs+6GNehMOThfmIPWkz0HzBzgJNiO/hxJVcMt9XYcP+SjEKvRlTFEEOzthpabKBm bA72ZWG9xv71KqZ846obdvCegdKFAWSZkFSD5LVZZFyQQ1rM8Ytl4CsGvfVgPz3yrz+l mfRZekln1nrijljaZ4sm2yd2XyfDAQOn3pX7ThRcMotWxGzq4K0PAZgey8C84jevzDHu Ra/g== X-Gm-Message-State: AC+VfDx/63MFX0V1p0guF+CjAiFNreWoABuWGmdXkUIQvtlPMx/YXyEL WGXRnlma36WeY41tUAhPBuMA8Q== X-Received: by 2002:a2e:9054:0:b0:2b1:c1b2:e2ef with SMTP id n20-20020a2e9054000000b002b1c1b2e2efmr2464896ljg.51.1686572722142; Mon, 12 Jun 2023 05:25:22 -0700 (PDT) Received: from [192.168.1.101] (abyj190.neoplus.adsl.tpnet.pl. [83.9.29.190]) by smtp.gmail.com with ESMTPSA id h8-20020a2e3a08000000b002b200d9838bsm1676414lja.104.2023.06.12.05.25.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Jun 2023 05:25:21 -0700 (PDT) Message-ID: Date: Mon, 12 Jun 2023 14:25:20 +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> <8196144d-6cf1-897c-2520-3686e6414abb@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=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 On 12.06.2023 14:23, Stephan Gerhold wrote: > On Mon, Jun 12, 2023 at 01:46:26PM +0200, Konrad Dybcio wrote: >> 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 >> > > Hm? .get_parent uses the ->parent_map but not the ->freq_tbl as far as I > can see. :) Brainfart. I think the ftbls can be removed. Konrad > > Stephan