From patchwork Thu Mar 21 08:32:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tao Zhang X-Patchwork-Id: 13598501 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 55E91C54E58 for ; Thu, 21 Mar 2024 08:33:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=VixTrBsHvEYwDFYTIsd2ZDqaimVJMD4IGAoy6lMME2g=; b=FAov/80CvReu5J uGbgobRJr3Bsz/C8BqJ2pqu4DFJe6Oc6wBnhlZoNgLIb7AHX0CwxvYiQa7w9/YJUQRpQZ9cEdSkIb 6MFirPLVRo/uEG3+bK186meYLiBlNBqgDLvM1lz+uYcSfaK0qmUKNNAMFCIJFL+y8EnAAv2p0LUhR Xi+JWgbmcSPw+UN+1E9PmM28Jmq8D9s/mSdCP7LfxoTpV1BJEiSaSFxc8Al69Ev9W60HBpk+vX1Yr a11fKf1HJrncP9iIB4azzIkaOS7c1d1q1MdfnriqOHKFjX0ZP+6Q2fLZzSYJIxxN/mYoqtEcibYQL Y+rCDl923a3IJ+A8BWmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnDr3-00000002KPQ-28fr; Thu, 21 Mar 2024 08:32:53 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnDqv-00000002KMs-2wex for linux-arm-kernel@lists.infradead.org; Thu, 21 Mar 2024 08:32:46 +0000 Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42L7cUuU021617; Thu, 21 Mar 2024 08:32:31 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=Qa7Q5URf9WyJXmiA4bjGLM7ZuuZskXa385voHGR4D+Q=; b=SA m9nyHtAXh7j2drP1kxsrmDoFMD6R7TAiiYMYrvsS3TM4lYoTDtxBzN6PNzdBBUcx pKqFSF05ulinctD1TqS9SWt8j+Yqsaxd6loN/sncb91mIy8ievAV9iSgQonZSW06 LqqSbXStLPs1RU0kDR+BTkm8BGDGH7svAW8Vy82a6EyPPs5LRfuJ8tqr0n+//0Mt n/ag8TqZmUvIcbiIxUSIWb2mdwosk88xupXazIYDn8JKWs5QjFFx9N1q8lNUeE0O C9Z7sRiqQWsxkNaUpeWsGCEKVqcNObvR93oVb79AM7cogF1+hvAOSSJpDCv8wCHO oJsnzrEWJi/czONj6oYQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3x0ecf0cju-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Mar 2024 08:32:31 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 42L8WUSn009011 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Mar 2024 08:32:30 GMT Received: from taozha-gv.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.40; Thu, 21 Mar 2024 01:32:25 -0700 From: Tao Zhang To: Mathieu Poirier , Suzuki K Poulose , Alexander Shishkin , Konrad Dybcio , Mike Leach , Rob Herring , Krzysztof Kozlowski CC: Tao Zhang , Jinlong Mao , Leo Yan , Greg Kroah-Hartman , , , , , Tingwei Zhang , Yuanfang Zhang , Trilok Soni , Song Chai , , Subject: [PATCH 0/4] Add support for multi-port output on the funnel Date: Thu, 21 Mar 2024 16:32:03 +0800 Message-ID: <1711009927-17873-1-git-send-email-quic_taozha@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 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: NFOT1mAxFAuCF5sCagxdGqdsYFU89aqZ X-Proofpoint-ORIG-GUID: NFOT1mAxFAuCF5sCagxdGqdsYFU89aqZ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-21_05,2024-03-18_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 clxscore=1011 priorityscore=1501 adultscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 impostorscore=0 lowpriorityscore=0 suspectscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2403140001 definitions=main-2403210057 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240321_013245_773858_1C17C9E0 X-CRM114-Status: GOOD ( 15.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Funnel can support multi-port output in our hardware design. Since original funnels only support a single output connection, the code needs to be modified to support this new feature. The following is a typical topology diagram of multi-port output of the funnels. |---------| |---------| |---------| |---------| |---------| | TPDM0 | | TPDM1 | | TPDM2 | | TPDM3 | | TPDM4 | |---------| |---------| |---------| |---------| |---------| | | | | | | | | | | | | | | | |-----| |-----| |-----| |-----| | | | | | | | | | | | [0]| |[1] [0]| |[1] | \-------------/ \-------------/ \-------------/ \ FUNNEL0 / \ FUNNEL1 / \ FUNNEL2 / ----------- ----------- ----------- [0]| |[1] [0]| |[1] | | |---------- | | | | | | | | |-------| | |------- | | |--------- | | | | | | | | | | | [0]| |[1] |[2] |[3] |[4] \ ---------------------------------------------------/ \ TPDA0 / \ / ------------------------------------------------ For example, TPDM0 and TPDM1 are connected to the [0] and [1] input ports of the funnel respectively, and output from the [0] and [1] output ports. In this way, when data is output from the Funnel's output port, it needs to know the source component corresponding to this output port. Our solution is to add a property named "label" in the devicetree to mark the source corresponding to the output port. After introducing this new feature, another new problem also needs to be solved. For example, TPDA driver will search for all the TPDMs on a input port. In the topology diagram above, when TPDA searches for TPDM from the input port[0], it will find TPDM0 and TPDM1. Our solution is to add a new property named "qcom,tpda-input-port" to mark the input port number of the TPDA in the devicetree. Tao Zhang (4): dt-bindings: arm: qcom,coresight-funnel: Add label for multi-ouput coresight: Add support for multiple output ports on the funnel dt-bindings: arm: qcom,coresight-tpdm: Mark tpda input port number coresight-tpda: Add support multi-port input on TPDA .../arm/arm,coresight-dynamic-funnel.yaml | 34 +++++++- .../bindings/arm/qcom,coresight-tpdm.yaml | 8 ++ drivers/hwtracing/coresight/coresight-core.c | 81 ++++++++++++++++--- .../hwtracing/coresight/coresight-platform.c | 5 ++ drivers/hwtracing/coresight/coresight-tpda.c | 27 ++++++- include/linux/coresight.h | 2 + 6 files changed, 139 insertions(+), 18 deletions(-)