Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  * mtu3_trace.h - trace support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  * Copyright (C) 2019 MediaTek Inc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  * Author: Chunfeng Yun <chunfeng.yun@mediatek.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #undef TRACE_SYSTEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #define TRACE_SYSTEM mtu3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) #if !defined(__MTU3_TRACE_H__) || defined(TRACE_HEADER_MULTI_READ)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) #define __MTU3_TRACE_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) #include <linux/types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) #include <linux/tracepoint.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) #include "mtu3.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) #define MTU3_MSG_MAX	256
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) TRACE_EVENT(mtu3_log,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 	TP_PROTO(struct device *dev, struct va_format *vaf),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	TP_ARGS(dev, vaf),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 		__string(name, dev_name(dev))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 		__dynamic_array(char, msg, MTU3_MSG_MAX)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 		__assign_str(name, dev_name(dev));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 		vsnprintf(__get_str(msg), MTU3_MSG_MAX, vaf->fmt, *vaf->va);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 	TP_printk("%s: %s", __get_str(name), __get_str(msg))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) TRACE_EVENT(mtu3_u3_ltssm_isr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 	TP_PROTO(u32 intr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 	TP_ARGS(intr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 		__field(u32, intr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 		__entry->intr = intr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 	TP_printk("(%08x) %s %s %s %s %s %s", __entry->intr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 		__entry->intr & HOT_RST_INTR ? "HOT_RST" : "",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 		__entry->intr & WARM_RST_INTR ? "WARM_RST" : "",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 		__entry->intr & ENTER_U3_INTR ? "ENT_U3" : "",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 		__entry->intr & EXIT_U3_INTR ? "EXIT_U3" : "",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 		__entry->intr & VBUS_RISE_INTR ? "VBUS_RISE" : "",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 		__entry->intr & VBUS_FALL_INTR ? "VBUS_FALL" : ""
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) TRACE_EVENT(mtu3_u2_common_isr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 	TP_PROTO(u32 intr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 	TP_ARGS(intr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 		__field(u32, intr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 		__entry->intr = intr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	TP_printk("(%08x) %s %s %s", __entry->intr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 		__entry->intr & SUSPEND_INTR ? "SUSPEND" : "",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 		__entry->intr & RESUME_INTR ? "RESUME" : "",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 		__entry->intr & RESET_INTR ? "RESET" : ""
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) TRACE_EVENT(mtu3_qmu_isr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	TP_PROTO(u32 done_intr, u32 exp_intr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	TP_ARGS(done_intr, exp_intr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 		__field(u32, done_intr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 		__field(u32, exp_intr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 		__entry->done_intr = done_intr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 		__entry->exp_intr = exp_intr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	TP_printk("done (tx %04x, rx %04x), exp (%08x)",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 		__entry->done_intr & 0xffff,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 		__entry->done_intr >> 16,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 		__entry->exp_intr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) DECLARE_EVENT_CLASS(mtu3_log_setup,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 	TP_PROTO(struct usb_ctrlrequest *setup),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 	TP_ARGS(setup),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 		__field(__u8, bRequestType)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 		__field(__u8, bRequest)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 		__field(__u16, wValue)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 		__field(__u16, wIndex)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 		__field(__u16, wLength)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 		__entry->bRequestType = setup->bRequestType;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 		__entry->bRequest = setup->bRequest;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 		__entry->wValue = le16_to_cpu(setup->wValue);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 		__entry->wIndex = le16_to_cpu(setup->wIndex);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 		__entry->wLength = le16_to_cpu(setup->wLength);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	TP_printk("setup - %02x %02x %04x %04x %04x",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 		__entry->bRequestType, __entry->bRequest,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 		__entry->wValue, __entry->wIndex, __entry->wLength
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) DEFINE_EVENT(mtu3_log_setup, mtu3_handle_setup,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 	TP_PROTO(struct usb_ctrlrequest *setup),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	TP_ARGS(setup)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) DECLARE_EVENT_CLASS(mtu3_log_request,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	TP_PROTO(struct mtu3_request *mreq),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	TP_ARGS(mreq),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 		__string(name, mreq->mep->name)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 		__field(struct mtu3_request *, mreq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 		__field(struct qmu_gpd *, gpd)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 		__field(unsigned int, actual)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 		__field(unsigned int, length)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 		__field(int, status)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 		__field(int, zero)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 		__field(int, no_interrupt)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 		__assign_str(name, mreq->mep->name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 		__entry->mreq = mreq;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 		__entry->gpd = mreq->gpd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 		__entry->actual = mreq->request.actual;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 		__entry->length = mreq->request.length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 		__entry->status = mreq->request.status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 		__entry->zero = mreq->request.zero;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 		__entry->no_interrupt = mreq->request.no_interrupt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	TP_printk("%s: req %p gpd %p len %u/%u %s%s --> %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 		__get_str(name), __entry->mreq, __entry->gpd,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 		__entry->actual, __entry->length,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 		__entry->zero ? "Z" : "z",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 		__entry->no_interrupt ? "i" : "I",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 		__entry->status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) DEFINE_EVENT(mtu3_log_request, mtu3_alloc_request,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 	TP_PROTO(struct mtu3_request *req),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 	TP_ARGS(req)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) DEFINE_EVENT(mtu3_log_request, mtu3_free_request,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 	TP_PROTO(struct mtu3_request *req),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 	TP_ARGS(req)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) DEFINE_EVENT(mtu3_log_request, mtu3_gadget_queue,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 	TP_PROTO(struct mtu3_request *req),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 	TP_ARGS(req)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) DEFINE_EVENT(mtu3_log_request, mtu3_gadget_dequeue,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 	TP_PROTO(struct mtu3_request *req),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 	TP_ARGS(req)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) DEFINE_EVENT(mtu3_log_request, mtu3_req_complete,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 	TP_PROTO(struct mtu3_request *req),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 	TP_ARGS(req)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) DECLARE_EVENT_CLASS(mtu3_log_gpd,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 	TP_PROTO(struct mtu3_ep *mep, struct qmu_gpd *gpd),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	TP_ARGS(mep, gpd),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 		__string(name, mep->name)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 		__field(struct qmu_gpd *, gpd)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 		__field(u32, dw0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 		__field(u32, dw1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 		__field(u32, dw2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 		__field(u32, dw3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 		__assign_str(name, mep->name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 		__entry->gpd = gpd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 		__entry->dw0 = le32_to_cpu(gpd->dw0_info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 		__entry->dw1 = le32_to_cpu(gpd->next_gpd);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 		__entry->dw2 = le32_to_cpu(gpd->buffer);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 		__entry->dw3 = le32_to_cpu(gpd->dw3_info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 	TP_printk("%s: gpd %p - %08x %08x %08x %08x",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 		__get_str(name), __entry->gpd,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 		__entry->dw0, __entry->dw1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 		__entry->dw2, __entry->dw3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) DEFINE_EVENT(mtu3_log_gpd, mtu3_prepare_gpd,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 	TP_PROTO(struct mtu3_ep *mep, struct qmu_gpd *gpd),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 	TP_ARGS(mep, gpd)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) DEFINE_EVENT(mtu3_log_gpd, mtu3_complete_gpd,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 	TP_PROTO(struct mtu3_ep *mep, struct qmu_gpd *gpd),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 	TP_ARGS(mep, gpd)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) DEFINE_EVENT(mtu3_log_gpd, mtu3_zlp_exp_gpd,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 	TP_PROTO(struct mtu3_ep *mep, struct qmu_gpd *gpd),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 	TP_ARGS(mep, gpd)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) DECLARE_EVENT_CLASS(mtu3_log_ep,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 	TP_PROTO(struct mtu3_ep *mep),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 	TP_ARGS(mep),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 		__string(name, mep->name)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 		__field(unsigned int, type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 		__field(unsigned int, slot)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 		__field(unsigned int, maxp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 		__field(unsigned int, mult)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 		__field(unsigned int, maxburst)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 		__field(unsigned int, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 		__field(unsigned int, direction)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 		__field(struct mtu3_gpd_ring *, gpd_ring)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 		__assign_str(name, mep->name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 		__entry->type = mep->type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 		__entry->slot = mep->slot;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 		__entry->maxp = mep->ep.maxpacket;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 		__entry->mult = mep->ep.mult;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 		__entry->maxburst = mep->ep.maxburst;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 		__entry->flags = mep->flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) 		__entry->direction = mep->is_in;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 		__entry->gpd_ring = &mep->gpd_ring;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) 	TP_printk("%s: type %d maxp %d slot %d mult %d burst %d ring %p/%pad flags %c:%c%c%c:%c",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) 		__get_str(name), __entry->type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) 		__entry->maxp, __entry->slot,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 		__entry->mult, __entry->maxburst,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) 		__entry->gpd_ring, &__entry->gpd_ring->dma,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) 		__entry->flags & MTU3_EP_ENABLED ? 'E' : 'e',
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) 		__entry->flags & MTU3_EP_STALL ? 'S' : 's',
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) 		__entry->flags & MTU3_EP_WEDGE ? 'W' : 'w',
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) 		__entry->flags & MTU3_EP_BUSY ? 'B' : 'b',
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 		__entry->direction ? '<' : '>'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) 	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) DEFINE_EVENT(mtu3_log_ep, mtu3_gadget_ep_enable,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) 	TP_PROTO(struct mtu3_ep *mep),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 	TP_ARGS(mep)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) DEFINE_EVENT(mtu3_log_ep, mtu3_gadget_ep_disable,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 	TP_PROTO(struct mtu3_ep *mep),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) 	TP_ARGS(mep)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) DEFINE_EVENT(mtu3_log_ep, mtu3_gadget_ep_set_halt,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) 	TP_PROTO(struct mtu3_ep *mep),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) 	TP_ARGS(mep)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) #endif /* __MTU3_TRACE_H__ */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) /* this part has to be here */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) #undef TRACE_INCLUDE_PATH
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) #define TRACE_INCLUDE_PATH .
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) #undef TRACE_INCLUDE_FILE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) #define TRACE_INCLUDE_FILE mtu3_trace
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) #include <trace/define_trace.h>