Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp187824rdh; Sat, 23 Sep 2023 06:40:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEV+1Z57LetgK3vjx7gCGbrF3bAsKD9B8j7PVbUCO9z+3DFnj2QA+LSxdAWcxC6dmcdJ7z5 X-Received: by 2002:a05:6a20:ce94:b0:154:d3ac:2063 with SMTP id if20-20020a056a20ce9400b00154d3ac2063mr1619207pzb.27.1695476429597; Sat, 23 Sep 2023 06:40:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695476429; cv=none; d=google.com; s=arc-20160816; b=y78h0X5kt45/wdBhgzcwumIdPyrpy1eLFeFf0WiNKmlwhyi/WkSEYXw9NNlXfDy6Uv Q5tzCHZkLmoVreEHSUjuFLP1h8GgGydGVWg3hHR2i1F4BtXPD09ZmDGHKi8T3NBiZedZ /LJcs+xG49OY3EXgmeYkFIsP6bWscjgB0mdbik7WnAo9vYg238yrmF7DHT4rPQhMCnFK vMoZmxvrAqT3yZk0UEpH9BghC+R2nk5UfONu4DZ5p8sCUAXRRrgFGWVn7/glERBO/DAB qm7mEDUMi5hZKL05M0+gVf1Sdndy+O+eNfQdXtJZEqx2r0rhfIf8UJJNVMvFzyZbs5gf ohjA== 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=b1857FLOQSRxzG68XgKsgrn5ypjSpF2IfXWOK1N5n/8RMEMICFmbuE8cy73ihWDx/k SGaaJczJmiLIOq1ER7sV6xcswI3WZnyDbOhC2kQUkCM70BKAcwb7DnLjk3/2qcKClErW hDs/6IYifMVWQsw7tL4+m6j8kOJk1qrIocA41LmC3G3JC4j0t6hKEIvP66dqkonYUpOz ouHXxxxCloy7F1oUGKUfyISaThA7OSt1yrmBzdsnf9caxEKPNN2oITQltgMph5i3SxlS mZ5VEsE2mDIzYGe+D0/Psq5Dnp1y9yntuo/4EDkVp22M6FuuvO6vDrI/lW9g6e+eIYgl IKeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Ih+IELy+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id y3-20020a17090322c300b001c42d60b9e6si6626896plg.112.2023.09.23.06.40.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 06:40:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Ih+IELy+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 085BE80658FE; Sat, 23 Sep 2023 04:22:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231278AbjIWLVs (ORCPT + 99 others); Sat, 23 Sep 2023 07:21:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229655AbjIWLVq (ORCPT ); Sat, 23 Sep 2023 07:21:46 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DE70199; Sat, 23 Sep 2023 04:21:40 -0700 (PDT) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38NBLQaI022841; Sat, 23 Sep 2023 11:21:26 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=Ih+IELy+v4b4uP9olEB5jsGBRhnFgjutFj9HiYaF+4DEghAVVQsgW+cF20x2Ah8yQzFG IfFG8HB5hF7vL5jhVbyoI+C6y7JXm/h7jGqpoRVMkT9zcC1T2yFKJQCkgiEG/Q60NdkI /e31QGUAr5Ld+4mDMoCVpQjmbKdak77S6WjGeiwmAkCo9CeLwixnKrHm0u48hgXHRB88 kSYUiyHzbjjPVTDrek4yfOMzs27IRBgKLJzpv0Vi/vehtzPJ/I7t+VVO5fhSQk46gf9y IQyrqZeWm0OQK0N6cCjYbslrMzRqxD7ng3zYI9qWZnHG8fqDLbskfOviN8+Lcq9NQVWR Lg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3t9rsq0na8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 23 Sep 2023 11:21:26 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 38NBLPbR008488 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 23 Sep 2023 11:21:25 GMT Received: from akronite-sh-dev02.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.1118.30; Sat, 23 Sep 2023 04:21:21 -0700 From: Luo Jie To: , , , , , , , , , , CC: , , , , Subject: [PATCH v9 1/4] clk: qcom: branch: Add clk_branch2_prepare_ops Date: Sat, 23 Sep 2023 19:21:02 +0800 Message-ID: <20230923112105.18102-2-quic_luoj@quicinc.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230923112105.18102-1-quic_luoj@quicinc.com> References: <20230923112105.18102-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: 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: WaA9yBbmlvQQCgmGZcjQAOCn--htbPuw X-Proofpoint-ORIG-GUID: WaA9yBbmlvQQCgmGZcjQAOCn--htbPuw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-23_08,2023-09-21_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 malwarescore=0 spamscore=0 impostorscore=0 bulkscore=0 mlxscore=0 phishscore=0 lowpriorityscore=0 adultscore=0 clxscore=1015 mlxlogscore=801 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309230095 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 23 Sep 2023 04:22:01 -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