Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2182916rwd; Fri, 26 May 2023 03:03:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ZL3EnUC9EnuVOehQvAoQzxG2yNxb4BEhQTbkmG5y0+7PH+Edh4XapzE13hhKiqPZecaE7 X-Received: by 2002:a17:90b:3586:b0:255:929c:5168 with SMTP id mm6-20020a17090b358600b00255929c5168mr1547840pjb.48.1685095396147; Fri, 26 May 2023 03:03:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685095396; cv=none; d=google.com; s=arc-20160816; b=aNekGRSGZY5WdBTWZEXYfWOsPd2U1X4IZTbvxGFmHrjyixvOfBukZyZEvcZEAbBPaJ 4b4PubGPj0jgd9g6rABu36hawWpn6T54meG2VhBujSVzlGxb6MPBMGtuibCD2Y/wKyKB XkqbBFb235D9bL68WTtoM9XbMoW0zhvGC4qIRx4Xn+P6DafGEVl/i8i2U+ofwWDJgqeg vs7hW4Rr2lRnV4DkZk0iHIn7k1D0mr5lkZesI/MSBNgKriCjcxxnsuFCtzxlnavxATHy c00Ntf2/oKrOD2DZXInRgqGUfP2O7RwtYCD089OqYx3ObHaHK4sXovy8qidbN9PavS1a 7R1Q== 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=7/oBlibUgPrZBjTfRBirdiuXhFmBs+58msrliDKw+mY=; b=vBfhrAocDfukr6WclV7c5zZcWUTJYN2STsZses5LjLfa84bR325tzflzpBXSqKXKqr VsNAwxaGaMw8TXOl4iuFzEdsY0KaZ5ot2ysaj7AyllVKif9qkosfPmstp5CNJqV7tolD pD18wkAhYkNiIkZ04R8NAZ4LIBe3jsIPdwzdWPWkzooKmMf2f7qCN++QpIY//pJ/j8AQ 8TsJHStQMyu0FUZ4rycP1YT2gOHlsEj/nqfxc+7oHre5myoExYgJ0Ocnqfman+OidEN5 inUOCqoejsZuUG12tqKLfXemRSqehYTnrtlj4V0QT72ebyy8b4c4UnNWL5kNs38bB7Ig InFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KoGqzYwc; 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 d74-20020a63364d000000b0053ef547263csi3198135pga.398.2023.05.26.03.03.02; Fri, 26 May 2023 03:03:16 -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=KoGqzYwc; 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 S243228AbjEZJei (ORCPT + 99 others); Fri, 26 May 2023 05:34:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243225AbjEZJeO (ORCPT ); Fri, 26 May 2023 05:34:14 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 517241B1 for ; Fri, 26 May 2023 02:33:38 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4f4bd608cf4so552547e87.1 for ; Fri, 26 May 2023 02:33:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685093603; x=1687685603; 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=7/oBlibUgPrZBjTfRBirdiuXhFmBs+58msrliDKw+mY=; b=KoGqzYwcPZDy0P7xRldOcnXupUtJ+OB7H0ZpZPKhb1KtMCJj3127Toriic3RgG79sv 1FN+feWvMCT5HWrA7sgpFvh4jRJX2kk/pkx3cN8Sg4fRKrzrRZMwz5MdAg4nIcOj+5GF /VGmQUIIqNjUPtgs8j+9TCUzRo6fA53EtKqzb53WSvI9E2Ut8QNd9IAlhZVZNVVww/cF a5Dq5rbMa9f9g+0gVz8cTO2HusCyCJ1+XtHsTty+Ua7uhoGr/Z1tjUUEkJNf50Oj2Zgy PEcPe3A3DC5MRNMLGMBqrN8ogvDJxJYHtD1uTF0DsfMARexZ7wsleU88v54cf8wKhJg1 nc/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685093603; x=1687685603; 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=7/oBlibUgPrZBjTfRBirdiuXhFmBs+58msrliDKw+mY=; b=IFU7eV8n4gBlD6CKWIqA2XzfZ4JsaCejCVQ3G1Is2LxxH7CpYUZCB0U6rBGDIwjYG3 8gej+zSRSfM2Wo9YLp98GpFOuHKrl6DzwZRfcG23AEjroOTyRU2VlH/CYCiZfWqifciV Az8TiVApy+XXmSL/Jft0oNJcUjGtIULOol6s7HIGsIYOteLSmL2V37NZmx/E/8CfFJrW DnOJytE2HJFfisvfAKpRQwlDzkqENlWGynAsOuLY29icSwjiGOVW0YFaCoOFd6bwh8BU snBlVKdxUjQI5OeAGVUiyVEtU84pYnKz/TCnjMoII4vCQk1YUOGugIqxtCnGT+fCJqpX YGmQ== X-Gm-Message-State: AC+VfDzl6erV/RvRf5N7mwIBupV40LnmTNmYD+tdwwFbMGmTyydA3HKT kmCiN3ZwZEau+oHR4UyLmycpPw== X-Received: by 2002:a19:f80c:0:b0:4f4:cda3:8c99 with SMTP id a12-20020a19f80c000000b004f4cda38c99mr441265lff.42.1685093603377; Fri, 26 May 2023 02:33:23 -0700 (PDT) Received: from [192.168.1.101] (abyj77.neoplus.adsl.tpnet.pl. [83.9.29.77]) by smtp.gmail.com with ESMTPSA id i20-20020ac25234000000b004efe73ee01fsm535345lfl.306.2023.05.26.02.33.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 May 2023 02:33:22 -0700 (PDT) Message-ID: <6e1d098d-03b9-aa63-a0bf-6cf748a0db0d@linaro.org> Date: Fri, 26 May 2023 11:33:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH V2 3/6] clk: qcom: clk-alpha-pll: Remove explicit CAL_L configuration for EVO PLL Content-Language: en-US To: Jagadeesh Kona , Andy Gross , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Bjorn Andersson , Vladimir Zapolskiy , Vinod Koul , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Taniya Das , Satya Priya Kakitapalli , Imran Shaik , Ajit Pandey References: <20230525172142.9039-1-quic_jkona@quicinc.com> <20230525172142.9039-4-quic_jkona@quicinc.com> From: Konrad Dybcio In-Reply-To: <20230525172142.9039-4-quic_jkona@quicinc.com> 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,URIBL_BLOCKED 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 25.05.2023 19:21, Jagadeesh Kona wrote: > In lucid evo pll, the CAL_L field is part of L value register itself, and > the l value configuration passed from clock controller driver includes > CAL_L and L values as well. Hence remove explicit configuration of CAL_L > for evo pll. > > Fixes: 260e36606a03 ("clk: qcom: clk-alpha-pll: add Lucid EVO PLL configuration interfaces") > Signed-off-by: Taniya Das > Signed-off-by: Jagadeesh Kona > --- Oh that isn't obvious at first sight, nice find! I'd suggest a different solution though: #define LUCID_EVO_PLL_L_LVAL GENMASK(.. #define LUCID_EVO_PLL_L_CAL_L GENMASK(.. lval = FIELD_PREP(LUCID_EVO_PLL_L_LVAL, config->l) | FIELD_PREP(LUCID_EVO_PLL_L_CAL_L, config->cal_l); This would make the separation between the two parts more explicit however config->l would then represent the L value and not the end value written to the L register Up to you, whichever you find saner! Konrad > Changes since V1: > - Newly added. > > drivers/clk/qcom/clk-alpha-pll.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c > index f81c7c561352..68a80395997b 100644 > --- a/drivers/clk/qcom/clk-alpha-pll.c > +++ b/drivers/clk/qcom/clk-alpha-pll.c > @@ -270,7 +270,6 @@ EXPORT_SYMBOL_GPL(clk_alpha_pll_regs); > #define LUCID_EVO_PCAL_NOT_DONE BIT(8) > #define LUCID_EVO_ENABLE_VOTE_RUN BIT(25) > #define LUCID_EVO_PLL_L_VAL_MASK GENMASK(15, 0) > -#define LUCID_EVO_PLL_CAL_L_VAL_SHIFT 16 > > /* ZONDA PLL specific */ > #define ZONDA_PLL_OUT_MASK 0xf > @@ -2084,10 +2083,7 @@ EXPORT_SYMBOL_GPL(clk_alpha_pll_zonda_ops); > void clk_lucid_evo_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, > const struct alpha_pll_config *config) > { > - u32 lval = config->l; > - > - lval |= TRION_PLL_CAL_VAL << LUCID_EVO_PLL_CAL_L_VAL_SHIFT; > - clk_alpha_pll_write_config(regmap, PLL_L_VAL(pll), lval); > + clk_alpha_pll_write_config(regmap, PLL_L_VAL(pll), config->l); > clk_alpha_pll_write_config(regmap, PLL_ALPHA_VAL(pll), config->alpha); > clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL(pll), config->config_ctl_val); > clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL_U(pll), config->config_ctl_hi_val);