From nobody Sun Dec 14 21:45:09 2025 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A4C02FF14E for ; Thu, 4 Dec 2025 04:43:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764823399; cv=none; b=hJZ8i0EqBVpRSkvZ8CcGTZxak2ah1TXWI9WJcs18QbmnLnTnDgQ4y2qS4Zlasmrpj8L8F4eZMuas6oNoPhb5DPeqE27u26pPPuETu623R8MMFlSwfXFFA3bp48t72qhLTNQyb47ZQRrur7QnhSumwuBUel2gw+YDIxHOVKHP8uQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764823399; c=relaxed/simple; bh=/fUCilk7cQkDDYH/V2caZpg8zsP8hHAk09zzZjiZ0fA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ua+4DiVhADl0HT7EidpZoPHJGG9CItlu+FGuSH8h+RrCQ/JPHuZBsJrncH/6RPXsfnFEMnae/BIviMsisSbTWVS6tIcCGLnu4+NZStVqDA3iJ8Dw6UJ+raIxVaPVa4ec+71g54p1f1K6AZSq9tINslgjWabbUZU7WpPA1CB95EM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=JtV66JXT; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=APKvxpsA; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="JtV66JXT"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="APKvxpsA" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5B3J89J43123781 for ; Thu, 4 Dec 2025 04:43:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= DyVbL0I8/PiNmAYsEUhziVGRGMTqi8AJFMbIQqrrco4=; b=JtV66JXTL6+DwMiS gFUiG+0N2j0I1ASgwOYIcV0Wb3m5m+UCzon3ruyAyy4V2MlCnfeWxZxzZdPBce4L KIPNBfzK5n1688iel1P5r6qFGx/IJIS5m/Urm0HdTYRNss5QhWwBlaMLcKMRZKNW pzQIhBmGolpFNtT2+aITZFKdPrmzoVrSs+nBJzI8nU226+AhUrYzbTh60RffRAVU 3rBBBJjVrBG/6iSRPfunIaHfj9dn9i0Nm8Viz42Riarbdf57myDcmep2ovcN05jb 6S9tD6MooerlLtfoMxRUIrVUhIp2D+Zs1RBUHsdc6DuT9YtZDG8gO9SZLOG9S0Go 8nCwiw== Received: from mail-ot1-f71.google.com (mail-ot1-f71.google.com [209.85.210.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4atu3h1d3y-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 04 Dec 2025 04:43:16 +0000 (GMT) Received: by mail-ot1-f71.google.com with SMTP id 46e09a7af769-7c6c91ba9caso941768a34.0 for ; Wed, 03 Dec 2025 20:43:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764823395; x=1765428195; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=DyVbL0I8/PiNmAYsEUhziVGRGMTqi8AJFMbIQqrrco4=; b=APKvxpsAoXmRS1wN1IF7tqe5DUJ+uuDQypp33f6vyuPDpLoxS+giaYZrYZKhmEjhDr nzPN1VGYwBgMugYvzlTQXpfXYteZVO7wXTIUuKtNB1tq4IMoaX/MjqzN0Z1EK/RbZc9t U0jJCYMX5EwMinhqXn/IzRnQ5f2x+YW7OxtGpv5CGboN5vu/vCTtTwmZpNJDyiWE1Sdx b40Gw6psF80Byr2xpktcNGvCcOu96kwdsP3UXItgWyXJuR0EJWCTj+zT08T503UqgDTd 6YTGHC7cFMU8vzGFUQNa+6wO75vZ5R4DuPnN1Vfb9geTdReeMk/JI7eJQ+qKUDQ9hOrx tUEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764823395; x=1765428195; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=DyVbL0I8/PiNmAYsEUhziVGRGMTqi8AJFMbIQqrrco4=; b=IA6Eg8zq1wDlcmqpQ7ndEby023f8AD/shyyLFfXxhmdPipXBcT7VM9aEBiy4JQVute w2/ltfhoRIyPxnNKQIcFETQd93ehl/rHyfWoU2pUU3cIFGrrXgiK5L610xS2hzeTE+oP 4Fq/6V/8/rTfpJ9L6F1jpZthe9G7uto6/UbRlIfMPzX1nt+1Wf3adQq8xWPDc4r5V1WN GfAromZAd0ExhKmM0xkbSMuPEQWu0iyNvWMbEKgd9soJFlNxDV+YAIinwat0uQJFj+Rl UmEXoDJjTrG4ARX9TQlSy5ITmZG4GPBvWCGYq/8fENdomEwVq04VK7p+LV4N6yx7LnzX yT2Q== X-Forwarded-Encrypted: i=1; AJvYcCVgH/tdmNCzms/APm1oLr8sp+oC3f8+EwFVR7HLRy/l/pbxt4WxeP5cReqisuv5sXaDWZ9EUABugOpyABQ=@vger.kernel.org X-Gm-Message-State: AOJu0YxtSLcvWPY+s96BYLjQXG17echj5u2CsJBBls4kx6ZQJoknI4Lt CEnkWccvrD6EfRttCvZWTiqeNjNDffBeXxZpOr5nxlyS9q1zyK+Qp+/0HdSujVnL46xxcXT8vTT U9lhRiJqeU1glD70r94Vl+1gaXV/zUb6nEnre6hTx8JvmRZ9NZazNGczi20VLvot1ejA= X-Gm-Gg: ASbGncsDh8fN+7EJEi6oGVGnV6z2NJAtlnkdTYcjbDcpSz+hwLdA3uWIEt0XlFzyTZg l+th8TZQmpylRUnsQfz/rdWqAktdF24DM6AbeQeNDQN51wfGRR+oG3Ctp5HXmx2eij6nbNS5ZOu LKfjYSiMQr4q9j4LNrYZwmI5v+T31e6KHeWr5++aCwXXi1eEbXuziCgT1mFJLYwsELW4ZAWQwjb P8NniO+rrsAP8SZCkBMVkY/e1eXGmF4PyidQ+UhiVgt9yTSP7uqpug636aTv/hoMIsoyeaNcKJz 9+ENLZl/q/0rhrhdaSvwY38S9BaNo5lA52ePPEkjrI0pepIT49WmB+5J4WtkQ+YX/fpTXk25lDY SXnPYODjzDeBi4UIGffxlD/iCJn5Uy6AQX4kenp4pt45dyYb5k3zQ+29mnnwjGjl7g/A= X-Received: by 2002:a05:6830:254c:b0:7c7:3402:7d74 with SMTP id 46e09a7af769-7c958bc917emr1125155a34.18.1764823395697; Wed, 03 Dec 2025 20:43:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IEZP/3NDRQei8kQL3KCmSFfEUVMHgJ92YmH4XT/+PP8EIUTQ7u2U4tUbdi+J8gvS9I63UYDQg== X-Received: by 2002:a05:6830:254c:b0:7c7:3402:7d74 with SMTP id 46e09a7af769-7c958bc917emr1125129a34.18.1764823395281; Wed, 03 Dec 2025 20:43:15 -0800 (PST) Received: from hu-yuanfang-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-6597ec5b35csm213766eaf.7.2025.12.03.20.43.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Dec 2025 20:43:14 -0800 (PST) From: Yuanfang Zhang Date: Wed, 03 Dec 2025 20:43:09 -0800 Subject: [PATCH RESEND v5 3/3] coresight-tnoc: Add runtime PM support for Interconnect TNOC Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251203-itnoc-v5-3-5b97c63f2268@oss.qualcomm.com> References: <20251203-itnoc-v5-0-5b97c63f2268@oss.qualcomm.com> In-Reply-To: <20251203-itnoc-v5-0-5b97c63f2268@oss.qualcomm.com> To: Suzuki K Poulose , Mike Leach , James Clark , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alexander Shishkin Cc: kernel@oss.qualcomm.com, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Yuanfang Zhang , Leo Yan X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1764823388; l=1738; i=yuanfang.zhang@oss.qualcomm.com; s=20250814; h=from:subject:message-id; bh=/fUCilk7cQkDDYH/V2caZpg8zsP8hHAk09zzZjiZ0fA=; b=FEFBDYaolHBmEgF36vCAMr6q9LSGePgwYZGFK3ro7c5/wZXSyVHO7L8dWIU7HgUo49Yyz3hAM 74vz4B2hZjOA7Dgf4YAqOTsHF+R5pWbiMNJQNcB0gOABIUWvbQchKth X-Developer-Key: i=yuanfang.zhang@oss.qualcomm.com; a=ed25519; pk=9oS/FoPW5k0CsqSDDrPlnV+kVIOUaAe0O5pr4M1wHgY= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjA0MDAzNSBTYWx0ZWRfX5U++rBqyOGdk +Z8McpQT+QXKLze/z5nO2GIOdKXV4NWzn4xrvE3LlyAAIoBvgh9KsiUs1bkYMqGCfrm7LDR5XZF dS8n/Gy2qaT3hEdaUT77bfwtKRJTxOn15x+Oq5lzZptXt7C0rVLXJZyzGLdmhO3nQZD/nTC94l9 axn1xfwkwc9nHLVG3cncvCX85V4MgR8g5ycgHed62PmQOQDTYjLx0HUtrrXcq5tvUrLkw36iN4u 7oFkIanI7FUKRVdLrkgo0WRNfWs89OYuqiO9iJmkC9IulL9hOlRwSKwZoDemn7oxAMyEuE7hNtq vnD4baXmHYS/QyZMmnm4646YUiVCuvmN++i5BqRhFbDe9LTtkcX2zauNtzo7bYA0Jq+ibeyhfOh +4w/qbE2lS7ltw3weGI0dqe3HfDgRQ== X-Proofpoint-GUID: eWnK2cDfs19T4CDt7LPwMjKDmPMU0wCa X-Authority-Analysis: v=2.4 cv=KJxXzVFo c=1 sm=1 tr=0 ts=69311164 cx=c_pps a=OI0sxtj7PyCX9F1bxD/puw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=wP3pNCr1ah4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=7CQSdrXTAAAA:8 a=qearADheJa7ujHrKWl4A:9 a=QEXdDO2ut3YA:10 a=Z1Yy7GAxqfX1iEi80vsk:22 a=a-qgeE7W1pNrGK8U0ZQC:22 X-Proofpoint-ORIG-GUID: eWnK2cDfs19T4CDt7LPwMjKDmPMU0wCa X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-04_01,2025-12-03_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 adultscore=0 impostorscore=0 phishscore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 malwarescore=0 bulkscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512040035 This patch adds runtime power management support for platform-based CoreSight Interconnect TNOC (ITNOC) devices. It introduces suspend and resume callbacks to manage the APB clock (`pclk`) during device runtime transitions. Signed-off-by: Yuanfang Zhang Reviewed-by: Leo Yan --- drivers/hwtracing/coresight/coresight-tnoc.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/drivers/hwtracing/coresight/coresight-tnoc.c b/drivers/hwtraci= ng/coresight/coresight-tnoc.c index 5be882300d79bc0173aa6a19d7da1d48c4aaca9c..2c5370497076536bfa868f0d80d= b775ef242968b 100644 --- a/drivers/hwtracing/coresight/coresight-tnoc.c +++ b/drivers/hwtracing/coresight/coresight-tnoc.c @@ -301,6 +301,28 @@ static void itnoc_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); } =20 +#ifdef CONFIG_PM +static int itnoc_runtime_suspend(struct device *dev) +{ + struct trace_noc_drvdata *drvdata =3D dev_get_drvdata(dev); + + clk_disable_unprepare(drvdata->pclk); + + return 0; +} + +static int itnoc_runtime_resume(struct device *dev) +{ + struct trace_noc_drvdata *drvdata =3D dev_get_drvdata(dev); + + return clk_prepare_enable(drvdata->pclk); +} +#endif + +static const struct dev_pm_ops itnoc_dev_pm_ops =3D { + SET_RUNTIME_PM_OPS(itnoc_runtime_suspend, itnoc_runtime_resume, NULL) +}; + static const struct of_device_id itnoc_of_match[] =3D { { .compatible =3D "qcom,coresight-itnoc" }, {} @@ -314,6 +336,7 @@ static struct platform_driver itnoc_driver =3D { .name =3D "coresight-itnoc", .of_match_table =3D itnoc_of_match, .suppress_bind_attrs =3D true, + .pm =3D &itnoc_dev_pm_ops, }, }; =20 --=20 2.34.1