[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240705085152.9063-4-quic_taozha@quicinc.com>
Date: Fri, 5 Jul 2024 16:51:52 +0800
From: Tao Zhang <quic_taozha@...cinc.com>
To: Mathieu Poirier <mathieu.poirier@...aro.org>,
Suzuki K Poulose
<suzuki.poulose@....com>,
Alexander Shishkin
<alexander.shishkin@...ux.intel.com>,
Mike Leach <mike.leach@...aro.org>, "Rob Herring" <robh+dt@...nel.org>,
Krzysztof Kozlowski
<krzysztof.kozlowski+dt@...aro.org>,
James Clark <james.clark@....com>
CC: Tao Zhang <quic_taozha@...cinc.com>,
Jinlong Mao
<quic_jinlmao@...cinc.com>, Leo Yan <leo.yan@...aro.org>,
<coresight@...ts.linaro.org>, <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>,
Tingwei Zhang
<quic_tingweiz@...cinc.com>,
Yuanfang Zhang <quic_yuanfang@...cinc.com>,
Trilok Soni <quic_tsoni@...cinc.com>,
Song Chai <quic_songchai@...cinc.com>, <linux-arm-msm@...r.kernel.org>,
Jie Gan <quic_jiegan@...cinc.com>
Subject: [PATCH v1 3/3] coresight-tpda: Optimize the function of reading element size
Since the new funnel device supports multi-port output scenarios,
there may be more than one TPDM connected to one TPDA. In this
way, when reading the element size of the TPDM, TPDA driver needs
to find the expected TPDM corresponding to the filter source.
When TPDA finds a TPDM or a filter source from a input connection,
it will read the Devicetree to get the expected TPDM's element
size.
Signed-off-by: Tao Zhang <quic_taozha@...cinc.com>
---
drivers/hwtracing/coresight/coresight-tpda.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-tpda.c b/drivers/hwtracing/coresight/coresight-tpda.c
index 52b0201090fb..fc5a4e46cf5d 100644
--- a/drivers/hwtracing/coresight/coresight-tpda.c
+++ b/drivers/hwtracing/coresight/coresight-tpda.c
@@ -110,9 +110,12 @@ static int tpda_get_element_size(struct tpda_drvdata *drvdata,
csdev->pdata->in_conns[i]->dest_port != inport)
continue;
- if (coresight_device_is_tpdm(in)) {
+ if (coresight_device_is_tpdm(in)
+ || csdev->pdata->in_conns[i]->filter_src_dev) {
if (drvdata->dsb_esize || drvdata->cmb_esize)
return -EEXIST;
+ if (csdev->pdata->in_conns[i]->filter_src_dev)
+ in = csdev->pdata->in_conns[i]->filter_src_dev;
rc = tpdm_read_element_size(drvdata, in);
if (rc)
return rc;
@@ -124,7 +127,6 @@ static int tpda_get_element_size(struct tpda_drvdata *drvdata,
}
}
-
return rc;
}
--
2.17.1
Powered by blists - more mailing lists