Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp894784rdf; Fri, 3 Nov 2023 20:49:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFMk75cRNSCjMLh2+b+1/O6PJ6DzDsoM52a5oXoOrCOnyMcbIbNb28pEceHxSU/XK9aAuxc X-Received: by 2002:a05:6358:6f1d:b0:168:d2f8:d2ad with SMTP id r29-20020a0563586f1d00b00168d2f8d2admr19849737rwn.7.1699069781965; Fri, 03 Nov 2023 20:49:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699069781; cv=none; d=google.com; s=arc-20160816; b=Q3siig6XJRxLcTpW22sBUZGV14Oe5J3Y0482sLvdJMAUDt5IaYJ26FvppFlqQi+LDB XPTr8Wd9SMAZU/muxAkbTmn8+CRHRjLM17t0XcXwTaPDKR0jHoxxrsn/W+885vCNOJM8 gpiszuUClesjcEmADeXj5UL2mW2+QbnPaFJsW4L1/pnU+MpjcOJZDUMgLcka+lFWmYbQ Bwf5pq27wpgipzbpHCUnhnR6mzgc4Av2jeAhZTCQZxF+hW2gmJhtLw68xm/d/L9rO1JL DdPeBSa99iyMZUPXnl3jg1rbMy9y8g4Cq6bXTg/r9e22+zEuAEihtm0uhF9Ih5FMzR06 Z7YA== 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=ZuD+kzTK3GMqMh4cRFD6FbY1OqwfVp6oqKPDZbwG/ng=; fh=1N2DBqAE4qlJ/MdmzyBAVyqZb6NxbBXSfjSgYrLDqv0=; b=Ec9lrDOfq9sOmQf73Uoz+8TWfSVavIP+MWe98JzLgSuOvXPPX45J56dknAJtp56BXQ rhJR5oHYYLH6Ahh/bpvSlQmxeVqR7EIG+uOosxgqRv1LOSrTSzDua7WnTp7wvrhRwMo2 RkDLRvgeamm7WFjQw1crf7DRuhK5T+efAdmeXeZxEl/HdStLDlU8k2XE3r4sN/t3TQtz q8U8eD85Un1qYS7u3Ymeqa2ff+G3y78R8VY4HYq51yU24ys4+SYUvntygo7XbDSfkhyz AWAJH4gOxCwbUgOIkmR8OdW4rssoCvbPkKIHWZ8b9UKmvcxU9dWmZ1F87APUJxeDiNgy vAFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="Khqte9H/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id o18-20020a170903301200b001c722b269b4si2723036pla.620.2023.11.03.20.49.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 20:49:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="Khqte9H/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 6251981BC49B; Fri, 3 Nov 2023 20:49:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232346AbjKDDt3 (ORCPT + 99 others); Fri, 3 Nov 2023 23:49:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229585AbjKDDt1 (ORCPT ); Fri, 3 Nov 2023 23:49:27 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E62718B; Fri, 3 Nov 2023 20:49:25 -0700 (PDT) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A43htEi011994; Sat, 4 Nov 2023 03:49:16 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=ZuD+kzTK3GMqMh4cRFD6FbY1OqwfVp6oqKPDZbwG/ng=; b=Khqte9H/fuvcFDhdnYHG+LFGm5Abae7k/PzN76oARicC4kuMDdL7D7HGbObqm7KJhbl9 7f4yZOZkfepRp4GjiA5RIJIJewHdWqA+LSB7PK3Umb1v0OW8wKnnwSH+2F5b/U9IFHO2 xL8u3h9dMrwqq4EYoetvpRUgzDuGbFAgRJtOVRa6LWnvaJqGKBVOqIsqoGadI+r6/5tE oxjst8iqKNQdOTvtTdwgWaH56/sjvTdexWyjLhGSwV1SQeK21y8tAcR3vzw67naUqQjo LjCkRgSW6Tzab+y9ZR86Rd6aXwUJ17+oWTv3bcb34qAHtunhihT8i1OiurC+xXrLtxeO 1Q== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3u4sddjkea-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 04 Nov 2023 03:49:16 +0000 Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3A43nFQU002677 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 4 Nov 2023 03:49:15 GMT Received: from akronite-sh-dev02.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Fri, 3 Nov 2023 20:49:11 -0700 From: Luo Jie To: , , , , , , , , , , CC: , , , , Subject: [PATCH v12 1/4] clk: qcom: branch: Add clk_branch2_prepare_ops Date: Sat, 4 Nov 2023 11:48:55 +0800 Message-ID: <20231104034858.9159-2-quic_luoj@quicinc.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231104034858.9159-1-quic_luoj@quicinc.com> References: <20231104034858.9159-1-quic_luoj@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 3i2rC2TnNyzTJbx5DK11ni_CaVBV1xe1 X-Proofpoint-GUID: 3i2rC2TnNyzTJbx5DK11ni_CaVBV1xe1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-04_01,2023-11-02_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 malwarescore=0 bulkscore=0 lowpriorityscore=0 adultscore=0 impostorscore=0 priorityscore=1501 mlxscore=0 spamscore=0 clxscore=1015 phishscore=0 mlxlogscore=796 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2311040031 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 03 Nov 2023 20:49:37 -0700 (PDT) Add the clk_branch2_prepare_ops for supporting clock controller where the hardware register is accessed by MDIO bus, and the spin lock can't be used because of sleep during the MDIO operation. The clock is enabled by the .prepare instead of .enable when the clk_branch2_prepare_ops is used. Signed-off-by: Luo Jie Acked-by: Stephen Boyd --- drivers/clk/qcom/clk-branch.c | 7 +++++++ drivers/clk/qcom/clk-branch.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/clk/qcom/clk-branch.c b/drivers/clk/qcom/clk-branch.c index fc4735f74f0f..e22cdcf694f6 100644 --- a/drivers/clk/qcom/clk-branch.c +++ b/drivers/clk/qcom/clk-branch.c @@ -153,3 +153,10 @@ const struct clk_ops clk_branch_simple_ops = { .is_enabled = clk_is_enabled_regmap, }; EXPORT_SYMBOL_GPL(clk_branch_simple_ops); + +const struct clk_ops clk_branch2_prepare_ops = { + .prepare = clk_branch2_enable, + .unprepare = clk_branch2_disable, + .is_prepared = clk_is_enabled_regmap, +}; +EXPORT_SYMBOL_GPL(clk_branch2_prepare_ops); diff --git a/drivers/clk/qcom/clk-branch.h b/drivers/clk/qcom/clk-branch.h index 0cf800b9d08d..f6f355f28b71 100644 --- a/drivers/clk/qcom/clk-branch.h +++ b/drivers/clk/qcom/clk-branch.h @@ -85,6 +85,7 @@ extern const struct clk_ops clk_branch_ops; extern const struct clk_ops clk_branch2_ops; extern const struct clk_ops clk_branch_simple_ops; extern const struct clk_ops clk_branch2_aon_ops; +extern const struct clk_ops clk_branch2_prepare_ops; #define to_clk_branch(_hw) \ container_of(to_clk_regmap(_hw), struct clk_branch, clkr) -- 2.42.0