summaryrefslogtreecommitdiff
path: root/drivers/hwtracing/coresight/coresight-tpdm.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwtracing/coresight/coresight-tpdm.h')
-rw-r--r--drivers/hwtracing/coresight/coresight-tpdm.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/hwtracing/coresight/coresight-tpdm.h b/drivers/hwtracing/coresight/coresight-tpdm.h
index b11754389734..2867f3ab8186 100644
--- a/drivers/hwtracing/coresight/coresight-tpdm.h
+++ b/drivers/hwtracing/coresight/coresight-tpdm.h
@@ -343,4 +343,16 @@ struct tpdm_dataset_attribute {
enum dataset_mem mem;
u32 idx;
};
+
+static inline bool coresight_device_is_tpdm(struct coresight_device *csdev)
+{
+ return (coresight_is_device_source(csdev)) &&
+ (csdev->subtype.source_subtype ==
+ CORESIGHT_DEV_SUBTYPE_SOURCE_TPDM);
+}
+
+static inline bool coresight_is_static_tpdm(struct coresight_device *csdev)
+{
+ return (coresight_device_is_tpdm(csdev) && !csdev->access.base);
+}
#endif /* _CORESIGHT_CORESIGHT_TPDM_H */