[PATCH] coresight: core: Add coresight name support

Suzuki K Poulose suzuki.poulose at arm.com
Mon Apr 24 15:26:33 PDT 2023


On 24/04/2023 14:42, Jinlong Mao wrote:
> On 3/17/2023 10:25 PM, Suzuki K Poulose wrote:
> 
>> On 17/03/2023 05:34, Jinlong Mao wrote:
>>>
>>> On 3/13/2023 5:16 PM, Suzuki K Poulose wrote:
>>>> Cc: Rob
>>>>
>>>> On 01/03/2023 15:11, Jinlong Mao wrote:
>>>>> Hi Suzuki,
>>>>>
>>>>> On 2/9/2023 10:16 AM, Jinlong Mao wrote:
>>>>>>
>>>>>> On 2/8/2023 10:26 PM, Suzuki K Poulose wrote:
>>>>>>> On 08/02/2023 11:07, Mao Jinlong wrote:
>>>>>>>> Apart from STM and ETM sources, there will be more sources added to
>>>>>>>> coresight components. For example, there are over 10 TPDM sources.
>>>>>>>> Add coresight name support for custom names which will be
>>>>>>>> easy to identify the source.
>>>>>>>>
>>>>>>>
>>>>>>> As we have previously discussed, please don't make this a generic
>>>>>>> code change. If your device has a "specifici" name, use that for
>>>>>>> allocating in the driver and leave the core code alone.
>>>>>>>
>>>>>>> Suzuki
>>>>>>>
>>>>>> Hi Suzuki,
>>>>>>
>>>>>> Not only for TPDMs. There could be dozens of CTI devices.
>>>>>> It is hard for user to know which CTI device it is with current 
>>>>>> names.
>>>>>>
>>>>>> Thanks
>>>>>> Jinlong Mao
>>>>>
>>>>> The coresight name support is applicable to CTI and TPDM devices.
>>>>> This is a generic change for the source which has dozens of devices.
>>>>
>>>> I took a look at the CTI situation and I agree that the situation
>>>> is a bit tricky. The CTI could be connected to multiple devices,
>>>> some of them may not be even CoreSight devices. Given there could
>>>> be numerous of them, we need some way to make the "devices" naming
>>>> a bit more intuitive.
>>>>
>>>> Before we go ahead and add something specific to coresight, I would
>>>> like to see if there is a generic property. Ideally, the "labels"
>>>> in the DTS sources would have been an ideal choice, but can't
>>>> see how that is available in the FDT.
>>>>
>>>> Suzuki
>>> Hi Suzuki,
>>>
>>> Shall we use the full_name of device_node struct as coresight 
>>> component's name ?
>>>
>>>    struct device_node {
>>>      const char *name;
>>>      phandle phandle;
>>> *    const char *full_name;
>>>
>>> *For component below, the full_name will be "coresight-tpdm-ipcc".
>>> *
>>> **coresight-tpdm-ipcc* {
>>
>> Does that go against the convention of naming the DT nodes ?
>> I am not sure. Also, we would need a way to solve this for ACPI too.
>>
>> Suzuki
> Hi Suzuki,
> 
> Does ACPI device also use "coresight_alloc_device_name" to get the 
> device's name ?

All driver code is common for both DT & ACPI. The only difference is
the coresight_get_platform_data() which uses DT vs ACPI information
and populates the platform_data.  See coresight-platform.c.

Suzuki





More information about the linux-arm-kernel mailing list