Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH v6 0/3] coresight: Add static trace id support
@ 2024-11-04 11:56 Mao Jinlong
  2024-11-04 11:56 ` [PATCH v6 1/3] dt-bindings: arm: Add arm,static-trace-id for coresight dummy source Mao Jinlong
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Mao Jinlong @ 2024-11-04 11:56 UTC (permalink / raw)
  To: Suzuki K Poulose, Mike Leach, James Clark, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Mao Jinlong,
	Alexander Shishkin
  Cc: coresight, linux-arm-kernel, devicetree, linux-kernel,
	linux-arm-msm

Some HW has static trace id which cannot be changed via
software programming. For this case, configure the trace id
in device tree with "arm,static-trace-id = <xxx>", and
call coresight_trace_id_get_static_system_id with the trace id value
in device probe function. The id will be reserved for the HW
all the time if the device is probed.

Changes since V5:
1. Remove the warn for staic id not available.
2. Drop the system_id if registering the coresight device fails.
3. Return busy when static id is not available in dummy driver.

Changes since V4:
1. Use fwnode_property_read_u32 in fwnode_property_read_u32.
2. Update date and version in sysfs-bus-coresight-devices-dummy-source

Changes since V3:
1. Adda new API function
int coresight_trace_id_get_system_static_id(int trace_id).
2. Use the term "static trace id" for these devices where
the hardware sets a non-programmable trace ID. 

Changes since V2:
1. Change "trace-id" to "arm,trace-id".
2. Add trace id flag for getting preferred id or ODD id.

Changes since V1:
1. Add argument to coresight_trace_id_get_system_id for preferred id
instead of adding new function coresight_trace_id_reserve_system_id.
2. Add constraint to trace-id in dt-binding file.

Mao Jinlong (3):
  dt-bindings: arm: Add arm,static-trace-id for coresight dummy source
  coresight: Add support to get static id for system trace sources
  coresight: dummy: Add static trace id support for dummy source

 .../sysfs-bus-coresight-devices-dummy-source  | 15 ++++
 .../arm/arm,coresight-dummy-source.yaml       |  6 ++
 drivers/hwtracing/coresight/coresight-dummy.c | 81 ++++++++++++++++---
 .../hwtracing/coresight/coresight-platform.c  |  6 ++
 .../hwtracing/coresight/coresight-trace-id.c  | 39 ++++++---
 .../hwtracing/coresight/coresight-trace-id.h  |  9 +++
 include/linux/coresight.h                     |  1 +
 7 files changed, 137 insertions(+), 20 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-coresight-devices-dummy-source

-- 
2.17.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-11-19 10:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-04 11:56 [PATCH v6 0/3] coresight: Add static trace id support Mao Jinlong
2024-11-04 11:56 ` [PATCH v6 1/3] dt-bindings: arm: Add arm,static-trace-id for coresight dummy source Mao Jinlong
2024-11-04 11:56 ` [PATCH v6 2/3] coresight: Add support to get static id for system trace sources Mao Jinlong
2024-11-13 13:27   ` Suzuki K Poulose
2024-11-18 10:14     ` Jinlong Mao
2024-11-18 10:18       ` Suzuki K Poulose
2024-11-19 10:38         ` Jinlong Mao
2024-11-04 11:56 ` [PATCH v6 3/3] coresight: dummy: Add static trace id support for dummy source Mao Jinlong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox