[PATCH v1 2/3] coresight: tpdm: add static tpdm support

Jie Gan jie.gan at oss.qualcomm.com
Wed Sep 3 17:47:57 PDT 2025



On 9/3/2025 7:06 PM, Konrad Dybcio wrote:
> On 8/22/25 12:30 PM, Jie Gan wrote:
>> The static TPDM function as a dummy source, however, it is essential
>> to enable the port connected to the TPDA and configure the element size.
>> Without this, the TPDA cannot correctly receive trace data from the
>> static TPDM. Since the static TPDM does not require MMIO mapping to
>> access its registers, a clock controller is not mandatory for its
>> operation.
>>
>> Signed-off-by: Jie Gan <jie.gan at oss.qualcomm.com>
>> ---
>>   drivers/hwtracing/coresight/coresight-tpda.c |   9 ++
>>   drivers/hwtracing/coresight/coresight-tpdm.c | 148 ++++++++++++++-----
>>   drivers/hwtracing/coresight/coresight-tpdm.h |   8 +
>>   3 files changed, 131 insertions(+), 34 deletions(-)
>>
>> diff --git a/drivers/hwtracing/coresight/coresight-tpda.c b/drivers/hwtracing/coresight/coresight-tpda.c
>> index 333b3cb23685..4e93fa5bace4 100644
>> --- a/drivers/hwtracing/coresight/coresight-tpda.c
>> +++ b/drivers/hwtracing/coresight/coresight-tpda.c
>> @@ -68,6 +68,15 @@ static int tpdm_read_element_size(struct tpda_drvdata *drvdata,
>>   	int rc = -EINVAL;
>>   	struct tpdm_drvdata *tpdm_data = dev_get_drvdata(csdev->dev.parent);
>>   
>> +	if (coresight_is_static_tpdm(csdev)) {
>> +		rc = fwnode_property_read_u32(dev_fwnode(csdev->dev.parent),
>> +					      "qcom,dsb-element-bits", &drvdata->dsb_esize);
>> +		rc &= fwnode_property_read_u32(dev_fwnode(csdev->dev.parent),
>> +					       "qcom,cmb-element-bits", &drvdata->cmb_esize);
> 
> This allows either pass/pass or fail/pass combinations to succeed
> - is this intended?

Yes. For static TPDM, we cannot read related registers to confirm which 
types it supported, just depend on the element-bits property which 
defined in DT.

So we treat either pass/pass or fail/pass(pass/fail) as succeed.

Thanks,
Jie

> 
> Konrad




More information about the linux-arm-kernel mailing list