From mboxrd@z Thu Jan 1 00:00:00 1970 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 CC2B231F9AE for ; Fri, 10 Jul 2026 02:40:08 +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=1783651210; cv=none; b=UyHh24lmvCtow4DFN+y9bWIuNk0LSr244Nn49wzWfrf7AjSZko0adOv/RfqstG3p9GS/AaeY1ghz5vNsVeLJP1P9km2KxWTiOULP6pcKdNMcyWDLg/YxriQeTEzN2tsItCk6vwbWu4RENtVMd1L6CQ3r6cyw39hiE2PczsNgD/8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783651210; c=relaxed/simple; bh=/VrMOAI7RMTSpCjPO+MrxGESmI6mgxV1a4rVfM8UdWg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZdUfeB1uyK9Op4gxjPL+H8b4xhY0p1Ki6sKk3SGqiOkPaRylykQ6QChkEc9V79cP9D/O0F7km0gGUW6nH9hJ9u9zWGpbpzl+lsKwwUw/iYyIe/pKsphumpoOy+SRt96I1VtYDk6PBIPDLWqSJKSHVafsA8Pjzx24FEHNlCsexUc= 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=Kj6kZy5F; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=UMtrYiuC; 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="Kj6kZy5F"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="UMtrYiuC" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66A2W58k2374378 for ; Fri, 10 Jul 2026 02:40:08 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= M0XjIK3l1QlrdTu9yiIymA0sMB/2Qxsvll0XOYQf5Pw=; b=Kj6kZy5FuHVLnZ8t YufYnucsng3n+1HWl5vfM4wLn9WIVMJE3Vz8C96eULHsKBSio1DIHlM34OmEw8Kv gPTnrByXiYXcWRWAyKUsIBhTZxe0UcTlPBwTvSOto6wNQpZdN9PNyiz9zKmwrFTg xLLAKpFn5X2e/sJ2zDsFmIk/JDqC9wPz0pMdZVrTxhjDa/U3dag3SyoTSWvGlVgj 46BYg856Mfi5Y2r40ntyIVa3kOt7MkTmqy2MwK3nG6c6pxfe7ZwG+EC+hkJiJbqC t5QMfOlOABuGHCxoEfij5jXY6zh3PF5I0tTXTyKuR2IEqmGk7k0MXyL90c9AblFQ wL634g== Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4faeg5jc21-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 10 Jul 2026 02:40:08 +0000 (GMT) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-8485d853b08so839078b3a.1 for ; Thu, 09 Jul 2026 19:40:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1783651207; x=1784256007; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=M0XjIK3l1QlrdTu9yiIymA0sMB/2Qxsvll0XOYQf5Pw=; b=UMtrYiuCwSh9nhH669kn7zSwlBnnf7kHUoVIS7iYipSvy0IFNF8CkqaNM7mD53Mrha ZTeuHZ9i/9adxN2teLpJ783KP8T/IsYQqqIftOClroDOmTtEGftzRU1kacZYdhy7VC64 322Jdf/yi5OEq/1C4y53VcJtzQiee0EXmdnFQVzfOv8+jQF7v2SaUvnIVz4f12mXE1J9 pyL1cBXyoxUn32AoP1Quy1CTMp2kqPpJ0O/AYgm9Bko8CGpZRPLkrlydNi5k7+bFG/JG 9ymiVB1vPTgD+PW0KpyDBntZjRj1rxkdax2FnjIm8WAyLQA73zUqmNOavu1SkC2ffgeM oB8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783651207; x=1784256007; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=M0XjIK3l1QlrdTu9yiIymA0sMB/2Qxsvll0XOYQf5Pw=; b=Hxi624K8jmocuX293NGwRp4oLgvBt1DwsiJyV3oLqkAffjV8RTsYaZIx1rhJIjhJC8 cJQVaaVRjXbAq9EELcUjUKMK+Z4Sw0ZoLF0qXGgFJrLaYO/4KxN4NfUl41eWkwdB3VVo /wYSRieWN/d1Hpd+jfDQElp/YH3OTTet591ZiJrxeO3Ecl2HTSwHROtBlImnPAwPJUja EMtDkQ7JJYuwtaMrADiyqEXFMjbXERqdF8kINMhCYT74VtfxCLDSaIiN8hg0vXSh2tUn 6ZysqQwsL5u/nbj2tXsYWblE7xlHlvfftSsG45+1MJBW0B7aPJ+cE/QjnrjD3BD2JJXq tGFw== X-Forwarded-Encrypted: i=1; AHgh+RqJjsxiPiDQbvN5ZLpiIu2p/5PQw0NHILJHz8d4QyPvLAxxpZ0hzTskYcW8hjmQc0mzGPBqLEJe7FXs6Ls=@vger.kernel.org X-Gm-Message-State: AOJu0Yz+DxJjrH+TXnu8Llis2nQWOQfB9trLJeQ1hqXm67MBlT1aul7N bn+kccJ4Ei/XBPsnfKOv6oIsIH2thWbpS14GaVd+yxMRdI0Id6PhnF7jDQhw/oGHhFkRtIWeh2o agqiJmjuBiQrt0wIv9L6fUls8f2MOymAk6ZYvfpWdo0tdELuWnX0QUOyj3K+Z9Afy63Y= X-Gm-Gg: AfdE7clkCpxLI8ZPczS+l9bPCxiAvuw0FiUveNFlIRj14NHP+iaSxcy7Wy/YtqoaPF1 FbxdHaSjKo/GUMwnhzuclqMdvqgRzmkH+f6L0uZxvrfwLHXzVY+6SUqM/VWRliRJPdKJINQ+9X2 TTSOtXM5yR72KUv6TYbrZlNeaHHiGREuakzwyOw1Vn95h1I7/8yGr1dHNDqirKVycdQBS/vNcwn K3tyri8M+TvlvHwX7mR+AU4uHVcrxCrDJ/Z4apQ7V0dSRg9nNYBf30RjWluTDj6moOX1VTbTICS J74OhKNJx8T7eMMce8AVHH/kbdO4Uoo+aQTdTgrjA4sa1KlsMAHZerxnq4CQHJ2pOChBQQr9vJe Opm8eFf0irBpPv8opynitMLrVlTwKFYKKWK5qKivA+Ovn+ymcD5EJUoqHefJHUNn3Rgj8z0e7lg == X-Received: by 2002:a05:6a00:3e12:b0:848:411f:3969 with SMTP id d2e1a72fcca58-84842ee66f7mr8113037b3a.20.1783651207326; Thu, 09 Jul 2026 19:40:07 -0700 (PDT) X-Received: by 2002:a05:6a00:3e12:b0:848:411f:3969 with SMTP id d2e1a72fcca58-84842ee66f7mr8113004b3a.20.1783651206712; Thu, 09 Jul 2026 19:40:06 -0700 (PDT) Received: from jiegan-gv.ap.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ca5af6df87fsm4517611a12.5.2026.07.09.19.40.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2026 19:40:06 -0700 (PDT) From: Jie Gan Date: Fri, 10 Jul 2026 10:39:01 +0800 Subject: [PATCH v6 2/5] coresight: tnoc: Bind Aggregator TNOC on the platform bus 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: 7bit Message-Id: <20260710-fix-tracenoc-probe-issue-v6-2-41eb36fef8d9@oss.qualcomm.com> References: <20260710-fix-tracenoc-probe-issue-v6-0-41eb36fef8d9@oss.qualcomm.com> In-Reply-To: <20260710-fix-tracenoc-probe-issue-v6-0-41eb36fef8d9@oss.qualcomm.com> To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Tingwei Zhang , Jingyi Wang , Jie Gan , Abel Vesa , Suzuki K Poulose , Mike Leach , James Clark , Leo Yan , Yuanfang Zhang , Abel Vesa , Alexander Shishkin Cc: Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1783651186; l=5005; i=jie.gan@oss.qualcomm.com; s=20250909; h=from:subject:message-id; bh=/VrMOAI7RMTSpCjPO+MrxGESmI6mgxV1a4rVfM8UdWg=; b=6y3FHfzbxUki4D5drjaSM3YVMMezRawMOVbPyF0uw93CA5mqU+VVMTAN9itU9nQTEeBfM3Ge9 JbnbH3GHH9QC5rzvF/iwh9LByMKOs5B8Boq5siOOZ85twB8UCsUaqE/ X-Developer-Key: i=jie.gan@oss.qualcomm.com; a=ed25519; pk=3LxxUZRPCNkvPDlWOvXfJNqNO4SfGdy3eghMb8puHuk= X-Authority-Analysis: v=2.4 cv=FN8rAeos c=1 sm=1 tr=0 ts=6a505b88 cx=c_pps a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=SM-CJC9rQbeaPTssbJMA:9 a=QEXdDO2ut3YA:10 a=2VI0MkxyNR6bbpdq8BZq:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNzEwMDAyMyBTYWx0ZWRfXx1BG62YNnIM8 k7qc2MHlTX0GgrkmMYUjQVIfShps8MPr4aOOOKuTXDXBr1/j7FZCZECI938HW/23EwKRH5lexW/ S3mE3hxJdfs2j2I0+5pDbeQY7DCLf3g= X-Proofpoint-ORIG-GUID: Z7BHn3Jee54B9NeO3uYE75RnlzEjh0na X-Proofpoint-GUID: Z7BHn3Jee54B9NeO3uYE75RnlzEjh0na X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzEwMDAyMyBTYWx0ZWRfX3dgRViCM4rfA M8Gqs4E7YHcD0scJy2S6o/qBKwAiG/xw7/Vgzb8Lk2gdP3VpdH8A5xrY2mLajMeLEwhAAxNC/FA ZMMxie8XkhN6r0qsL5U3fW9IrobIhXONrMLwUpm1awYjkSMppZeekAognwSE0BDrcO/4umHKT87 gUMvM+tdSFmQHMsEZzZjJ54f6XXnFAsQOXQ9+gM7QkTYHF9rHeVuWMjUens0HqCa/3eGSIU0lIs jkaJTTjUJpTINIM91HUmWJ1sW9+KF91sWGy2UFwp0PoIfpi901Ga3rkjCVhg7uw7TyQDQrROGWo j7aa6hcVjnzhcq30GJxKDTPigaPBa44sQzYyGgOyjsam2Z9+Rg+gxHSI7nouIUdyta0oaWZQhaK NHQQE9vIcl/U6+go2TGg5iY5IKVzLWGZGTfqS3y9ye7ZrZ3i5F9GNUBx+T+XQBsOIkFLE4XI8/Q osHQV5zs4Ta5Ad8MhFA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-09_04,2026-07-09_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 suspectscore=0 phishscore=0 clxscore=1015 impostorscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 adultscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607100023 The Aggregator TNOC is bound as an AMBA device through the "qcom,coresight-tnoc", "arm,primecell" compatible. The AMBA bus reads the peripheral and component ID registers to identify and probe the device. Although the Aggregator TNOC exposes the CID registers, the Component ID value returned by the hardware is 0x00000000 instead of a valid AMBA Component ID, so the AMBA match fails and the device never comes up. Bind the Aggregator TNOC on the platform bus instead, where the device is matched by its compatible string and no component-ID probing is performed. Add "qcom,coresight-tnoc" to the platform driver's match table, and rename the platform driver and its callbacks from the "itnoc"-specific names to generic "tnoc" names, since the driver now serves both the Interconnect and Aggregator TNOC. Update the platform driver name to "coresight-tnoc" accordingly. The ATID-unsupported handling keyed off dev_is_amba(), which disabled ATID allocation for every platform-bus device. With the Aggregator TNOC now on the platform bus, that check would wrongly disable its ATID, even though the Aggregator TNOC owns the ATID that tags the whole aggregation path. The Interconnect TNOC aggregates trace within its subsystem but carries no ATID of its own, because the downstream Aggregator TNOC already owns the ATID for the path. So base the check on the "qcom,coresight-itnoc" compatible and let every other form allocate a trace ID. Signed-off-by: Jie Gan --- drivers/hwtracing/coresight/coresight-tnoc.c | 37 +++++++++++++++------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-tnoc.c b/drivers/hwtracing/coresight/coresight-tnoc.c index 9e8de4323d28..737cc802aefe 100644 --- a/drivers/hwtracing/coresight/coresight-tnoc.c +++ b/drivers/hwtracing/coresight/coresight-tnoc.c @@ -130,7 +130,7 @@ static int trace_noc_init_default_data(struct trace_noc_drvdata *drvdata) { int atid; - if (!dev_is_amba(drvdata->dev)) { + if (of_device_is_compatible(drvdata->dev->of_node, "qcom,coresight-itnoc")) { drvdata->atid = -EOPNOTSUPP; return 0; } @@ -278,7 +278,7 @@ static struct amba_driver trace_noc_driver = { .id_table = trace_noc_ids, }; -static int itnoc_probe(struct platform_device *pdev) +static int tnoc_platform_probe(struct platform_device *pdev) { struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); int ret; @@ -295,16 +295,18 @@ static int itnoc_probe(struct platform_device *pdev) return ret; } -static void itnoc_remove(struct platform_device *pdev) +static void tnoc_platform_remove(struct platform_device *pdev) { struct trace_noc_drvdata *drvdata = platform_get_drvdata(pdev); coresight_unregister(drvdata->csdev); pm_runtime_disable(&pdev->dev); + if (drvdata->atid > 0) + coresight_trace_id_put_system_id(drvdata->atid); } #ifdef CONFIG_PM -static int itnoc_runtime_suspend(struct device *dev) +static int tnoc_runtime_suspend(struct device *dev) { struct trace_noc_drvdata *drvdata = dev_get_drvdata(dev); @@ -313,7 +315,7 @@ static int itnoc_runtime_suspend(struct device *dev) return 0; } -static int itnoc_runtime_resume(struct device *dev) +static int tnoc_runtime_resume(struct device *dev) { struct trace_noc_drvdata *drvdata = dev_get_drvdata(dev); @@ -321,35 +323,36 @@ static int itnoc_runtime_resume(struct device *dev) } #endif -static const struct dev_pm_ops itnoc_dev_pm_ops = { - SET_RUNTIME_PM_OPS(itnoc_runtime_suspend, itnoc_runtime_resume, NULL) +static const struct dev_pm_ops tnoc_dev_pm_ops = { + SET_RUNTIME_PM_OPS(tnoc_runtime_suspend, tnoc_runtime_resume, NULL) }; -static const struct of_device_id itnoc_of_match[] = { +static const struct of_device_id tnoc_of_match[] = { { .compatible = "qcom,coresight-itnoc" }, + { .compatible = "qcom,coresight-tnoc" }, {} }; -MODULE_DEVICE_TABLE(of, itnoc_of_match); +MODULE_DEVICE_TABLE(of, tnoc_of_match); -static struct platform_driver itnoc_driver = { - .probe = itnoc_probe, - .remove = itnoc_remove, +static struct platform_driver tnoc_platform_driver = { + .probe = tnoc_platform_probe, + .remove = tnoc_platform_remove, .driver = { - .name = "coresight-itnoc", - .of_match_table = itnoc_of_match, + .name = "coresight-tnoc", + .of_match_table = tnoc_of_match, .suppress_bind_attrs = true, - .pm = &itnoc_dev_pm_ops, + .pm = &tnoc_dev_pm_ops, }, }; static int __init tnoc_init(void) { - return coresight_init_driver("tnoc", &trace_noc_driver, &itnoc_driver); + return coresight_init_driver("tnoc", &trace_noc_driver, &tnoc_platform_driver); } static void __exit tnoc_exit(void) { - coresight_remove_driver(&trace_noc_driver, &itnoc_driver); + coresight_remove_driver(&trace_noc_driver, &tnoc_platform_driver); } module_init(tnoc_init); module_exit(tnoc_exit); -- 2.34.1