Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp168870lqb; Tue, 16 Apr 2024 11:54:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVnXL3JoKzt3s/L3Lx78Kec9cBuieC/sdrGvQSPlAlXZj+8DrgM3vy76RU8/D9btzJU+uj981N/1t/CftJkO+ZiWOSNWrphE9/lPf2UOg== X-Google-Smtp-Source: AGHT+IH0S95ORarSufbtR2kVtHhghQbiquk50uheHLjgwhrFOoOy07VgAO1sH+4w501FKl6+Oghe X-Received: by 2002:a50:cdc2:0:b0:56e:bad:36b with SMTP id h2-20020a50cdc2000000b0056e0bad036bmr8955458edj.21.1713293661784; Tue, 16 Apr 2024 11:54:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713293661; cv=pass; d=google.com; s=arc-20160816; b=ckuYzaQm5NiY3bx+x+C+R8tfEkxxeqIgVP06k7mSxPiQM3hNSrnfX/E5V9jBYmcXDh GMyMMM6D7nLbPKUhJN+Yau1rHKIM5ZLsXP6+UPcNyYUF5dCNbqvGV3WEFwzRNBHl2GOK 4OKfhAwM9QHl6FY/CVJtiJkajopqo57Jkg8fzqzx/UKoBDeH+prpMuvU10PQR3xoFPX6 IKituCEvZevsamNVpk4gSOzy5F/yA0kdXxPWxsG1zXOp8NW6s8oTx3MiirrKdj9QW6g5 nwOECwdj7aytNuBMfhjyMa0cmK9IllBE4wzds476MNlhwr1kyM+ccz2LTbUUwXGvk8y1 EOtA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=W5vQzyryFWgKw/gamp30zKVmQkGglywjftI1PpywStM=; fh=NCAWsxuyahzLi6IA9bFhNivdmN2aBzmB0P6xTFDBtig=; b=SXDia/Ll8+4nBA9k0eWjzOXfZ+5zwkW6jaqpwetc/Kc+XD4ffnjogbCAzHmpMoxaDw w8XJpZuTzCzJrYvQQ3d0wn3FUMTSz9NwAcYvnGVxW4KAPmnWMZJvlGMZqGaC7L20sgRx LLtyxauK28ynwVLsrAZcPDsarwF7Nqpe512hkaJCxKDaoV6d9ym4xlt4s5DcERtZTGYU YOzUw2hhNG9ALk4BTffDzpyhMk1VgMlhaax5mqTrdUS8IFYWFM0fY2IDkIjiz2vUhwuT 4SnuTgXfeuEgqaYKv7ieUClTPLH2poEEdKyDwtkiOIFQh7n19IR6VQZ6xR9D48mIiGSF 47Ig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hE6e2M02; 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-147427-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147427-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id w30-20020a50d79e000000b0056bfcbdb535si6073307edi.396.2024.04.16.11.54.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 11:54:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-147427-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hE6e2M02; 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-147427-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147427-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 767151F225D7 for ; Tue, 16 Apr 2024 18:54:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 36D6513959C; Tue, 16 Apr 2024 18:52:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hE6e2M02" Received: from mail-yb1-f179.google.com (mail-yb1-f179.google.com [209.85.219.179]) (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 E0730137773 for ; Tue, 16 Apr 2024 18:52:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713293540; cv=none; b=snfpHepUZcyxH+y+QpllsHkpBLQbhyvfmm5KPUgQ0amdYBSvMJqCW87FjqmdpxdzL+ZbVNZSjIg7HeG2qc/WpH02w0epDZXhXa9dAoShttOj7DFv41RWfJoNHmbJJBhd3cz8ZmhBB57dj3VdNB3IRNEpp35IFZgVGJgDX4Khyf4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713293540; c=relaxed/simple; bh=y0uVH3oZE1a3APxihRtxusmQeZlfaUfpI73EDsl34Ic=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=JIlw/Zy66KCeFLwYVxRHZ4ltrCxSz8134NfQGV1/MogGgAN9FCSQwudJWYqbxVzuHjxxQJ2KfP5J6Y30zi7Rl+WR4kjgIp6VDH3/CvbPH7OTnDxq91tOtTxPj5/PZt/EsA6mia8pmN0xmIvhAk1zXYduRLhAt/vgtdwZs/FXWlU= 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=hE6e2M02; arc=none smtp.client-ip=209.85.219.179 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-yb1-f179.google.com with SMTP id 3f1490d57ef6-db4364ecd6aso5078709276.2 for ; Tue, 16 Apr 2024 11:52:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713293537; x=1713898337; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=W5vQzyryFWgKw/gamp30zKVmQkGglywjftI1PpywStM=; b=hE6e2M028SGdn1J6NmvTGc0lCnYRBo1IY3+/VzIBb3MWrQuKMXFHc5jKbZK2qWzNNt 7PdZ79yy7q11oLk6TiikHUAUGrFMokjcDDrzwcxbZ/GegpglgHJJK7qBAJn7X45jWl1n S/14eYV+R3WcmcbxVIqX5vV6R/86JQykzksgHOj955lugAHoMt7897vfTVH9E6IOeuPn XxbdKEQP3P+ls8G60k8KdRY51dpvxr8zD4E1ydjl++DTY0/FJLB7YaFQVxSO1FZv7C9J +WigZwi3uCdz7KOm9N/b2svuqCmDMJE+RcEPVj/pTLwJLZjU6SVuRg/mrXwk7fsSb39K Lq1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713293537; x=1713898337; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=W5vQzyryFWgKw/gamp30zKVmQkGglywjftI1PpywStM=; b=C/pG7nAfIm5wwmwFZFeOb8lXNCIwvacBcC7GsLcSjOAaAj3nQm0ocW6JiFBx6Ui3oB HOVitqZFV1iXoQRBAogY5vyizlqiR27ql+YgIVa+UC2vYKoy7b/20rbOx/p1njGe4irj Qu/VB5DiJRUY9LXxN/s9vIdPvMppliGZrmPps/+JMnSnUDGmAPl5A+jGtLW2DEZ64MS1 u/XArNpJunYfPephOb8IweDSuCgg8geWlluo6k/UpQqD+b56WhiVq1ySR9n/rfQLIoSH Yf74a7NJNjuu7lijng2OzJY9x5hA0+3KHYx5doBQ9xypWiTr1AtiMUSXotSUWDrVqNJI rIeQ== X-Forwarded-Encrypted: i=1; AJvYcCVRAJPYP+uBsIjoL+I2948JEcTEli6IqAPHuPcnYB4Gdmyy0/wT33v2REE/IrP+nsa3ZmjgoeqpqNWgbQQ7R3KkNkClPgjpymTCZkE0 X-Gm-Message-State: AOJu0YxfDyaXSpkeQIYxDLCztfx/PW5qiEo+csfSMKNyLtyrpW6bDx7D 7JH7wNjbUEQ91QnkdT2TtqeAaMY6orH/Xl48odZB3HuZahTCoymp1VOH/ISc8oULHfy8SUtWeOe RyBhAQQsNnNx0Y08VAsf1qKXm/SNLNVQnyWIm6w== X-Received: by 2002:a25:1e56:0:b0:de1:1b21:4f8 with SMTP id e83-20020a251e56000000b00de11b2104f8mr10605271ybe.62.1713293536905; Tue, 16 Apr 2024 11:52:16 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240416182005.75422-1-quic_ajipan@quicinc.com> <20240416182005.75422-2-quic_ajipan@quicinc.com> In-Reply-To: <20240416182005.75422-2-quic_ajipan@quicinc.com> From: Dmitry Baryshkov Date: Tue, 16 Apr 2024 21:52:05 +0300 Message-ID: Subject: Re: [PATCH V2 1/8] clk: qcom: clk-alpha-pll: Fix CAL_L_VAL override for LUCID EVO PLL To: Ajit Pandey Cc: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Vladimir Zapolskiy , 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 Content-Type: text/plain; charset="UTF-8" On Tue, 16 Apr 2024 at 21:21, 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") > Signed-off-by: Ajit Pandey > Cc: stable@vger.kernel.org S-o-B tag should be the last one. With that fixed: 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 8a412ef47e16..81cabd28eabe 100644 > --- a/drivers/clk/qcom/clk-alpha-pll.c > +++ b/drivers/clk/qcom/clk-alpha-pll.c > @@ -1656,7 +1656,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); > regmap_write(pll->clkr.regmap, PLL_ALPHA_VAL(pll), a); > > /* Latch the PLL input */ > -- > 2.25.1 > > -- With best wishes Dmitry