From: Tao Zhang <taozha@codeaurora.org>
To: Mathieu Poirier <mathieu.poirier@linaro.org>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Tao Zhang <taozha@codeaurora.org>,
Mike Leach <mike.leach@linaro.org>, Leo Yan <leo.yan@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Tingwei Zhang <tingwei@codeaurora.org>,
Mao Jinlong <jinlmao@codeaurora.org>,
Yuanfang Zhang <zhangyuanfang@codeaurora.org>
Subject: [PATCH v1 1/2] coresight: Add support for device names
Date: Fri, 16 Apr 2021 16:22:41 +0800 [thread overview]
Message-ID: <1618561362-1561-2-git-send-email-taozha@codeaurora.org> (raw)
In-Reply-To: <1618561362-1561-1-git-send-email-taozha@codeaurora.org>
Add support to read device names from device tree entries. Before
the previous process of allocating coresight device name, try to
read the coresight device name from device tree entries. If it is
read, the device name will be returned directly. If it is not read,
the original allocation name process will be followed.
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
Signed-off-by: Tao Zhang <taozha@codeaurora.org>
---
drivers/hwtracing/coresight/coresight-core.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c
index 4ba801d..b79c726 100644
--- a/drivers/hwtracing/coresight/coresight-core.c
+++ b/drivers/hwtracing/coresight/coresight-core.c
@@ -1640,6 +1640,12 @@ char *coresight_alloc_device_name(struct coresight_dev_list *dict,
int idx;
char *name = NULL;
struct fwnode_handle **list;
+ struct device_node *node = dev->of_node;
+
+ if (!node) {
+ if (!of_property_read_string(node, "coresight-name", &name))
+ return name;
+ }
mutex_lock(&coresight_mutex);
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2021-04-16 8:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-16 8:22 [PATCH v1 0/2] " Tao Zhang
2021-04-16 8:22 ` Tao Zhang [this message]
2021-04-16 8:22 ` [PATCH v1 2/2] dt-bindings: arm: add property for coresight component name Tao Zhang
-- strict thread matches above, loose matches on Subject: below --
2021-04-16 8:07 [PATCH 0/2] *** SUBJECT HERE *** Tao Zhang
2021-04-16 8:07 ` [PATCH v1 1/2] coresight: Add support for device names Tao Zhang
2021-04-16 11:19 ` Alexander Shishkin
2021-04-16 12:14 ` taozha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1618561362-1561-2-git-send-email-taozha@codeaurora.org \
--to=taozha@codeaurora.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=coresight@lists.linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=jinlmao@codeaurora.org \
--cc=leo.yan@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=mike.leach@linaro.org \
--cc=suzuki.poulose@arm.com \
--cc=tingwei@codeaurora.org \
--cc=zhangyuanfang@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome