From patchwork Wed Jan 31 08:26:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mao Jinlong X-Patchwork-Id: 13538929 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 BD258C48285 for ; Wed, 31 Jan 2024 08:27:33 +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:References:In-Reply-To: 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: List-Owner; bh=OYmG1cycYPQ5+EyCTyltYKO8jymxKbKxs3U35esFIe4=; b=ZP0JX/oT9ITKjs D7u449fi6eaI7glNUXRJ9fI+PhkJbyIqCNFZoDuV0dSZfUvY46jfNA4h3ZG+1Y/jiE9ZeBZwTjU77 eTcMZ8uWDaSJ6IGHyfBATR+bSlw7taqqcuw6dKwOkHCwl+fM1s5rCI9Vb0WIqddI/VJ7S7ofXAhTi 3Yn6lmNvKQ/okNPU9PSH9xhC3bllOYw0T2D65NwfJftXYycl+fK+5BvdImaJggKKkpUnCW1Q1VnJo ZrL+lAP7z85m91HD94VLB4tQXms/n9DjsUdgfN1SZKtp8ghJ7zi3Lp+0JrwzSMOLUHAFCpfg8K8D1 iG5blLch98nYlsBT8V5g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rV5wK-000000026ST-2mvS; Wed, 31 Jan 2024 08:27:24 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rV5wD-000000026Ps-3GzC for linux-arm-kernel@bombadil.infradead.org; Wed, 31 Jan 2024 08:27:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:Content-Transfer-Encoding :MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From: Sender:Reply-To:Content-ID:Content-Description; bh=x6b9QJbN/4opz0IFJtOwxH/Vn5GmCg0lvfo4hoEWj0s=; b=LmL9/eqOOeSyaJOhPb6Xh0JQun xRQ8dDq0vVV1vFAIxBEd3Oy3YDyGCLWNEnO8JhlScfRD0uBIx9fWTrs91CKsSH/qBUeRVWXjec60U 7W6MEgXQb02x4hc/eyFa6WxduK0JQw437My9UdZ4PdfQCeAXBmrNBlGQStwRbdcN8yX3tWHgugbFi UATaaW1u57YpkW7loHHffyaB8Qi1TgY6tS1uEIU1AqH+UVo7MqS6G6PMSRJFNB4zYOM0P1yGNdreP aXVx02maDOzXK9zXe95tu6rs5TwSStGX1A7t3i5HBCCCVWRcbVuFhdXZv6YmsLM8USdAdGHZpSES+ dkKoDXvg==; Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rV5wA-00000008p1g-2ipF for linux-arm-kernel@lists.infradead.org; Wed, 31 Jan 2024 08:27:16 +0000 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40V7fBiJ011244; Wed, 31 Jan 2024 08:26:42 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-transfer-encoding:content-type; s= qcppdkim1; bh=x6b9QJbN/4opz0IFJtOwxH/Vn5GmCg0lvfo4hoEWj0s=; b=Sv naHswfoqJShvWeGhp7wbsWxHwolN1bsDD7szaPAjhJThSxX3nBVS7wgsZmiFbw6i eQkvmpnuUP0u9IZjoH3iZwDQzyPr5G8AGOVJwXWg4Um+udtnb1v3h/NyvbZYi6OU ayOtZ5TEcwI3tZjKNSsvYSByaz8PPY/NIDIn2tq9beaJPie5QDsSq2J7y5Nr8QmW FFbGp3nlxjoynLwIp4u7mVCmZ0Y43Uor9ztGsWsB6kZ9Koiz1SEC3UgPlCePRD10 EVQt8TWMpdOCzWOnpCGlPsImIQvBy//EDVWggngovbqUgLHZl4XifpPCT1bRK3lv oDjxazOSdW3DfIsY0ukw== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vyj1483h5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Jan 2024 08:26:41 +0000 (GMT) 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 40V8QeOs006056 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Jan 2024 08:26:40 GMT Received: from hu-jinlmao-lv.qualcomm.com (10.49.16.6) 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.1118.40; Wed, 31 Jan 2024 00:26:40 -0800 From: Mao Jinlong To: Suzuki K Poulose , Mike Leach , James Clark , Leo Yan , Alexander Shishkin , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , "Alexandre Torgue" , Bjorn Andersson , Konrad Dybcio , "Mathieu Poirier" CC: Mao Jinlong , , , , , , , Tingwei Zhang , Yuanfang Zhang , Tao Zhang Subject: [PATCH v3 1/2] coresight: core: Add device name support Date: Wed, 31 Jan 2024 00:26:25 -0800 Message-ID: <20240131082628.6288-2-quic_jinlmao@quicinc.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240131082628.6288-1-quic_jinlmao@quicinc.com> References: <20240131082628.6288-1-quic_jinlmao@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) 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-GUID: oG6TbRR8vUUXrEvwSJ8ukAKcqMvDvyxj X-Proofpoint-ORIG-GUID: oG6TbRR8vUUXrEvwSJ8ukAKcqMvDvyxj 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-01-31_03,2024-01-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 bulkscore=0 adultscore=0 clxscore=1015 malwarescore=0 impostorscore=0 mlxlogscore=999 spamscore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401310063 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240131_082715_041591_41CE7030 X-CRM114-Status: GOOD ( 22.31 ) 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 For some coresight components like CTI and TPDM, there could be numerous of them. From the node name, we can only get the type and register address of the component. We can't identify the HW or the system the component belongs to. Add the device-name support for adding the intuitive name of the device. Signed-off-by: Mao Jinlong --- drivers/hwtracing/coresight/coresight-core.c | 37 ++++++++++--------- .../hwtracing/coresight/coresight-platform.c | 31 ++++++++++++++++ include/linux/coresight.h | 3 +- 3 files changed, 53 insertions(+), 18 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c index 5dde597403b3..8e836e8f407c 100644 --- a/drivers/hwtracing/coresight/coresight-core.c +++ b/drivers/hwtracing/coresight/coresight-core.c @@ -1766,33 +1766,36 @@ EXPORT_SYMBOL_GPL(coresight_loses_context_with_cpu); * duplicate indices for the same device (e.g, if we defer probing of * a device due to dependencies), in case the index is requested again. */ -char *coresight_alloc_device_name(struct coresight_dev_list *dict, +const char *coresight_alloc_device_name(struct coresight_dev_list *dict, struct device *dev) { int idx; - char *name = NULL; + const char *name = NULL; struct fwnode_handle **list; mutex_lock(&coresight_mutex); - idx = coresight_search_device_idx(dict, dev_fwnode(dev)); - if (idx < 0) { - /* Make space for the new entry */ - idx = dict->nr_idx; - list = krealloc_array(dict->fwnode_list, - idx + 1, sizeof(*dict->fwnode_list), - GFP_KERNEL); - if (ZERO_OR_NULL_PTR(list)) { - idx = -ENOMEM; - goto done; + name = coresight_get_device_name(dev); + if (!name) { + idx = coresight_search_device_idx(dict, dev_fwnode(dev)); + if (idx < 0) { + /* Make space for the new entry */ + idx = dict->nr_idx; + list = krealloc_array(dict->fwnode_list, + idx + 1, sizeof(*dict->fwnode_list), + GFP_KERNEL); + if (ZERO_OR_NULL_PTR(list)) { + idx = -ENOMEM; + goto done; + } + + list[idx] = dev_fwnode(dev); + dict->fwnode_list = list; + dict->nr_idx = idx + 1; } - list[idx] = dev_fwnode(dev); - dict->fwnode_list = list; - dict->nr_idx = idx + 1; + name = devm_kasprintf(dev, GFP_KERNEL, "%s%d", dict->pfx, idx); } - - name = devm_kasprintf(dev, GFP_KERNEL, "%s%d", dict->pfx, idx); done: mutex_unlock(&coresight_mutex); return name; diff --git a/drivers/hwtracing/coresight/coresight-platform.c b/drivers/hwtracing/coresight/coresight-platform.c index 9d550f5697fa..c6c68fc9f787 100644 --- a/drivers/hwtracing/coresight/coresight-platform.c +++ b/drivers/hwtracing/coresight/coresight-platform.c @@ -183,6 +183,22 @@ static int of_coresight_get_cpu(struct device *dev) return cpu; } +static const char *of_coresight_get_device_name(struct device *dev) +{ + const char *name = NULL; + + if (!dev->of_node) + return NULL; + + /* + * Get the device name from DT. The name describes the HW or + * system the device is for. + */ + of_property_read_string(dev->of_node, "device-name", &name); + + return name; +} + /* * of_coresight_parse_endpoint : Parse the given output endpoint @ep * and fill the connection information in @pdata->out_conns @@ -315,6 +331,12 @@ static inline int of_coresight_get_cpu(struct device *dev) { return -ENODEV; } + +static inline const char *of_coresight_get_device_name(struct device *dev) +{ + return NULL; +} + #endif #ifdef CONFIG_ACPI @@ -794,6 +816,15 @@ int coresight_get_cpu(struct device *dev) } EXPORT_SYMBOL_GPL(coresight_get_cpu); +const char *coresight_get_device_name(struct device *dev) +{ + if (is_of_node(dev->fwnode)) + return of_coresight_get_device_name(dev); + else + return NULL; +} +EXPORT_SYMBOL_GPL(coresight_get_device_name); + struct coresight_platform_data * coresight_get_platform_data(struct device *dev) { diff --git a/include/linux/coresight.h b/include/linux/coresight.h index e8b6e388218c..9d50a91a3fc7 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -582,7 +582,7 @@ extern int coresight_claim_device_unlocked(struct coresight_device *csdev); extern void coresight_disclaim_device(struct coresight_device *csdev); extern void coresight_disclaim_device_unlocked(struct coresight_device *csdev); -extern char *coresight_alloc_device_name(struct coresight_dev_list *devs, +extern const char *coresight_alloc_device_name(struct coresight_dev_list *devs, struct device *dev); extern bool coresight_loses_context_with_cpu(struct device *dev); @@ -676,6 +676,7 @@ static inline void coresight_write64(struct coresight_device *csdev, u64 val, u3 #endif /* IS_ENABLED(CONFIG_CORESIGHT) */ extern int coresight_get_cpu(struct device *dev); +extern const char *coresight_get_device_name(struct device *dev); struct coresight_platform_data *coresight_get_platform_data(struct device *dev); struct coresight_connection * From patchwork Wed Jan 31 08:26:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mao Jinlong X-Patchwork-Id: 13538928 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 BABEFC47258 for ; Wed, 31 Jan 2024 08:27:27 +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:References:In-Reply-To: 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: List-Owner; bh=FGjRLSb8/yRzDvN0Yh9jw5Os5jHqFTOb4o5EKtFUD9I=; b=Kv4ebasZ6Ed7iJ W/45L1N0WCnIYc87xniQ8vq2X7bkiuu5PHksDdYaXgRWpN+ciUv52B925uWWEKfBi5taax6PgwGBq Mt0BN5CC+LDwo09QTvreaPkt6gJbE4q9KJN6eiFtj8rSvQXz9yDtyrAakPTq2vZ+0II2F0nQQlBA7 hbkESwQKehIm5VSiTaWmHddPJae2HiqKOCUUh6gm9zawEBWBA0wQwOS97wXaVOQqc5UbYWg+g4L9G t0+d3vOlSFMWr1UlbrEqGDuNn4Jg/bA7zohK3nb/EL366Dhr5H8Jbq38Cl45+BA3af9KIQeSZsD1c LfvtMMwNZ/PffS6zAp7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rV5wC-000000026Pj-2zPp; Wed, 31 Jan 2024 08:27:16 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rV5wB-000000026PK-3Def for linux-arm-kernel@bombadil.infradead.org; Wed, 31 Jan 2024 08:27:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:Content-Transfer-Encoding :MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From: Sender:Reply-To:Content-ID:Content-Description; bh=zXr0mBdB665cttRh0NuHcRK0xyTWE5xCgRUbWjlPAU8=; b=c87Cbmj8ovtZ9Sw/T28snqJxMn Si1zcm+y7vokU8DcHR5jRxSYSx220jgsKU6nShdtawVIRwlIpDD8A4gnvRprhDtjnKJpK/DxEEiR9 6xfC99wbyWw9M0xj9usF1UUXq3wk6iVGvysq6EOZci766t2HxTO7gsmCKJFFtpkpmsyUQuMfxLzCj h6O/V4kGxvJlAH/Hj/RECZzpHe0a1EIpfRcbUH87llu52AkmMJcA4gGR7cVfZSrI9vWxmONoroEIN Zb/J+jbGiL/PpiI0Dz9eiff9y+lIVnlcLLgSGIm1xvavY8wAG8VWrOMKaPkF0B6J+yO+3QqUM7gGM vQhDqYwA==; Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rV5w8-00000008p1c-1L1B for linux-arm-kernel@lists.infradead.org; Wed, 31 Jan 2024 08:27:14 +0000 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40V76lOP002498; Wed, 31 Jan 2024 08:26:42 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-transfer-encoding:content-type; s= qcppdkim1; bh=zXr0mBdB665cttRh0NuHcRK0xyTWE5xCgRUbWjlPAU8=; b=lt vS7C+9O5jvuRIZWVtmlMrLZzonwQZc95lD4uNJyBpWmFAwW+0sBhZ8YxfSDxXLic bLCF1+7o3DIjQoy4msa0UIJjc4HRUAjlQEZzm86DLPRM+n7719pWLmgU695KOwuc 3Er78RVEMDrSaNDL5+T0YoqhqJnPmIev2N8diWdRKvHuVvP4hhiHG4ViOqOqmKh6 lkLP/WjNBQED4EwoOVEhEbo/GImssTKGRsL+wApM4ka/GHn6L14UU7Odh/+b+xzH 8x+OsJebZRjRmTtMHbS+ZJUX3M6LB+A3/980JfV7wl2XZi9HvR8nmZZ4ttebBm4K pmqeEkT92z0CLNa+BQNw== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vy9nk9974-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Jan 2024 08:26:42 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40V8QeIv010539 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Jan 2024 08:26:41 GMT Received: from hu-jinlmao-lv.qualcomm.com (10.49.16.6) 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.1118.40; Wed, 31 Jan 2024 00:26:40 -0800 From: Mao Jinlong To: Suzuki K Poulose , Mike Leach , James Clark , Leo Yan , Alexander Shishkin , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , "Alexandre Torgue" , Bjorn Andersson , Konrad Dybcio , "Mathieu Poirier" CC: Mao Jinlong , , , , , , , Tingwei Zhang , Yuanfang Zhang , Tao Zhang Subject: [PATCH v3 2/2] dt-bindings: arm: Add device-name in the coresight components Date: Wed, 31 Jan 2024 00:26:26 -0800 Message-ID: <20240131082628.6288-3-quic_jinlmao@quicinc.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240131082628.6288-1-quic_jinlmao@quicinc.com> References: <20240131082628.6288-1-quic_jinlmao@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) 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-GUID: Ykl1PGZ6S8dPye5cl1QM1JFjtE83zfvx X-Proofpoint-ORIG-GUID: Ykl1PGZ6S8dPye5cl1QM1JFjtE83zfvx 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-01-31_03,2024-01-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 impostorscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 malwarescore=0 suspectscore=0 mlxlogscore=999 clxscore=1015 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401310063 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240131_082712_715119_E4058903 X-CRM114-Status: GOOD ( 12.52 ) 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 Current name of coresight component's folder consists of prefix of the device and the id in the device list. When run 'ls' command, we can get the register address of the device. Take CTI for example, if we want to set the config for modem CTI, but we can't know which CTI is modem CTI from all current information. cti_sys0 -> ../../../devices/platform/soc@0/138f0000.cti/cti_sys0 cti_sys1 -> ../../../devices/platform/soc@0/13900000.cti/cti_sys1 Add device-name in device tree which can provide a better description of the coresight device. It can provide the info like the system or HW it belongs to. Signed-off-by: Mao Jinlong --- .../devicetree/bindings/arm/arm,coresight-catu.yaml | 6 ++++++ .../devicetree/bindings/arm/arm,coresight-cpu-debug.yaml | 6 ++++++ .../devicetree/bindings/arm/arm,coresight-cti.yaml | 6 ++++++ .../devicetree/bindings/arm/arm,coresight-dummy-sink.yaml | 6 ++++++ .../devicetree/bindings/arm/arm,coresight-dummy-source.yaml | 6 ++++++ .../bindings/arm/arm,coresight-dynamic-funnel.yaml | 6 ++++++ .../bindings/arm/arm,coresight-dynamic-replicator.yaml | 6 ++++++ .../devicetree/bindings/arm/arm,coresight-etb10.yaml | 6 ++++++ .../devicetree/bindings/arm/arm,coresight-etm.yaml | 6 ++++++ .../bindings/arm/arm,coresight-static-funnel.yaml | 6 ++++++ .../bindings/arm/arm,coresight-static-replicator.yaml | 6 ++++++ .../devicetree/bindings/arm/arm,coresight-stm.yaml | 6 ++++++ .../devicetree/bindings/arm/arm,coresight-tmc.yaml | 6 ++++++ .../devicetree/bindings/arm/arm,coresight-tpiu.yaml | 6 ++++++ .../devicetree/bindings/arm/qcom,coresight-tpda.yaml | 6 ++++++ .../devicetree/bindings/arm/qcom,coresight-tpdm.yaml | 6 ++++++ 16 files changed, 96 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-catu.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-catu.yaml index 2bae06eed693..a4d20aad0c70 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-catu.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-catu.yaml @@ -44,6 +44,12 @@ properties: - const: arm,coresight-catu - const: arm,primecell + device-name: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the name which can describe what kind of HW or system the + device is for. + reg: maxItems: 1 diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-cpu-debug.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-cpu-debug.yaml index 0a6bc03ebe00..6094cc9cb834 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-cpu-debug.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-cpu-debug.yaml @@ -39,6 +39,12 @@ properties: - const: arm,coresight-cpu-debug - const: arm,primecell + device-name: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the name which can describe what kind of HW or system the + device is for. + reg: maxItems: 1 diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml index 2d5545a2b49c..21c3c4fb71a6 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml @@ -88,6 +88,12 @@ properties: - const: arm,coresight-cti - const: arm,primecell + device-name: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the name which can describe what kind of HW or system the + device is for. + reg: maxItems: 1 diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-dummy-sink.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-dummy-sink.yaml index c960c8e0a9a5..c2c3f4a743f2 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-dummy-sink.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-dummy-sink.yaml @@ -39,6 +39,12 @@ properties: enum: - arm,coresight-dummy-sink + device-name: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the name which can describe what kind of HW or system the + device is for. + in-ports: $ref: /schemas/graph.yaml#/properties/ports diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-dummy-source.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-dummy-source.yaml index 6745b4cc8f1c..6b3ba3c0cedb 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-dummy-source.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-dummy-source.yaml @@ -38,6 +38,12 @@ properties: enum: - arm,coresight-dummy-source + device-name: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the name which can describe what kind of HW or system the + device is for. + out-ports: $ref: /schemas/graph.yaml#/properties/ports diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml index 44a1041cb0fc..a47c30e6da97 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml @@ -41,6 +41,12 @@ properties: - const: arm,coresight-dynamic-funnel - const: arm,primecell + device-name: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the name which can describe what kind of HW or system the + device is for. + reg: maxItems: 1 diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-replicator.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-replicator.yaml index 03792e9bd97a..feb800a95ee5 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-replicator.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-replicator.yaml @@ -41,6 +41,12 @@ properties: - const: arm,coresight-dynamic-replicator - const: arm,primecell + device-name: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the name which can describe what kind of HW or system the + device is for. + reg: maxItems: 1 diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-etb10.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-etb10.yaml index 90679788e0bf..5bf173982019 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-etb10.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-etb10.yaml @@ -41,6 +41,12 @@ properties: - const: arm,coresight-etb10 - const: arm,primecell + device-name: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the name which can describe what kind of HW or system the + device is for. + reg: maxItems: 1 diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-etm.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-etm.yaml index 01200f67504a..20c0e5394ea0 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-etm.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-etm.yaml @@ -60,6 +60,12 @@ properties: Embedded Trace Macrocell (version 4.x), with system register access only const: arm,coresight-etm4x-sysreg + device-name: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the name which can describe what kind of HW or system the + device is for. + reg: maxItems: 1 diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-static-funnel.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-static-funnel.yaml index cc8c3baa79b4..ddecf2a9cbc6 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-static-funnel.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-static-funnel.yaml @@ -27,6 +27,12 @@ properties: compatible: const: arm,coresight-static-funnel + device-name: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the name which can describe what kind of HW or system the + device is for. + power-domains: maxItems: 1 diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-static-replicator.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-static-replicator.yaml index 1892a091ac35..d10f2fbcab68 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-static-replicator.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-static-replicator.yaml @@ -27,6 +27,12 @@ properties: compatible: const: arm,coresight-static-replicator + device-name: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the name which can describe what kind of HW or system the + device is for. + power-domains: maxItems: 1 diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-stm.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-stm.yaml index 378380c3f5aa..c964a01c5bd6 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-stm.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-stm.yaml @@ -43,6 +43,12 @@ properties: - const: arm,coresight-stm - const: arm,primecell + device-name: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the name which can describe what kind of HW or system the + device is for. + reg: maxItems: 2 diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-tmc.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-tmc.yaml index cb8dceaca70e..825d24c1c263 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-tmc.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-tmc.yaml @@ -42,6 +42,12 @@ properties: - const: arm,coresight-tmc - const: arm,primecell + device-name: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the name which can describe what kind of HW or system the + device is for. + reg: maxItems: 1 diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-tpiu.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-tpiu.yaml index 61a0cdc27745..3959c3ae6244 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-tpiu.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-tpiu.yaml @@ -41,6 +41,12 @@ properties: - const: arm,coresight-tpiu - const: arm,primecell + device-name: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the name which can describe what kind of HW or system the + device is for. + reg: maxItems: 1 diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml b/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml index ea3c5db6b52d..6c94c47a05d4 100644 --- a/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml +++ b/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml @@ -54,6 +54,12 @@ properties: - const: qcom,coresight-tpda - const: arm,primecell + device-name: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the name which can describe what kind of HW or system the + device is for. + reg: minItems: 1 maxItems: 2 diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-tpdm.yaml b/Documentation/devicetree/bindings/arm/qcom,coresight-tpdm.yaml index 61ddc3b5b247..f9c73c26daa8 100644 --- a/Documentation/devicetree/bindings/arm/qcom,coresight-tpdm.yaml +++ b/Documentation/devicetree/bindings/arm/qcom,coresight-tpdm.yaml @@ -40,6 +40,12 @@ properties: - const: qcom,coresight-tpdm - const: arm,primecell + device-name: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the name which can describe what kind of HW or system the + device is for. + reg: minItems: 1 maxItems: 2