devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Add support for a streaming interface for TMC ETR
@ 2023-08-13 15:12 Mao Jinlong
  2023-08-13 15:12 ` [PATCH v2 1/3] Coresight: Add driver to support for CSR Mao Jinlong
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mao Jinlong @ 2023-08-13 15:12 UTC (permalink / raw)
  To: Suzuki K Poulose, Mike Leach, James Clark, Leo Yan,
	Alexander Shishkin, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: Mao Jinlong, coresight, linux-arm-kernel, linux-kernel,
	linux-arm-msm, devicetree, Tingwei Zhang, Yuanfang Zhang,
	Tao Zhang, Hao Zhang

This patch series is to add support for a streaming interface for
TMC ETR to allow for continuous log collection to secondary storage.
An interrupt based mechanism is used to stream out the data from the device.

QDSS_CS_QDSSCSR_ETRIRQCTRL register is used to set the IRQ byte counter
value. The value of this registers defines the number of bytes that when moved by
the ETR AXI interface. It will casues an interrupt which can be used by an
userspace program to know how much data is present in memory requiring copy to some
other location. A zero setting disables the interrupt.A one setting
means 8 bytes, two 16 bytes, etc. In other words, the value in this
register is the interrupt threshold times 8 bytes. ETR must be enabled
when use this interrupt function.

Sample:
echo 4096 > /sys/bus/coresight/devices/csr0/etr_byte_cntr_val
echo 1 > /sys/bus/coresight/devices/tmc_etr0/enable_sink
echo 1 > /sys/bus/coresight/devices/stm0/enabl_source

cat /dev/byte-cntr > /data/qdss.bin &

The log collection will stop after disabling the ETR.

codelinaro link:
https://git.codelinaro.org/clo/linux-kernel/coresight/-/commits/coresight-byte-cntr-v2?ref_type=heads

Change in V2:
Make CSR device as a helper device of ETR device. When enable ETR, it
will enable CSR byte-cntr function.

Mao Jinlong (3):
  Coresight: Add driver to support for CSR
  dt-bindings: arm: Adds CoreSight CSR hardware definitions
  coresight-csr: Add support for streaming interface for ETR

 .../testing/sysfs-bus-coresight-devices-csr   |   6 +
 .../bindings/arm/qcom,coresight-csr.yaml      | 130 ++++++
 MAINTAINERS                                   |   2 +-
 drivers/hwtracing/coresight/Kconfig           |  12 +
 drivers/hwtracing/coresight/Makefile          |   2 +
 drivers/hwtracing/coresight/coresight-core.c  |  31 +-
 .../coresight/coresight-csr-bytecntr.c        | 275 ++++++++++++
 .../hwtracing/coresight/coresight-csr-core.c  | 393 ++++++++++++++++++
 drivers/hwtracing/coresight/coresight-csr.h   | 112 +++++
 drivers/hwtracing/coresight/coresight-priv.h  |   8 +
 .../hwtracing/coresight/coresight-tmc-etr.c   |   3 +-
 drivers/hwtracing/coresight/coresight-tmc.h   |   2 +
 include/dt-bindings/arm/coresight-csr-dt.h    |  12 +
 include/linux/coresight.h                     |   3 +-
 14 files changed, 984 insertions(+), 7 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-coresight-devices-csr
 create mode 100644 Documentation/devicetree/bindings/arm/qcom,coresight-csr.yaml
 create mode 100644 drivers/hwtracing/coresight/coresight-csr-bytecntr.c
 create mode 100644 drivers/hwtracing/coresight/coresight-csr-core.c
 create mode 100644 drivers/hwtracing/coresight/coresight-csr.h
 create mode 100644 include/dt-bindings/arm/coresight-csr-dt.h

-- 
2.17.1


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

end of thread, other threads:[~2023-08-22  6:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-13 15:12 [PATCH v2 0/3] Add support for a streaming interface for TMC ETR Mao Jinlong
2023-08-13 15:12 ` [PATCH v2 1/3] Coresight: Add driver to support for CSR Mao Jinlong
2023-08-13 15:12 ` [PATCH v2 2/3] dt-bindings: arm: Adds CoreSight CSR hardware definitions Mao Jinlong
2023-08-21 17:54   ` Rob Herring
2023-08-22  6:04   ` Krzysztof Kozlowski
2023-08-13 15:12 ` [PATCH v2 3/3] coresight-csr: Add support for streaming interface for ETR Mao Jinlong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).