From patchwork Wed Jul 31 06:29:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Satya Priya Kakitapalli X-Patchwork-Id: 13748160 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 8EF2B16D314; Wed, 31 Jul 2024 06:30:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722407446; cv=none; b=JJgKaqhpVPLRnMp+FVo/I3RHRA+1UHruFtad3+JqszCPQPB0rjzWFXBB/1+ehy3xLHYsmI+CdNdsaV6Ec8nlgV1DIymNJnkH4vol/e2fqi3OLfnxLCnyKx0o5C03RZgCyD1BhmxtLwwa6H4AqUhNNaGa4GKXfDl46ZYfPEkUQkY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722407446; c=relaxed/simple; bh=KP6F3FtQWCxTrUcT6p/h7RvENnHEmhpo7PPZ1j7dJBc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jlKRMEuW+biGusfBEHV2lEdgdFOciBPV+lv40/9AFsgZ6ZjMFiA+YQXLtUC/d/EX4XBiwWCW/51qHvkWv1Ska8g+kL2Rc/ODASq8xmLTmPYT9a0+wvPPgv73XNyzi/ZKhXoBKbODDrIMwETXsyZ7i5wRIGunD2ESHYoRuaHCZW0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=AAsmPGem; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="AAsmPGem" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46V4GsAu024881; Wed, 31 Jul 2024 06:30:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= orpoRCqzqggm6hLcizfmgGGDCyOC9s5pzXYSiq5Uzs4=; b=AAsmPGemZgdtUQM5 xpvXGyDZtt2iHjiZpUep/vaEJqzxnZvXgOunuikU4ZlBomv392cT/UTLmnBnwBSM Ifbr9AoLdq3M0HSL38DbEJymoUjMwvlq8gaisB4E1xSZbjyNhUxG5Kta6rsK4cIL zUY50L1YwtfJ4reQ4axpU7ygReDE+698gMR1PkpjNoILkJdj802ibrVzezcKvpjo tMB3NtNR6qPzGju0ZwOBK4vtWxIUjjNjBdRMB9CAIFNdkOzLojC3dOa1wAFW9GTq af5fMvvs/ycT9sDqmY2os8TYcwqS9LngINTGakd9G0XJijsZRUEsYzJEZRmH9Xi2 uwYfJg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 40pw453cmb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Jul 2024 06:30:19 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA01.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTPS id 46V6UIbm016607 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Jul 2024 06:30:18 GMT Received: from hu-skakitap-hyd.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Tue, 30 Jul 2024 23:30:12 -0700 From: Satya Priya Kakitapalli To: Bjorn Andersson , Konrad Dybcio , Michael Turquette , Stephen Boyd , Abhishek Sahu , "Rob Herring" , Krzysztof Kozlowski , Conor Dooley CC: Stephen Boyd , , , , , Ajit Pandey , "Imran Shaik" , Taniya Das , Jagadeesh Kona , , "Krzysztof Kozlowski" , Bryan O'Donoghue , Satya Priya Kakitapalli Subject: [PATCH V3 2/8] clk: qcom: clk-alpha-pll: Fix the trion pll postdiv set rate API Date: Wed, 31 Jul 2024 11:59:10 +0530 Message-ID: <20240731062916.2680823-3-quic_skakitap@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240731062916.2680823-1-quic_skakitap@quicinc.com> References: <20240731062916.2680823-1-quic_skakitap@quicinc.com> Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: U1UTR--9dovXoiseoe8PK3Lvxfs5waGk X-Proofpoint-ORIG-GUID: U1UTR--9dovXoiseoe8PK3Lvxfs5waGk X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-31_03,2024-07-30_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 priorityscore=1501 suspectscore=0 adultscore=0 clxscore=1015 impostorscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2407110000 definitions=main-2407310047 Correct the pll postdiv shift used in clk_trion_pll_postdiv_set_rate API. The shift value is not same for different types of plls and should be taken from the pll's .post_div_shift member. Fixes: 548a909597d5 ("clk: qcom: clk-alpha-pll: Add support for Trion PLLs") Cc: stable@vger.kernel.org Signed-off-by: Satya Priya Kakitapalli Reviewed-by: Dmitry Baryshkov --- drivers/clk/qcom/clk-alpha-pll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c index 9ce45cd6e09f..eb5626095916 100644 --- a/drivers/clk/qcom/clk-alpha-pll.c +++ b/drivers/clk/qcom/clk-alpha-pll.c @@ -1552,8 +1552,8 @@ clk_trion_pll_postdiv_set_rate(struct clk_hw *hw, unsigned long rate, } return regmap_update_bits(regmap, PLL_USER_CTL(pll), - PLL_POST_DIV_MASK(pll) << PLL_POST_DIV_SHIFT, - val << PLL_POST_DIV_SHIFT); + PLL_POST_DIV_MASK(pll) << pll->post_div_shift, + val << pll->post_div_shift); } const struct clk_ops clk_alpha_pll_postdiv_trion_ops = {