Re: [PATCH v9 7/7] qcom-tgu: Add reset node to initialize

From: Songwei Chai

Date: Wed Jan 07 2026 - 00:33:33 EST




On 1/6/2026 6:16 PM, Suzuki K Poulose wrote:
On 19/12/2025 06:59, Songwei Chai wrote:
Add reset node to initialize the value of
priority/condition_decode/condition_select/timer/counter nodes.

Signed-off-by: Songwei Chai <songwei.chai@xxxxxxxxxxxxxxxx>
---
  .../ABI/testing/sysfs-bus-amba-devices-tgu    |  7 ++
  drivers/hwtracing/qcom/tgu.c                  | 74 +++++++++++++++++++
  2 files changed, 81 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-bus-amba-devices-tgu b/ Documentation/ABI/testing/sysfs-bus-amba-devices-tgu
index 010eade0a1c5..0733b3e07b45 100644
--- a/Documentation/ABI/testing/sysfs-bus-amba-devices-tgu
+++ b/Documentation/ABI/testing/sysfs-bus-amba-devices-tgu
@@ -42,3 +42,10 @@ KernelVersion    6.19
  Contact:    Jinlong Mao <jinlong.mao@xxxxxxxxxxxxxxxx>, Songwei Chai <songwei.chai@xxxxxxxxxxxxxxxx>
  Description:
          (RW) Set/Get the counter value with specific step for TGU.
+
+What:        /sys/bus/amba/devices/<tgu-name>/reset_tgu
+Date:        December 2025
+KernelVersion    6.19
+Contact:    Jinlong Mao <jinlong.mao@xxxxxxxxxxxxxxxx>, Songwei Chai <songwei.chai@xxxxxxxxxxxxxxxx>
+Description:
+        (Write) Write 1 to reset the dataset for TGU.
diff --git a/drivers/hwtracing/qcom/tgu.c b/drivers/hwtracing/qcom/tgu.c
index d4210869556e..5a8c6af9b719 100644
--- a/drivers/hwtracing/qcom/tgu.c
+++ b/drivers/hwtracing/qcom/tgu.c
@@ -425,8 +425,82 @@ static ssize_t enable_tgu_store(struct device *dev,


+
+    dev_dbg(dev, "Coresight-TGU reset complete\n");

Qualcomm-TGU ?Exactly! Thanks for reminder.>
Suzuki