summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ufs/ufs-mediatek-trace.h
diff options
context:
space:
mode:
authorStanley Chu <stanley.chu@mediatek.com>2020-12-05 19:59:01 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2020-12-07 17:51:49 -0500
commitca1bb061d64499d8aa08b0987643928a924c30bc (patch)
treef167b1dc0bd158f177016015adee10f85f77a418 /drivers/scsi/ufs/ufs-mediatek-trace.h
parent172614a9d0e861f8ad0e3165dd1d02bc63adaa1b (diff)
downloadlinux-ca1bb061d64499d8aa08b0987643928a924c30bc.tar.bz2
scsi: ufs-mediatek: Introduce event_notify implementation
Introduce event_notify implementation on MediaTek UFS platform. A vendor-specific tracepoint is added that can be used for debugging purposes. Link: https://lore.kernel.org/r/20201205115901.26815-5-stanley.chu@mediatek.com Reviewed-by: Avri Altman <avri.altman@wdc.com> Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/ufs-mediatek-trace.h')
-rw-r--r--drivers/scsi/ufs/ufs-mediatek-trace.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/ufs-mediatek-trace.h b/drivers/scsi/ufs/ufs-mediatek-trace.h
new file mode 100644
index 000000000000..fd6f84c1b4e2
--- /dev/null
+++ b/drivers/scsi/ufs/ufs-mediatek-trace.h
@@ -0,0 +1,36 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2020 MediaTek Inc.
+ */
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM ufs_mtk
+
+#if !defined(_TRACE_EVENT_UFS_MEDIATEK_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_EVENT_UFS_MEDIATEK_H
+
+#include <linux/tracepoint.h>
+
+TRACE_EVENT(ufs_mtk_event,
+ TP_PROTO(unsigned int type, unsigned int data),
+ TP_ARGS(type, data),
+
+ TP_STRUCT__entry(
+ __field(unsigned int, type)
+ __field(unsigned int, data)
+ ),
+
+ TP_fast_assign(
+ __entry->type = type;
+ __entry->data = data;
+ ),
+
+ TP_printk("ufs:event=%u data=%u",
+ __entry->type, __entry->data)
+ );
+#endif
+
+#undef TRACE_INCLUDE_PATH
+#undef TRACE_INCLUDE_FILE
+#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_FILE ufs-mediatek-trace
+#include <trace/define_trace.h>