Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1210357lqh; Sun, 5 May 2024 23:38:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXbPfyBs75KWbFNHSAntSs7tAVlV9YMXSMLc/y78Oz/G6RXMESBMcosKPfDm6HzCrgVwLIq7soqAyMUT0HXzAV8kMZXJSvDh29/Z+GJbQ== X-Google-Smtp-Source: AGHT+IHH3Uk6jLLeRt/OrayCmSob+C6/XgD0ne6alRdQO6qxf5/qxK/PDkFt42+5XrA3RbVgIOsp X-Received: by 2002:a05:6a20:a113:b0:1af:5eb7:3e1e with SMTP id q19-20020a056a20a11300b001af5eb73e1emr10408816pzk.54.1714977503689; Sun, 05 May 2024 23:38:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714977503; cv=pass; d=google.com; s=arc-20160816; b=afNk5nSWU7Al9frSIETKap7Cyr9DakvWSnEpZcGre/EjZmmoWLmc2hY5ZhhHlM7tkt n9TxiotJCq9P56Ctvtkf+sKDY3s+cssiGIgOT58beTk8RtfapVaMzTKT5Jjp+D8ISGQ0 WAu2VWFi5aMO1TXk/13VeZZjf+Off+w+keGlUW7h3AMYqe6ua8MklX8M8LGiwwvHhymw ov0RbA/IX0BD7fLxfS6yBxZvdPcW9quriZJXuFvh/nlH+OP0zBwnbKgG517fYOMX3wci f0DYuG9oAbQ4neAKWIH8BwPQUgJb1A1kaf/JmipqthvRBUgPWAlGnW/ODevMqx/8Tth+ M5jQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Qkzc1RV3d+RExsQmBI/r3vkO3Al2pizB5aSZEMiGVnc=; fh=rOkNeWHC153JHwWU7c46+5tZuxsUf5NT+RhlSxcT2mE=; b=msTAGVn86WY3EdT5r1tnxCOwUCnGW/YZGUK21rco3PTaLyZa9biVxHojH7I23Oc7DW FyKiBJJc3sI34alGbc1S9nlia5aeCyY2xM3vQjLK4VE1G+HFv9bXYATe32OEOSXDcNAc EKEH/aU/8SykJVcZzASc8WOmN94j0KIc/JoUVX//wMz16BEBZ4afu3yhKTO30v4JXwxF bOrpEtrjSp85D5MTl+jlFk2ZIHK6rJ5w2dPHLEyLdhAOSaCwkm0E5Sy/mDhRlxnFXZrJ 8OjROCPJcjXkK9ElPCEPkbT8L07T8d9JEgFQ7vVG5uv1II4fNBIlmdKIxRWPD1N6D3IM M3CQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=hbWw03pc; arc=pass (i=1 spf=pass spfdomain=qualcomm.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-169368-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169368-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id z8-20020a17090a014800b002b118a7c2e8si7685586pje.44.2024.05.05.23.38.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 May 2024 23:38:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169368-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=hbWw03pc; arc=pass (i=1 spf=pass spfdomain=qualcomm.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-169368-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169368-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D86EDB20CBB for ; Mon, 6 May 2024 06:38:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3C3E4DA06; Mon, 6 May 2024 06:38:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="hbWw03pc" 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 1F9433BBE8; Mon, 6 May 2024 06:38:02 +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=1714977484; cv=none; b=cFwA+RO71izu064e6xMCzvvSf1F1Lou8syCu2H/tr0YrdzCBi8uw1ObZR0HNhh1XTVVTIin4Jgn5mQOv12YPAZz1ZwxeU6tkprcchQjDO5OFl8S1X8r8o4KahycArQxs6Le/GlBKaVQ0DR23skChYOXBZj1p7QvtIkXEJOCuAQw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714977484; c=relaxed/simple; bh=WkuDHUy0Rpe3/0hm/IOKIERWznsN9LEpDgFyIbLyzGo=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=AVztglPM9ymnmll5MZG+B1Eu0gua/LiSSa7TmLRRLjHgMnnR4sYlv0Mb1Tjq5qFAwtWJuwYgVghNH1eGEhh648XnzCmR19efkneyLCSI/wS7XAQvuWpGxndxyiMbtpyo77W8rmNjP8Hy00FXnVoAxKu809xwEPHs8r8nmhr4c5A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=hbWw03pc; 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=qualcomm.com Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4463xesb020582; Mon, 6 May 2024 06:37:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=qcppdkim1; bh=Qkzc1RV3d+RExsQmBI/r 3vkO3Al2pizB5aSZEMiGVnc=; b=hbWw03pcMQ/nrdRVRVB86n0Zj8wDA8E6wiDj oXb7dGFtzY0awJGx9WQqPv9gIh2zO9NXBIg814gHL2CvY6vDW/y8LgICsF9QCjoP S2Guo6fecqCyRfLwoGdKhK4VISebM/2CxrCnm4ibfKwlp/E78KjbGN2QnCdsCJ6U lejw/9U1SZcgNC0cva1JBDkMkg6hTTBhOpCPyNmeYR5fo4jp04c3uQA3epfXyVn2 8jYdPyx32FxKToOMU7biuF82hDj8tukBe5MNEi17FjAz+NC9ydUMT5jsdiTTVd1X h+TnM42QPUSAUV1L3ZVaCLk+UvPK1x7RqnBvkZdoj6dq4ZoaXA== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xwd3yatvj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 May 2024 06:37:58 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 4466bt0P016397; Mon, 6 May 2024 06:37:55 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTPS id 3xwe3kdrqv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 May 2024 06:37:55 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 4466bte3016392; Mon, 6 May 2024 06:37:55 GMT Received: from hu-devc-blr-u22-a.qualcomm.com (hu-mdalam-blr.qualcomm.com [10.131.36.157]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTPS id 4466bt6O016390 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 May 2024 06:37:55 +0000 Received: by hu-devc-blr-u22-a.qualcomm.com (Postfix, from userid 466583) id 4F4B9414B0; Mon, 6 May 2024 12:07:54 +0530 (+0530) From: Md Sadre Alam To: andersson@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, quic_anusha@quicinc.com, bhupesh.sharma@linaro.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Cc: quic_mdalam@quicinc.com, quic_srichara@quicinc.com, quic_varada@quicinc.com, stable@vger.kernel.org Subject: [PATCH v2] clk: qcom: gcc-ipq9574: Add BRANCH_HALT_VOTED flag Date: Mon, 6 May 2024 12:07:51 +0530 Message-Id: <20240506063751.346759-1-quic_mdalam@quicinc.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: ErExOIK9WA1sqUCg2KsRqpd2IgRHsKFu X-Proofpoint-GUID: ErExOIK9WA1sqUCg2KsRqpd2IgRHsKFu X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-06_03,2024-05-03_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxscore=0 malwarescore=0 phishscore=0 mlxlogscore=999 adultscore=0 clxscore=1011 impostorscore=0 lowpriorityscore=0 priorityscore=1501 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2405060041 Add BRANCH_HALT_VOTED flag to inform clock framework don't check for CLK_OFF bit. CRYPTO_AHB_CLK_ENA and CRYPTO_AXI_CLK_ENA enable bit is present in other VOTE registers also, like TZ. If anyone else also enabled this clock, even if we turn off in GCC_APCS_CLOCK_BRANCH_ENA_VOTE | 0x180B004, it won't turn off. Also changes the CRYPTO_AHB_CLK_ENA & CRYPTO_AXI_CLK_ENA offset to 0xb004 from 0x16014. Cc: stable@vger.kernel.org Fixes: f6b2bd9cb29a ("clk: qcom: gcc-ipq9574: Enable crypto clocks") Signed-off-by: Md Sadre Alam --- Change in [v2] * Added Fixes tag and stable kernel tag * updated commit message about offset change drivers/clk/qcom/gcc-ipq9574.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/clk/qcom/gcc-ipq9574.c b/drivers/clk/qcom/gcc-ipq9574.c index 0a3f846695b8..f8b9a1e93bef 100644 --- a/drivers/clk/qcom/gcc-ipq9574.c +++ b/drivers/clk/qcom/gcc-ipq9574.c @@ -2140,9 +2140,10 @@ static struct clk_rcg2 pcnoc_bfdcd_clk_src = { static struct clk_branch gcc_crypto_axi_clk = { .halt_reg = 0x16010, + .halt_check = BRANCH_HALT_VOTED, .clkr = { - .enable_reg = 0x16010, - .enable_mask = BIT(0), + .enable_reg = 0xb004, + .enable_mask = BIT(15), .hw.init = &(const struct clk_init_data) { .name = "gcc_crypto_axi_clk", .parent_hws = (const struct clk_hw *[]) { @@ -2156,9 +2157,10 @@ static struct clk_branch gcc_crypto_axi_clk = { static struct clk_branch gcc_crypto_ahb_clk = { .halt_reg = 0x16014, + .halt_check = BRANCH_HALT_VOTED, .clkr = { - .enable_reg = 0x16014, - .enable_mask = BIT(0), + .enable_reg = 0xb004, + .enable_mask = BIT(16), .hw.init = &(const struct clk_init_data) { .name = "gcc_crypto_ahb_clk", .parent_hws = (const struct clk_hw *[]) { -- 2.34.1