From patchwork Wed Jul 31 06:29:09 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: 13748159 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 BF87D16C85D; Wed, 31 Jul 2024 06:30:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722407444; cv=none; b=AsY+LRX+t9Gz+HzFTbWl86hLSAp91v3I/1g03z9935IeYVhAPr7+aK9sKqOXTJc36UaL4fRkbuFwwPm8397T4x8yiWmEtoKqmA8z2BBFQRfXwcE3Yd+WA07fQLPx8f/hR9mo3YuF1/uhcgmc/i/VEIdcLtssJpv2TwrmIJVazss= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722407444; c=relaxed/simple; bh=XOSmBSVXem9wD3idxGl23SFBjpKteSdcV611EwBmfN4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=njimZtCcxoYWHk2pd+yhIXw3FnJHuU5yxRgei56P7eWp1X49V8rwhzKsjBl/jm6pJlnOs+mUv8Q5HVIUekS8/dL8D1twpp3pxAXZVpxW+cpezlGAf3bO54ccAqSRBDVRiMcOpbqSSVVRqquPZzDDQTivwgisEeKvdYbAI3a2gXY= 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=Q8Axw1Yj; arc=none smtp.client-ip=205.220.168.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="Q8Axw1Yj" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46UIbuNl029983; Wed, 31 Jul 2024 06:30:13 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= LEJeAZff+XyBJEegV3eXDep/iKz9xLGzbWXveYp0HGU=; b=Q8Axw1YjsetCglRp 14k1tp0wu9zywFq3nHLxNHpTETTib1saNpw4K5NhkfQSSItZzX9JhqFV4VR7Lrkr f4j+VZTPK5pdzuL+rnQbUDb6h8umR4QPMxzeXxeuu4GBm2+K1i7ir7NB1bIAv9Xs p8IyJC8T6AVKQOrOst4CS3n2WYITwn+amVYTclj/MvA+IKpC+T9hJB8qQZ1ZthB7 w6mZJKzd8MVC4uLEOuF/FpOy3353iXfcRDlPVq2wLMdR+OXoCmbN02HX2uVBssDd CasUMWwyXFtY6rVgGn66vgZKlDrGI1pXMvdW0/+kZFySzbm0zdFBZcTYHOlgtz52 yWr96w== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 40pq52480m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Jul 2024 06:30:12 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA02.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTPS id 46V6UC77000414 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Jul 2024 06:30:12 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:06 -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 1/8] clk: qcom: clk-alpha-pll: Fix the pll post div mask Date: Wed, 31 Jul 2024 11:59:09 +0530 Message-ID: <20240731062916.2680823-2-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: 1Xja2z2Qv_svO95SskdzGggc54CwOyVk X-Proofpoint-ORIG-GUID: 1Xja2z2Qv_svO95SskdzGggc54CwOyVk 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 phishscore=0 mlxlogscore=941 adultscore=0 priorityscore=1501 spamscore=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 clxscore=1015 malwarescore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2407110000 definitions=main-2407310047 The PLL_POST_DIV_MASK should be 0 to (width - 1) bits. Fix it. Fixes: 1c3541145cbf ("clk: qcom: support for 2 bit PLL post divider") Cc: stable@vger.kernel.org Reviewed-by: Konrad Dybcio Signed-off-by: Satya Priya Kakitapalli --- 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 d87314042528..9ce45cd6e09f 100644 --- a/drivers/clk/qcom/clk-alpha-pll.c +++ b/drivers/clk/qcom/clk-alpha-pll.c @@ -40,7 +40,7 @@ #define PLL_USER_CTL(p) ((p)->offset + (p)->regs[PLL_OFF_USER_CTL]) # define PLL_POST_DIV_SHIFT 8 -# define PLL_POST_DIV_MASK(p) GENMASK((p)->width, 0) +# define PLL_POST_DIV_MASK(p) GENMASK((p)->width - 1, 0) # define PLL_ALPHA_EN BIT(24) # define PLL_ALPHA_MODE BIT(25) # define PLL_VCO_SHIFT 20