Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp4604rwb; Wed, 17 Aug 2022 21:21:40 -0700 (PDT) X-Google-Smtp-Source: AA6agR4plAKsZobxFh5DIAyTx9Dyzj5rIHHCE6in8jd3MWc/OLxh4AgHIS/nEbJLaHbCQa4uNHUB X-Received: by 2002:a17:902:7b87:b0:172:8ae9:2015 with SMTP id w7-20020a1709027b8700b001728ae92015mr1057994pll.112.1660796500702; Wed, 17 Aug 2022 21:21:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660796500; cv=none; d=google.com; s=arc-20160816; b=RClTak54mVcP7ome0jjJoZ5y8nsQ/HnYe4JQQrGiWhc6GzujM8lDF0Qbo9Yb7YWM+s ILmAptJ2ADCgJrXciRAYnHMN3RkbN+pHIGPDVy9MRvijAyrHPzHeWl4tKblTZCRpIYB6 vxHkNcz0w2B5aTg0uK0tWlmMOuc3r5umldbr6TjZ1C37rFRmIyZKsPXCy8jypqkVAC1f Yn3KtxfVZHAafKcQur9oSVGImGGltF9DKxXDCWS7dKEHyB9LpOqZAnS8u7fVGV1gv2GJ m03SbZhnw4i7iivejlx3iWI/FR88BE6dayW2KuRnxxkbWUjV9M2wT6DgNUyhwKzHtcE5 Muew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=EHtGBxEEfsfmnWP4PpzyBBgLU2KALug2bILXvp24eh0=; b=DqycrfRHaBZM+RG+M2BEZ7vDXvLBOyZSrQ3GNXC/11IYGUAjpRxkQ3j0SvXLSLOOq9 OPGddEZB2NAwb4XyF6V7qBmZp0J1EkpRvLjV5/JlBWO8oBDcr021TmrWgpuhUjmWqMFG /D8SlpopB5x6/NDeGUnhFbwQctGSim6FR9tbR3px9/5pnMYO8D3vTx1Vhlur5S8TxpRP MtAHC/ZQeLAOY9RDU5IMYIlY4YqmWLbbpuWFqszcNwRbVV5KV/vISXWOfFlLWRYVFRUj +xNFvnOikK8bnS7d6gkvuvuTvTDuk7zAGQNlJCv1rHUq3EcMSrZcQ7XOICCbsP7ezIv5 +GAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Qbu0WQDl; 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 v14-20020a17090a00ce00b001ed3b95efa5si3226284pjd.96.2022.08.17.21.21.01; Wed, 17 Aug 2022 21:21:40 -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=Qbu0WQDl; 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 S243240AbiHRER5 (ORCPT + 99 others); Thu, 18 Aug 2022 00:17:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243157AbiHRERf (ORCPT ); Thu, 18 Aug 2022 00:17:35 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6CE7AB057; Wed, 17 Aug 2022 21:17:31 -0700 (PDT) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27I2hVto018386; Thu, 18 Aug 2022 04:17:22 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-type; s=qcppdkim1; bh=EHtGBxEEfsfmnWP4PpzyBBgLU2KALug2bILXvp24eh0=; b=Qbu0WQDlkHHqMGugLNLo6b1DYYMN3NkGNeNtIV33DE41BagSxGIXQT0hSDxvvtiFM3jV px9WUrAnACoSKEo2FW8oyCR1fA2PaPzPuYKdhnDPtTMUfXAPm6kTrt0pJ4oGv9G6k89S 2powAwqwevVvz60n+ayX3SRD2p0EtA/hv5/ZLvx08xm3DNNV9Z7+CjJ/pgtsiHgMTWCN zL86hOF3hJXZlTXQ3oPxQav0xl7rmZhSvjMN+n/UJnQBtkfLk+suHXIxdt32ygV/2McY VT060MntEY5HplxO1iLT3BIFEIS7hkzIBWl2CqfSJdOg2VW807A/NHgPZe0KzyrcTFTK ww== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3j08wmgty7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Aug 2022 04:17:21 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 27I4HJAf009952 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Aug 2022 04:17:21 GMT Received: from hyd-lnxbld559.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 17 Aug 2022 07:58:36 -0700 From: Akhil P Oommen To: freedreno , , , Rob Clark , Bjorn Andersson , "Stephen Boyd" , Dmitry Baryshkov CC: Douglas Anderson , , Akhil P Oommen , Andy Gross , Konrad Dybcio , Michael Turquette , Stephen Boyd , , Subject: [PATCH v2 4/5] clk: qcom: gpucc-sc7280: Add cx collapse reset support Date: Wed, 17 Aug 2022 20:27:53 +0530 Message-ID: <20220817202609.v2.4.I5e64ff4b77bb9079eb2edeea8a02585c9e76778f@changeid> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1660748274-39239-1-git-send-email-quic_akhilpo@quicinc.com> References: <1660748274-39239-1-git-send-email-quic_akhilpo@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: fqdzOf--2robkilEWfzfRDQmP1UYrOk- X-Proofpoint-GUID: fqdzOf--2robkilEWfzfRDQmP1UYrOk- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-18_02,2022-08-16_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 phishscore=0 malwarescore=0 mlxlogscore=999 impostorscore=0 clxscore=1015 suspectscore=0 mlxscore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208180014 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Allow a consumer driver to poll for cx gdsc collapse through Reset framework. Signed-off-by: Akhil P Oommen --- Changes in v2: - Minor update to use the updated custom reset ops implementation drivers/clk/qcom/gpucc-sc7280.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/clk/qcom/gpucc-sc7280.c b/drivers/clk/qcom/gpucc-sc7280.c index 9a832f2..d4bc791 100644 --- a/drivers/clk/qcom/gpucc-sc7280.c +++ b/drivers/clk/qcom/gpucc-sc7280.c @@ -433,12 +433,22 @@ static const struct regmap_config gpu_cc_sc7280_regmap_config = { .fast_io = true, }; +struct qcom_reset_ops cx_gdsc_reset = { + .reset = gdsc_wait_for_collapse, +}; + +static const struct qcom_reset_map gpucc_sc7280_resets[] = { + [GPU_CX_COLLAPSE] = { .ops = &cx_gdsc_reset, .priv = &cx_gdsc }, +}; + static const struct qcom_cc_desc gpu_cc_sc7280_desc = { .config = &gpu_cc_sc7280_regmap_config, .clks = gpu_cc_sc7280_clocks, .num_clks = ARRAY_SIZE(gpu_cc_sc7280_clocks), .gdscs = gpu_cc_sc7180_gdscs, .num_gdscs = ARRAY_SIZE(gpu_cc_sc7180_gdscs), + .resets = gpucc_sc7280_resets, + .num_resets = ARRAY_SIZE(gpucc_sc7280_resets), }; static const struct of_device_id gpu_cc_sc7280_match_table[] = { -- 2.7.4