Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3979422rdb; Thu, 14 Sep 2023 08:19:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFBHityqiaqB2EgzfwdWDdoANtEwfXyRD7kmMOzAKFj0Y5UuoAQWjKrJtcy2yU00zo291tZ X-Received: by 2002:a17:902:ee55:b0:1c4:abc:b850 with SMTP id 21-20020a170902ee5500b001c40abcb850mr2334516plo.51.1694704797848; Thu, 14 Sep 2023 08:19:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694704797; cv=none; d=google.com; s=arc-20160816; b=nDeHbvrTOO2INKzW8eJkY2u053U5T1HxtSTcKHS4yR0W2wqIP72O6BqgqeZvb3Mp24 xaYtppn8GLkMr72wW9APFuYlsNI0gfStCpkr7Fi8ezWbhhN2TbFdCJPmTiRdv4ihZexk eOh8TrE9vtOH6wh8299fiRZ6jYBMw2DIml7Om59lG3PuBRnMiQDWiY2r9HJsNkt+ngXc aks8gAA1SoZdnGGVOWxJR9yAuEP/2/5BU2arsMcIXt6vzBboprp9V/N2sEkihjR+OFUd ONFL8WnaBAzj/ExlyF3MEhoF2tOWpGQFcODcCWa8Qse5yqdtloHOy4puF3C7wJSTj/MX Q5bw== 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=eDJ6gnGZGgRLXJp91oxjU8lgLe4JKefWcZme3teV9bU=; fh=n/cywDBrV54XLbQm/aXN5C7dSeQ+T0voxuinVQDvrSM=; b=cmPbCy11pCtWEDhzx9pYajB+GsW9pb4IqMgrltZIPtOqQwuoWV/ovKDNTFLf1/TPW1 e3U9vNC5X5GhO+vaiNO2GyUkQtM+yhs99JCTQsLjCHgkPN4EhQmSgYnGNSRzL27McJwP P+WoyDvxvc43U80g++jiydmxrSzT5mhRmNUd/bh358WcILZRowt+TJBt2LnOG4wq+jwe 3Dk9big3KnbUoe+GnhCdRr1vofoAdlW3wp1GOGg5yxWkeO4ELjzu+he5KWG1yYgZ2eH7 NlfD3kT6KwduS+XG6wCM2/vwKRYDytAVRNY5QhIZAnj5V/SuzWyjrcGYMc81nqlALEKf uE0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=JH2dFj1O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id lg16-20020a170902fb9000b001b7f849cd12si1833538plb.81.2023.09.14.08.19.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 08:19:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=JH2dFj1O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 1734181A4FE8; Wed, 13 Sep 2023 22:44:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234962AbjINFob (ORCPT + 99 others); Thu, 14 Sep 2023 01:44:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234904AbjINFo2 (ORCPT ); Thu, 14 Sep 2023 01:44:28 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27F4BAC; Wed, 13 Sep 2023 22:44:24 -0700 (PDT) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38E4pPIQ001286; Thu, 14 Sep 2023 05:44:08 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=eDJ6gnGZGgRLXJp91oxjU8lgLe4JKefWcZme3teV9bU=; b=JH2dFj1OlFzTcy9i8KjnXsvC7eSL5sToDPQa673VHTqWYDWTJdCRK5K0x5Oa11X2+50i yDIDazccod2jVnfofdLBRj7ESGOWvRjdua/De8cCIjCbgq/vwCzXH9g0AYa1E03MO+Rt rsoh0UkLgdv0eYWxFcc1zP/W+LMUo3XUobFWwtmIcKPGUIF7avl9dyQlVwCHSmvYpEn3 g1GWXh9GsbHSj2E7QcWsOVexkNt1VND1JiN7XcXtxwAOTO8Y79bnO/kH8efaETrzOI7j Hr2/xlMw8QxDRcXFQpgYfSyLwGp/0jDPUuc2/bzlQYVg2YGzBeOcUrh9VPkMDE7Fmx4z yQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3t2y8q3jp9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Sep 2023 05:44:07 +0000 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 38E5i60t013967 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Sep 2023 05:44:06 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.30; Wed, 13 Sep 2023 22:44:01 -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 , Hao Zhang , , Subject: [PATCH v9 03/13] coresight-tpdm: Introduce TPDM subtype to TPDM driver Date: Thu, 14 Sep 2023 13:43:14 +0800 Message-ID: <1694670204-11515-4-git-send-email-quic_taozha@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1694670204-11515-1-git-send-email-quic_taozha@quicinc.com> References: <1694670204-11515-1-git-send-email-quic_taozha@quicinc.com> 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 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-ORIG-GUID: yVdtg_PCT-KjU5ubATaf1zowpt7BAEVb X-Proofpoint-GUID: yVdtg_PCT-KjU5ubATaf1zowpt7BAEVb X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-14_03,2023-09-13_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 adultscore=0 phishscore=0 suspectscore=0 mlxlogscore=794 bulkscore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309140049 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 13 Sep 2023 22:44:50 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Introduce the new subtype of "CORESIGHT_DEV_SUBTYPE_SOURCE_TPDM" for TPDM components in driver. Signed-off-by: Tao Zhang --- drivers/hwtracing/coresight/coresight-core.c | 3 +++ drivers/hwtracing/coresight/coresight-tpdm.c | 2 +- include/linux/coresight.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c index 9fabe00..d7f0e23 100644 --- a/drivers/hwtracing/coresight/coresight-core.c +++ b/drivers/hwtracing/coresight/coresight-core.c @@ -1093,6 +1093,7 @@ static int coresight_validate_source(struct coresight_device *csdev, if (subtype != CORESIGHT_DEV_SUBTYPE_SOURCE_PROC && subtype != CORESIGHT_DEV_SUBTYPE_SOURCE_SOFTWARE && + subtype != CORESIGHT_DEV_SUBTYPE_SOURCE_TPDM && subtype != CORESIGHT_DEV_SUBTYPE_SOURCE_OTHERS) { dev_err(&csdev->dev, "wrong device subtype in %s\n", function); return -EINVAL; @@ -1162,6 +1163,7 @@ int coresight_enable(struct coresight_device *csdev) per_cpu(tracer_path, cpu) = path; break; case CORESIGHT_DEV_SUBTYPE_SOURCE_SOFTWARE: + case CORESIGHT_DEV_SUBTYPE_SOURCE_TPDM: case CORESIGHT_DEV_SUBTYPE_SOURCE_OTHERS: /* * Use the hash of source's device name as ID @@ -1212,6 +1214,7 @@ void coresight_disable(struct coresight_device *csdev) per_cpu(tracer_path, cpu) = NULL; break; case CORESIGHT_DEV_SUBTYPE_SOURCE_SOFTWARE: + case CORESIGHT_DEV_SUBTYPE_SOURCE_TPDM: case CORESIGHT_DEV_SUBTYPE_SOURCE_OTHERS: hash = hashlen_hash(hashlen_string(NULL, dev_name(&csdev->dev))); /* Find the path by the hash. */ diff --git a/drivers/hwtracing/coresight/coresight-tpdm.c b/drivers/hwtracing/coresight/coresight-tpdm.c index b645612..abaff0b 100644 --- a/drivers/hwtracing/coresight/coresight-tpdm.c +++ b/drivers/hwtracing/coresight/coresight-tpdm.c @@ -203,7 +203,7 @@ static int tpdm_probe(struct amba_device *adev, const struct amba_id *id) if (!desc.name) return -ENOMEM; desc.type = CORESIGHT_DEV_TYPE_SOURCE; - desc.subtype.source_subtype = CORESIGHT_DEV_SUBTYPE_SOURCE_OTHERS; + desc.subtype.source_subtype = CORESIGHT_DEV_SUBTYPE_SOURCE_TPDM; desc.ops = &tpdm_cs_ops; desc.pdata = adev->dev.platform_data; desc.dev = &adev->dev; diff --git a/include/linux/coresight.h b/include/linux/coresight.h index a269fff..a4cb7dd 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -64,6 +64,7 @@ enum coresight_dev_subtype_source { CORESIGHT_DEV_SUBTYPE_SOURCE_PROC, CORESIGHT_DEV_SUBTYPE_SOURCE_BUS, CORESIGHT_DEV_SUBTYPE_SOURCE_SOFTWARE, + CORESIGHT_DEV_SUBTYPE_SOURCE_TPDM, CORESIGHT_DEV_SUBTYPE_SOURCE_OTHERS, }; -- 2.7.4