Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp846446rwb; Thu, 18 Aug 2022 13:23:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR5cE/hAK7gq+wsnS3iLq6Orygaz+1yJJYh6FK455dbNsY8hT8W/edx8/SIlC7r/OfdWMwIQ X-Received: by 2002:a17:907:d9e:b0:731:1a5:8c68 with SMTP id go30-20020a1709070d9e00b0073101a58c68mr2870952ejc.365.1660854230486; Thu, 18 Aug 2022 13:23:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660854230; cv=none; d=google.com; s=arc-20160816; b=jUXxMCqGW2gMiEPba0KAPXAQk5fXaB6FfIOeFOv3vCwpo8xp4HTkLZjW0cQDQ6ADxK 1v32g4BOWZamCw7pYIVK26sUqffyh/3IBcZkVyqTZou1+fqTbnfsdbiub/BQEIf/EAgg YpZFXfzvs+k+3f4dMQvoCFb0YhNQDEkhBcBgmYv5wnrTZGTOxzIL2Y80UcbFg5rQ16OA zYdUgYcFNjooKz5CHVpd06GuWXpBspmebZEEjTDGXPmtv7agZ/jtqHcW714cLsbwNPuY VYsEq+SdS271xGrtQ49eEO2Kb2V5x6SYIQPlMbVWV0wKJCovnIxTwFcJmrBMxCuGJAe5 GXYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=u0fa4c5sD2eB6IMzsFRWJT5E5T+P+DVvpkmV/TCgS8o=; b=tiPSFxUQwI+1QM9uY1fcdMxi7kWgeqnKJmojWE6LCD3Jua8EdIzULq4k5lGw9gp/Ve x+kqgA48BJLdfLFNww6eR0Fyo7ciJp3D68b+1eIhFGctJu4J2vO2Y4CHkQqkpYN3gqjC MJ2xOPqe6lL0DbHBJCuEY3ypzeG1cocU5OT/9b14HYbDhbqbx6PN+X0cDSxet6HKRp34 Yrqgwa/Erg9Y+bMAcsangaraTBSpFfgNQG/UeRrA36BKyQRBl9hKZ6txX8NRY4/bSI1Q sO9n6PNHRIh9YO02mjaXOIr4P1kngeBmRAHu54dwYXhEfL9T/bt88t5bRPx4IgUrGr+d phEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=QJQHJmZe; 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 k1-20020a17090632c100b0073301a22cb7si1438555ejk.294.2022.08.18.13.23.25; Thu, 18 Aug 2022 13:23:50 -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=QJQHJmZe; 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 S245575AbiHRUTM (ORCPT + 99 others); Thu, 18 Aug 2022 16:19:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232033AbiHRUTK (ORCPT ); Thu, 18 Aug 2022 16:19:10 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9010594120; Thu, 18 Aug 2022 13:19:09 -0700 (PDT) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27IGLoZr024158; Thu, 18 Aug 2022 20:18:58 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-type; s=qcppdkim1; bh=u0fa4c5sD2eB6IMzsFRWJT5E5T+P+DVvpkmV/TCgS8o=; b=QJQHJmZeC54S3Ul8SdObNljBe+8ESWqiXIc5+8/R9s0qdUC/JXHNRvoRFZKhA2iRRGDW 4I9lUsECsVN1CakHYV3MqzmyD6Kghj96ABao9SeB44j5Vx/HDlkII2VH2aoiLeTbJ494 PWCSw/2IoF3fTvXy8yMWruInO5J8t/2WRdjhSoI2/1U1+nc4YF4pwNUy7kmqT+3iN9YS rgfx/IuJBo+SDeYGX3hHe51FqdwY0SJHnGWB4Oa0krC7m6+1YK/0FlCXq1HunuoyDGN9 KekYS+hDSnIHuYA1Cz2VUYF6zeqoTM3XwwIm05gFgyiEcJfyAiC8NFUdaEqA7R3Dlj+G 6A== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3j1rvb0t09-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Aug 2022 20:18:58 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 27IKIvS3019713 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Aug 2022 20:18:57 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; Thu, 18 Aug 2022 13:18:52 -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 , Krzysztof Kozlowski , Michael Turquette , Rob Herring , Stephen Boyd , , , Subject: [PATCH v3 0/5] clk/qcom: Support gdsc collapse polling using 'reset' inteface Date: Fri, 19 Aug 2022 01:48:34 +0530 Message-ID: <1660853919-987-1-git-send-email-quic_akhilpo@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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: rUd7NoZLXLnunYI86YZikc3uStvdA_Kl X-Proofpoint-GUID: rUd7NoZLXLnunYI86YZikc3uStvdA_Kl X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-18_14,2022-08-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 priorityscore=1501 phishscore=0 adultscore=0 bulkscore=0 spamscore=0 mlxlogscore=771 impostorscore=0 malwarescore=0 lowpriorityscore=0 clxscore=1015 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208180074 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 Some clients like adreno gpu driver would like to ensure that its gdsc is collapsed at hardware during a gpu reset sequence. This is because it has a votable gdsc which could be ON due to a vote from another subsystem like tz, hyp etc or due to an internal hardware signal. To allow this, gpucc driver can expose an interface to the client driver using reset framework. Using this the client driver can trigger a polling within the gdsc driver. This series is rebased on top of linus's master branch. Related discussion: https://patchwork.freedesktop.org/patch/493144/ Changes in v3: - Use pointer to const for "struct qcom_reset_ops" in qcom_reset_map (Krzysztof) Changes in v2: - Return error when a particular custom reset op is not implemented. (Dmitry) Akhil P Oommen (5): dt-bindings: clk: qcom: Support gpu cx gdsc reset clk: qcom: Allow custom reset ops clk: qcom: gdsc: Add a reset op to poll gdsc collapse clk: qcom: gpucc-sc7280: Add cx collapse reset support arm64: dts: qcom: sc7280: Add Reset support for gpu arch/arm64/boot/dts/qcom/sc7280.dtsi | 3 +++ drivers/clk/qcom/gdsc.c | 23 +++++++++++++++++++---- drivers/clk/qcom/gdsc.h | 7 +++++++ drivers/clk/qcom/gpucc-sc7280.c | 10 ++++++++++ drivers/clk/qcom/reset.c | 27 +++++++++++++++++++++++++++ drivers/clk/qcom/reset.h | 8 ++++++++ include/dt-bindings/clock/qcom,gpucc-sc7280.h | 3 +++ 7 files changed, 77 insertions(+), 4 deletions(-) -- 2.7.4