Re: [PATCH v17 6/9] Coresight: Add TPDA link driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17/01/2023 14:57, Mao Jinlong wrote:
TPDA(Trace, Profiling and Diagnostics Aggregator) is
to provide packetization, funneling and timestamping of
TPDM data. Multiple monitors are connected to different
input ports of TPDA.This change is to add tpda
enable/disable/probe functions for coresight tpda driver.

  - - - -         - - - -        - - - -
| TPDM 0|      | TPDM 1 |     | TPDM 2|
  - - - -         - - - -        - - - -
     |               |             |
     |_ _ _ _ _ _    |     _ _ _ _ |
                 |   |    |
                 |   |    |
            ------------------
           |        TPDA      |
            ------------------

Reviewed-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
Signed-off-by: Tao Zhang <quic_taozha@xxxxxxxxxxx>
Signed-off-by: Mao Jinlong <quic_jinlmao@xxxxxxxxxxx>
---
  drivers/hwtracing/coresight/Kconfig          |  11 +
  drivers/hwtracing/coresight/Makefile         |   1 +
  drivers/hwtracing/coresight/coresight-tpda.c | 211 +++++++++++++++++++
  drivers/hwtracing/coresight/coresight-tpda.h |  35 +++
  4 files changed, 258 insertions(+)
  create mode 100644 drivers/hwtracing/coresight/coresight-tpda.c
  create mode 100644 drivers/hwtracing/coresight/coresight-tpda.h

diff --git a/drivers/hwtracing/coresight/Kconfig b/drivers/hwtracing/coresight/Kconfig
index e2debad59608..2b5bbfffbc4f 100644
--- a/drivers/hwtracing/coresight/Kconfig
+++ b/drivers/hwtracing/coresight/Kconfig
@@ -217,6 +217,7 @@ config ULTRASOC_SMB
  config CORESIGHT_TPDM
  	tristate "CoreSight Trace, Profiling & Diagnostics Monitor driver"
  	select CORESIGHT_LINKS_AND_SINKS
+	select CORESIGHT_TPDA
  	help
  	  This driver provides support for configuring monitor. Monitors are
  	  primarily responsible for data set collection and support the
@@ -225,4 +226,14 @@ config CORESIGHT_TPDM
  	  To compile this driver as a module, choose M here: the module will be
  	  called coresight-tpdm.
+config CORESIGHT_TPDA
+	tristate "CoreSight Trace, Profiling & Diagnostics Aggregator driver"
+	help
+	  This driver provides support for configuring aggregator. This is
+	  primarily useful for pulling the data sets from one or more
+	  attached monitors and pushing the resultant data out. Multiple
+	  monitors are connected on different input ports of TPDA.
+
+	  To compile this driver as a module, choose M here: the module will be
+	  called coresight-tpda.
  endif
diff --git a/drivers/hwtracing/coresight/Makefile b/drivers/hwtracing/coresight/Makefile
index c637376e0efd..33bcc3f7b8ae 100644
--- a/drivers/hwtracing/coresight/Makefile
+++ b/drivers/hwtracing/coresight/Makefile
@@ -26,6 +26,7 @@ obj-$(CONFIG_CORESIGHT_CATU) += coresight-catu.o
  obj-$(CONFIG_CORESIGHT_CTI) += coresight-cti.o
  obj-$(CONFIG_CORESIGHT_TRBE) += coresight-trbe.o
  obj-$(CONFIG_CORESIGHT_TPDM) += coresight-tpdm.o
+obj-$(CONFIG_CORESIGHT_TPDA) += coresight-tpda.o
  coresight-cti-y := coresight-cti-core.o	coresight-cti-platform.o \
  		   coresight-cti-sysfs.o
  obj-$(CONFIG_ULTRASOC_SMB) += ultrasoc-smb.o
diff --git a/drivers/hwtracing/coresight/coresight-tpda.c b/drivers/hwtracing/coresight/coresight-tpda.c
new file mode 100644
index 000000000000..59897980bbb8
--- /dev/null
+++ b/drivers/hwtracing/coresight/coresight-tpda.c
@@ -0,0 +1,211 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ */

...

+static struct amba_driver tpda_driver = {
+	.drv = {
+		.name   = "coresight-tpda",
+		.owner	= THIS_MODULE,
+		.suppress_bind_attrs = true,
+	},
+	.probe          = tpda_probe,
+	.remove		= tpda_remove,
+	.id_table	= tpda_ids,
+};
+
+module_amba_driver(tpda_driver);
+
+MODULE_LICENSE("GPL v2");

Similarly here too.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux