diff mbox series

[RFC,13/14] coresight: etm4x: Add support for sysreg only devices

Message ID 20200722172040.1299289-14-suzuki.poulose@arm.com (mailing list archive)
State New, archived
Headers show
Series coresight: Support for ETMv4.4 system instructions | expand

Commit Message

Suzuki K Poulose July 22, 2020, 5:20 p.m. UTC
Add support for etms without memory mapped access.

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
 drivers/hwtracing/coresight/coresight-etm4x.c | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)
diff mbox series

Patch

diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c
index e91af23ac419..88ec89629507 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x.c
@@ -27,6 +27,7 @@ 
 #include <linux/seq_file.h>
 #include <linux/uaccess.h>
 #include <linux/perf_event.h>
+#include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 #include <linux/property.h>
 #include <asm/sections.h>
@@ -1687,6 +1688,11 @@  static int etm4_probe_amba(struct amba_device *adev, const struct amba_id *id)
 	return ret;
 }
 
+static int etm4_4_probe(struct platform_device *pdev)
+{
+	return etm4_probe_common(&pdev->dev, NULL);
+}
+
 static struct amba_cs_uci_id uci_id_etm4[] = {
 	{
 		/*  ETMv4 UCI data */
@@ -1722,3 +1728,18 @@  static struct amba_driver etm4x_driver = {
 	.id_table	= etm4_ids,
 };
 builtin_amba_driver(etm4x_driver);
+
+static const struct of_device_id etm4_4_match[] = {
+	{ .compatible	= "arm,coresight-etm-v4.4" },
+	{}
+};
+
+static struct platform_driver etm4_4_driver = {
+	.probe		= etm4_4_probe,
+	.driver			= {
+		.name			= "coresight-etm4x",
+		.of_match_table		= etm4_4_match,
+		.suppress_bind_attrs	= true,
+	},
+};
+builtin_platform_driver(etm4_4_driver);