aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwtracing/coresight/coresight-cti-sysfs.c
diff options
context:
space:
mode:
authorMike Leach <mike.leach@linaro.org>2020-03-20 10:52:58 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-21 11:32:20 +0100
commita5614770ab976720ca5f47b717fad016e604a035 (patch)
tree2383fda72aa6ccfc636f429d8384035fad48dddf /drivers/hwtracing/coresight/coresight-cti-sysfs.c
parentcoresight: cti: Add device tree support for v8 arch CTI (diff)
downloadlinux-dev-a5614770ab976720ca5f47b717fad016e604a035.tar.xz
linux-dev-a5614770ab976720ca5f47b717fad016e604a035.zip
coresight: cti: Add device tree support for custom CTI
Adds support for CTIs whose connections are implementation defined at hardware design time, and not constrained by v8 architecture. These CTIs have no standard connection setup, all the settings have to be defined in the device tree files. The patch creates a set of connections and trigger signals based on the information provided. Signed-off-by: Mike Leach <mike.leach@linaro.org> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20200320165303.13681-8-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing/coresight/coresight-cti-sysfs.c')
-rw-r--r--drivers/hwtracing/coresight/coresight-cti-sysfs.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/hwtracing/coresight/coresight-cti-sysfs.c b/drivers/hwtracing/coresight/coresight-cti-sysfs.c
index 565e17680dea..552393525436 100644
--- a/drivers/hwtracing/coresight/coresight-cti-sysfs.c
+++ b/drivers/hwtracing/coresight/coresight-cti-sysfs.c
@@ -66,10 +66,20 @@ static ssize_t powered_show(struct device *dev,
}
static DEVICE_ATTR_RO(powered);
+static ssize_t ctmid_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ struct cti_drvdata *drvdata = dev_get_drvdata(dev->parent);
+
+ return sprintf(buf, "%d\n", drvdata->ctidev.ctm_id);
+}
+static DEVICE_ATTR_RO(ctmid);
+
/* attribute and group sysfs tables. */
static struct attribute *coresight_cti_attrs[] = {
&dev_attr_enable.attr,
&dev_attr_powered.attr,
+ &dev_attr_ctmid.attr,
NULL,
};