From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3EF551AB6FD; Mon, 14 Oct 2024 15:22:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728919379; cv=none; b=XtXEMDTivZYIyECDoPlQ6AdA4EBJ9UeG1hBXL5/vo/sIychvYuZP6bF5nahZ5QJN6zF7CtcRvx9dKBDV1EGQf98W8iYPddff28qRX2wf2MUGovEpq/uYgqes6cGGHWaS4kjubU+B5O2NOn89Y7EVxfe9G3/+Efu+F7E9hrWkCWc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728919379; c=relaxed/simple; bh=+k15zycAGIwEK5+E6otpdEbFMJ9yb6/JcZDDCS81Rys=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ExOplXxMhmYPQj7EeltIpEPJJj8jBTtFlQnWhgJXEJfITODRwPUTuCxO9DMt/L5cWcYKuJH01Ps7zyygbbYxntQrtjz4uqdb0IQOTMT9hHcAxzc9DoA5JTFF+3uPQ1tLmiVjP/fDpsi1riWtlquKE5CS8FL4WeXex84trvkkzmo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SvK4oTzU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="SvK4oTzU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7096CC4CEC3; Mon, 14 Oct 2024 15:22:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1728919378; bh=+k15zycAGIwEK5+E6otpdEbFMJ9yb6/JcZDDCS81Rys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SvK4oTzUtyU6uBBXiIu9VCwNP35TzyYIZjHdV6AQILIBtxCnmak4QMkITv8N8NEzq XRDWSxgLvuUTfKN2dysC1lsQTOxukFXlXvq3Z+fAOJL63ugRKFJ/EBbnfxCFqhInjO 0CJhbRg3ipILRWgSicP8+85xC/zQlo6/87YpQaLM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ajit Pandey , Dmitry Baryshkov , Vladimir Zapolskiy , Bjorn Andersson Subject: [PATCH 6.1 592/798] clk: qcom: clk-alpha-pll: Fix CAL_L_VAL override for LUCID EVO PLL Date: Mon, 14 Oct 2024 16:19:06 +0200 Message-ID: <20241014141241.263165664@linuxfoundation.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241014141217.941104064@linuxfoundation.org> References: <20241014141217.941104064@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ajit Pandey commit fff617979f97c773aaa9432c31cf62444b3bdbd4 upstream. 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 Acked-by: Vladimir Zapolskiy Link: https://lore.kernel.org/r/20240611133752.2192401-2-quic_ajipan@quicinc.com Signed-off-by: Bjorn Andersson Signed-off-by: Greg Kroah-Hartman --- drivers/clk/qcom/clk-alpha-pll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/clk/qcom/clk-alpha-pll.c +++ b/drivers/clk/qcom/clk-alpha-pll.c @@ -1581,7 +1581,7 @@ static int __alpha_pll_trion_set_rate(st 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 */