[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d032a4cd-235c-437b-852e-998db8635056@oss.qualcomm.com>
Date: Fri, 23 Jan 2026 09:27:38 +0800
From: Jie Gan <jie.gan@....qualcomm.com>
To: Suzuki K Poulose <suzuki.poulose@....com>,
Mike Leach <mike.leach@...aro.org>,
James Clark <james.clark@...aro.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Tingwei Zhang <tingwei.zhang@....qualcomm.com>,
Mao Jinlong <jinlong.mao@....qualcomm.com>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>
Cc: coresight@...ts.linaro.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
devicetree@...r.kernel.org
Subject: Re: [PATCH v10 1/8] coresight: core: Refactoring ctcu_get_active_port
and make it generic
On 1/22/2026 6:00 PM, Suzuki K Poulose wrote:
> On 22/01/2026 02:08, Jie Gan wrote:
>> Remove ctcu_get_active_port from CTCU module and add it to the core
>> framework.
>>
>> The port number is crucial for the CTCU device to identify which ETR
>> it serves. With the port number we can correctly get required parameters
>> of the CTCU device in TMC module.
>>
>> Reviewed-by: Mike Leach <mike.leach@...aro.org>
>> Signed-off-by: Jie Gan <jie.gan@....qualcomm.com>
>> ---
>> drivers/hwtracing/coresight/coresight-core.c | 24 +++++++++++++
>> ++++++++++
>> drivers/hwtracing/coresight/coresight-ctcu-core.c | 19
>> +-----------------
>> drivers/hwtracing/coresight/coresight-priv.h | 2 ++
>> 3 files changed, 27 insertions(+), 18 deletions(-)
>>
>> diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/
>> hwtracing/coresight/coresight-core.c
>> index c660cf8adb1c..0e8448784c62 100644
>> --- a/drivers/hwtracing/coresight/coresight-core.c
>> +++ b/drivers/hwtracing/coresight/coresight-core.c
>> @@ -585,6 +585,30 @@ struct coresight_device
>> *coresight_get_sink(struct coresight_path *path)
>> }
>> EXPORT_SYMBOL_GPL(coresight_get_sink);
>> +/**
>> + * coresight_get_in_port: Find the input port number at @csdev where
>> a @remote
>> + * device is connected to.
>
> This doesn't match the code ?
>
> We are looking at the remote devices' in_connections ?
csdev here is the coresight_device of the TMC_ETR. We would like to find
the in-port number of the CTCU device(remote) which is connected to the
TMC_ETR device(csdev).
The description is incorrect, and I will update it in next version:
Find the input port number at @remote where the @csdev device is
connected to.
Thanks,
Jie
>
>> + *
>> + * @csdev: csdev of the device.
>> + * @remote: csdev of the remote device which is connected to @csdev.
>> + *
>> + * Return: port number upon success or -EINVAL for fail.
>> + */
>> +int coresight_get_in_port(struct coresight_device *csdev,
>> + struct coresight_device *remote)
>> +{
>> + struct coresight_platform_data *pdata = remote->pdata;
>> + int i;
>> +
>> + for (i = 0; i < pdata->nr_inconns; ++i) {
>> + if (pdata->in_conns[i]->src_dev == csdev)
>> + return pdata->in_conns[i]->dest_port;
>> + }
>
> Suzuki
>
Powered by blists - more mailing lists