Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp2076769rwo; Thu, 3 Aug 2023 04:30:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlHaN76CMPLDLl5WwAF42rLwxt5I8e/GPCsOGinBoFVLhkrW3d6UcXGFAOrlQgHnYXQoOg9t X-Received: by 2002:a50:ee12:0:b0:522:405e:dc1b with SMTP id g18-20020a50ee12000000b00522405edc1bmr7184101eds.36.1691062225535; Thu, 03 Aug 2023 04:30:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691062225; cv=none; d=google.com; s=arc-20160816; b=qFPwjdoAzjUHKx+lFp52eppwPwgZW1V8L7Jb1c//5EOtHgs7xKVr85e+73oAxDDD60 6e+BTj60CVfM3T2W9LzSBYFEDFRK/0quYZFsbIENHATE59NZsWhte6uC8AA9Z5Bcv2fM e/WLNbzDl8xkPuNN+FItaoS8ZQTwAtHNsy3DiJj7xcMoZUV4oo/gRlqo1QvBET57thOi +GSmP9dLzYw14PWOwcsKhiCSbiPX3Vthv2DlE0esIE9IkWDh82+Him7leq6Jct+cqJw5 NW1bV3yUkLuUYO5fjn64cvKa0KmOejZFAIEB4zhb7OQ6uJ2WF9JGn6Pf+G7RThsPgSUf bZ4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4SyeQspML/A9eUNxJj/DuxhbRjNbVUrslGvkB6v5bWM=; fh=JGIPdwR/ghosjNwmGX0PEjhcJN3y9idmuh+UBOLugoc=; b=I6kQx/nLnwOG5/AD79BXfu6tm04HbrYhwrPexNuvicJXy6IdJ1SqRvXd/yuuJV2/83 YOUhWuVny3dmy8s7DYaz0Z5ngvFUtzLTYVWRHG9xC0sHftWw4fBrV/LpKdm+F8IWiZWR 1k8aE5X5Xp04O9ltpMK8/jBH7HTX3bw+ZUwGaKzpC4CUjSA5g1u4Q4S000lCZs8PE4jm l6hwb+GO926Dta8QMnjZPmtji26AIpynbjCa7ni0xTw5IPJHC0wMULzzNp7eiXFdxEMq i4QdBmH+hAdvxXX6JAtGquCDAOOmD8+VcYJs518r1jASUXAegCyPPYxmKrmiWISINseI taew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=RG3tjmCv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d14-20020aa7ce0e000000b00521e50a9c89si8889118edv.435.2023.08.03.04.29.57; Thu, 03 Aug 2023 04:30:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=RG3tjmCv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235541AbjHCK7D (ORCPT + 99 others); Thu, 3 Aug 2023 06:59:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235457AbjHCK6t (ORCPT ); Thu, 3 Aug 2023 06:58:49 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7496D30F1; Thu, 3 Aug 2023 03:58:35 -0700 (PDT) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3736nw5L030213; Thu, 3 Aug 2023 10:58:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=4SyeQspML/A9eUNxJj/DuxhbRjNbVUrslGvkB6v5bWM=; b=RG3tjmCvQ2Vo1oRld5KsOpoDwEz3wfjt2Nx7s0Org9cOfNNluiZae948n3kO8SxJxWqw Kt13TqlJJXMdz13e6JRj082m8tx97bGtED54eh77QCOihChYuqOT+DBkJbh911kOd0OY PE12m7Ki6/aZZU9LGucbaq91DaTyadsxYcIKGuius+xOvD0YqLxuNQmA0jvbphqBrnR3 x2+BIcZIu7YH0dn5EpW25xftgfm5hqEa8abwFMTGWkFCjttKgqnKvtQqV0ILLkScDUBX xPZtVkpYEepW8nQu82ZpV/ICzSu90rm6k/kYyqHGRXH3OxhyABiRkSE79XgZMBTc4UTQ +g== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3s7upp1pha-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Aug 2023 10:58:31 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 373AwUMK026727 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 3 Aug 2023 10:58:30 GMT Received: from hu-imrashai-hyd.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Thu, 3 Aug 2023 03:58:24 -0700 From: Imran Shaik To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: Taniya Das , Imran Shaik , Dmitry Baryshkov , Melody Olvera , , , , , Jagadeesh Kona , "Ajit Pandey" , Satya Priya Kakitapalli Subject: [PATCH V5 3/8] clk: qcom: gcc-qdu1000: Fix clkref clocks handling Date: Thu, 3 Aug 2023 16:27:36 +0530 Message-ID: <20230803105741.2292309-4-quic_imrashai@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230803105741.2292309-1-quic_imrashai@quicinc.com> References: <20230803105741.2292309-1-quic_imrashai@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: KajWLGGAivijm5xfZVnY9oWZTyEGiETS X-Proofpoint-ORIG-GUID: KajWLGGAivijm5xfZVnY9oWZTyEGiETS X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-03_09,2023-08-03_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 clxscore=1015 malwarescore=0 spamscore=0 lowpriorityscore=0 mlxlogscore=999 bulkscore=0 impostorscore=0 priorityscore=1501 adultscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308030098 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Update the GCC clkref clock's halt_check to BRANCH_HALT, as it's status bit is not inverted in the latest hardware version of QDU1000 and QRU1000 SoCs. While at it, fix the gcc clkref clock ops as well. Fixes: 1c9efb0bc040 ("clk: qcom: Add QDU1000 and QRU1000 GCC support") Signed-off-by: Imran Shaik Reviewed-by: Konrad Dybcio --- Changes since v4: - Update the commit text Changes since v3: - None Changes since v2: - Split the patch as per the review comments - Newly added drivers/clk/qcom/gcc-qdu1000.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/clk/qcom/gcc-qdu1000.c b/drivers/clk/qcom/gcc-qdu1000.c index 9fa0616952d9..6a6e0f55516a 100644 --- a/drivers/clk/qcom/gcc-qdu1000.c +++ b/drivers/clk/qcom/gcc-qdu1000.c @@ -1448,14 +1448,13 @@ static struct clk_branch gcc_pcie_0_cfg_ahb_clk = { static struct clk_branch gcc_pcie_0_clkref_en = { .halt_reg = 0x9c004, - .halt_bit = 31, - .halt_check = BRANCH_HALT_ENABLE, + .halt_check = BRANCH_HALT, .clkr = { .enable_reg = 0x9c004, .enable_mask = BIT(0), .hw.init = &(const struct clk_init_data) { .name = "gcc_pcie_0_clkref_en", - .ops = &clk_branch_ops, + .ops = &clk_branch2_ops, }, }, }; @@ -2275,14 +2274,13 @@ static struct clk_branch gcc_tsc_etu_clk = { static struct clk_branch gcc_usb2_clkref_en = { .halt_reg = 0x9c008, - .halt_bit = 31, - .halt_check = BRANCH_HALT_ENABLE, + .halt_check = BRANCH_HALT, .clkr = { .enable_reg = 0x9c008, .enable_mask = BIT(0), .hw.init = &(const struct clk_init_data) { .name = "gcc_usb2_clkref_en", - .ops = &clk_branch_ops, + .ops = &clk_branch2_ops, }, }, }; -- 2.25.1