Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp286013lqs; Thu, 13 Jun 2024 09:59:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWCgy04/iJYiLHtVeko9iTqidp/33QuTqLCbynkDOvIF0ALsN5omdHg9qM8iQXG/6ixd+rCXTWxooBVAQcnDSnLeA0fczWu0VTFSkh83w== X-Google-Smtp-Source: AGHT+IGRJjmQQwTXbIwrTyMMVLA3KZWmWq/jNi59pe2D+kqnZ3qG2emEC6EVI3f+dqwL6YLce7Wv X-Received: by 2002:a17:903:191:b0:1f6:e5c5:4184 with SMTP id d9443c01a7336-1f8620bebc0mr5014795ad.11.1718297943549; Thu, 13 Jun 2024 09:59:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718297943; cv=pass; d=google.com; s=arc-20160816; b=wDC7Pr4/UUsGVGQeBVC99F/vxaE7x7WBilYm8DtIzFx1kZpGdZ/7Me6U9cMvWVWwPc CjqH8hK8wWPfYVKVhn27Bp+wQSrKj3Q6oPlbHIrJU7oF81VjO+Sq4nV2ej413qhSNa7/ 1Vtop7CKM6tuLXKTcGAnVVLMYONv9RBnb2lbFNhLYPAn0pYpL8LY2ImM9qI4mGDn4Tdn 3c22C+ggxLxq5Q7r5az15GUNo0VGGs15Xm5b0EqgTLRzbsAEzoFT1NS0mupTKp+kSpEz hjhfEzN/e0iGr3zZhTl5fVgt/y/7k9VMgt4R1u3W8Vho0/YIojRRf9De/v5htH9Xua51 SJ3g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=94cRgmNIJScPtZdK94CW4LdsaQMvPLRaBspPuDEVpOs=; fh=EEV6WrfrjJ9FXy6iZY4KOkflSPzsZEj/miJrH/4x5FU=; b=e1w5umXXrE6lrkm/gaqvRDSwkA1Asg9W1U6R7V00eLem1wS/vVNLky9SzohCr9xMvd 6qM+KOcgZ/3I5xGelEEAIIqOYjjrH35BR1CTWkdu3ydGHTW9w2fAaIszvQeIb2uj5HQ6 qyjGlqi/mGZKUeQg0HjVoWo8bKjkSKnmGKhKywdf2c7MXBTS4KwWpZF8NxlyRW22C/DH EALB7wca4lBjIw8+GEdiRUb+Jd7lelmCnRhYuGlVJhgKvkrKgER24Pkz+6vPSplKX5vp hurkzvPOSGa8ePCrnvlB1LvTZzwDigee5+z4n1P5bGO/MPnY2+2YTAjvLpYmVvCrlK9I 7RlA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OBmPKlo2; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-213704-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213704-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f855e3ac3fsi16568905ad.39.2024.06.13.09.59.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 09:59:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213704-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OBmPKlo2; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-213704-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213704-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2FECA286E27 for ; Thu, 13 Jun 2024 16:59:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 61834149C61; Thu, 13 Jun 2024 16:58:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="OBmPKlo2" Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A2776149E14 for ; Thu, 13 Jun 2024 16:58:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718297920; cv=none; b=LnNMU06FEBTmjxdGc1lAlVNw/sknO5x7dBMYJQjW/yzDFKHlL8R3sVZ+bDa/0m+F3pOPEMfiMCOOy/9sUUwZoETFCjA33Q2mm4hLh3fBfPUT0yWLVSVjiSB6NjIQK3894MiiraHxs9J0uFQqB653vTdizSixkuuWBAyeNrIbr3s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718297920; c=relaxed/simple; bh=Ko2U0XciqYiZd+52ExiI+tllpyZWj8YuZw6B1gktbbo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=qlHiPgTWMwErOE9k7MDi0s3DlRrkz9MHm1HQJLv1EfTMwaDzfYtFtkmH+1AZpZiz2J+Ym3LdqfQUQuDOALsGRZnWw+I/IllG2/HtI0YZcvw31jR2b1YTiRdCgvKGOuMZk1bmx8gLx1nkIOiZf8b5jxu5hXSm7uJXoqgy7owuKYY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=OBmPKlo2; arc=none smtp.client-ip=209.85.167.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-52bbdc237f0so1578353e87.0 for ; Thu, 13 Jun 2024 09:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718297917; x=1718902717; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=94cRgmNIJScPtZdK94CW4LdsaQMvPLRaBspPuDEVpOs=; b=OBmPKlo29u+ky8APFdx9lrkw5zGFLOCnSEHWcoyLHBQX4iZ5RfnYXsM6jPjN8ZS5IL mYUY5y6TPYU3fmW0ph3Xxi9dUZ6NiHeyGH0wCqkv4l/FWGeeZjm40wI5AJ34SawJBby5 d8xWyiRqDHS9xjOxL2k6QQiYgNBWn+vKRGJ8DdWVMBgv6B8hrvhayqIKuFidSOwM/hv+ kHBDuDPbDzsF3mmJs4Ih2hdAT3YqWb98Y5YSpMcllJ8itvO0cx6IG/mUgOTVd5cTb8jH Wh0XDjjKkU5HPvt6ntMe5On5Qe8jncwdbRNibPLTVAJ952fJTGrTNVRcBbOrH2PdUDqS 1gNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718297917; x=1718902717; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=94cRgmNIJScPtZdK94CW4LdsaQMvPLRaBspPuDEVpOs=; b=d2bv2EiEdDgh0qzY5SCnoK+kEREIH7UQtrGL4ZHwnyAg3L3rdU+6pRowph+MEJa0zJ BIM0rVs9rResPWgjDjH+xK5Ky1Jkq/GzfWu6YIfGbUDocE8LgI1idfisWPCNdKJgMDzV 7qkF/AYgf9KIiGqN1I+oke8HcImQYvAPgnyMwQciEMGLfpsHzZZZSvDeiixNx1tBZbwW 1sbZ52yahYJ81+Q/bV8iuaOaowenyRmiX4YlAk3oB22sbdBVUTF/atzVkLqFEpQtzYJa TIBIJxThI8MBRi6NrdTT3hFwL+rz4dpNqK4zH1zS3ZeJrEJH+NaN5VxG2zwIMQ/FCgTM IZ3g== X-Forwarded-Encrypted: i=1; AJvYcCXcLJqW2SBGEkX/HGMmrQBUV3ATnx3naMU2sRX8RnueK/VOIm9LNlM0/Bxp/lTLKZVRsds797cn2k1a+osx/iBAhmmtOpzysJk3lkJa X-Gm-Message-State: AOJu0YxwQa9DDEW3S/bCrxjIIEPvznbFCXGf8lBU84kggTOyGUseK9f3 E1Hrhr7OIgd8UC8KdChybN6nG+J5YBKt0wOOzsHDWMrf83u74I20hXx30KBgTOY= X-Received: by 2002:a05:6512:44c:b0:51a:f689:b4df with SMTP id 2adb3069b0e04-52ca6e91b34mr221587e87.44.1718297916719; Thu, 13 Jun 2024 09:58:36 -0700 (PDT) Received: from ?IPV6:2a00:f41:900a:a4b1:9ab2:4d92:821a:bb76? ([2a00:f41:900a:a4b1:9ab2:4d92:821a:bb76]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52ca2872466sm284108e87.143.2024.06.13.09.58.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Jun 2024 09:58:36 -0700 (PDT) Message-ID: Date: Thu, 13 Jun 2024 18:58:33 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V4 1/8] clk: qcom: clk-alpha-pll: Fix CAL_L_VAL override for LUCID EVO PLL To: Ajit Pandey , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Vinod Koul , Vladimir Zapolskiy Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Taniya Das , Jagadeesh Kona , Imran Shaik , Satya Priya Kakitapalli , stable@vger.kernel.org, Dmitry Baryshkov References: <20240611133752.2192401-1-quic_ajipan@quicinc.com> <20240611133752.2192401-2-quic_ajipan@quicinc.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20240611133752.2192401-2-quic_ajipan@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/11/24 15:37, Ajit Pandey wrote: > In LUCID EVO PLL CAL_L_VAL and L_VAL bitfields are part of single > PLL_L_VAL register. Update for L_VAL bitfield values in PLL_L_VAL > register using regmap_write() API in __alpha_pll_trion_set_rate > callback will override LUCID EVO PLL initial configuration related > to PLL_CAL_L_VAL bit fields in PLL_L_VAL register. > > Observed random PLL lock failures during PLL enable due to such > override in PLL calibration value. Use regmap_update_bits() with > L_VAL bitfield mask instead of regmap_write() API to update only > PLL_L_VAL bitfields in __alpha_pll_trion_set_rate callback. > > Fixes: 260e36606a03 ("clk: qcom: clk-alpha-pll: add Lucid EVO PLL configuration interfaces") > Cc: stable@vger.kernel.org > Signed-off-by: Ajit Pandey > Reviewed-by: Dmitry Baryshkov > --- > drivers/clk/qcom/clk-alpha-pll.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c > index c51647e37df8..a538559caaa0 100644 > --- a/drivers/clk/qcom/clk-alpha-pll.c > +++ b/drivers/clk/qcom/clk-alpha-pll.c > @@ -1665,7 +1665,7 @@ static int __alpha_pll_trion_set_rate(struct clk_hw *hw, unsigned long rate, > if (ret < 0) > return ret; > > - regmap_write(pll->clkr.regmap, PLL_L_VAL(pll), l); > + regmap_update_bits(pll->clkr.regmap, PLL_L_VAL(pll), LUCID_EVO_PLL_L_VAL_MASK, l); Since you're altering a function used by LUCID and TRION PLLs.. how will that affect non-LUCID_EVO/OLE ones? Konrad