/** * trace.h - DesignWare USB3 DRD Controller Trace Support * * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com * * Author: Felipe Balbi * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 of * the License as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #undef TRACE_SYSTEM #define TRACE_SYSTEM dwc3 #if !defined(__DWC3_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) #define __DWC3_TRACE_H #include #include #include #include "core.h" #include "debug.h" DECLARE_EVENT_CLASS(dwc3_log_msg, TP_PROTO(struct va_format *vaf), TP_ARGS(vaf), TP_STRUCT__entry(__dynamic_array(char, msg, DWC3_MSG_MAX)), TP_fast_assign( vsnprintf(__get_str(msg), DWC3_MSG_MAX, vaf->fmt, *vaf->va); ), TP_printk("%s", __get_str(msg)) ); DEFINE_EVENT(dwc3_log_msg, dwc3_gadget, TP_PROTO(struct va_format *vaf), TP_ARGS(vaf) ); DEFINE_EVENT(dwc3_log_msg, dwc3_core, TP_PROTO(struct va_format *vaf), TP_ARGS(vaf) ); DEFINE_EVENT(dwc3_log_msg, dwc3_ep0, TP_PROTO(struct va_format *vaf), TP_ARGS(vaf) ); DECLARE_EVENT_CLASS(dwc3_log_io, TP_PROTO(void *base, u32 offset, u32 value), TP_ARGS(base, offset, value), TP_STRUCT__entry( __field(void *, base) __field(u32, offset) __field(u32, value) ), TP_fast_assign( __entry->base = base; __entry->offset = offset; __entry->value = value; ), TP_printk("addr %p value %08x", __entry->base + __entry->offset, __entry->value) ); DEFINE_EVENT(dwc3_log_io, dwc3_readl, TP_PROTO(void *base, u32 offset, u32 value), TP_ARGS(base, offset, value) ); DEFINE_EVENT(dwc3_log_io, dwc3_writel, TP_PROTO(void *base, u32 offset, u32 value), TP_ARGS(base, offset, value) ); DECLARE_EVENT_CLASS(dwc3_log_event, TP_PROTO(u32 event, struct dwc3 *dwc), TP_ARGS(event, dwc), TP_STRUCT__entry( __field(u32, event) __field(u32, ep0state) ), TP_fast_assign( __entry->event = event; __entry->ep0state = dwc->ep0state; ), TP_printk("event (%08x): %s", __entry->event, dwc3_decode_event(__entry->event, __entry->ep0state)) ); DEFINE_EVENT(dwc3_log_event, dwc3_event, TP_PROTO(u32 event, struct dwc3 *dwc), TP_ARGS(event, dwc) ); DECLARE_EVENT_CLASS(dwc3_log_ctrl, TP_PROTO(struct usb_ctrlrequest *ctrl), TP_ARGS(ctrl), TP_STRUCT__entry( __field(__u8, bRequestType) __field(__u8, bRequest) __field(__u16, wValue) __field(__u16, wIndex) __field(__u16, wLength) ), TP_fast_assign( __entry->bRequestType = ctrl->bRequestType; __entry->bRequest = ctrl->bRequest; __entry->wValue = le16_to_cpu(ctrl->wValue); __entry->wIndex = le16_to_cpu(ctrl->wIndex); __entry->wLength = le16_to_cpu(ctrl->wLength); ), TP_printk("bRequestType %02x bRequest %02x wValue %04x wIndex %04x wLength %d", __entry->bRequestType, __entry->bRequest, __entry->wValue, __entry->wIndex, __entry->wLength ) ); DEFINE_EVENT(dwc3_log_ctrl, dwc3_ctrl_req, TP_PROTO(struct usb_ctrlrequest *ctrl), TP_ARGS(ctrl) ); DECLARE_EVENT_CLASS(dwc3_log_request, TP_PROTO(struct dwc3_request *req), TP_ARGS(req), TP_STRUCT__entry( __dynamic_array(char, name, DWC3_MSG_MAX) __field(struct dwc3_request *, req) __field(unsigned, actual) __field(unsigned, length) __field(int, status) __field(int, zero) __field(int, short_not_ok) __field(int, no_interrupt) ), TP_fast_assign( snprintf(__get_str(name), DWC3_MSG_MAX, "%s", req->dep->name); __entry->req = req; __entry->actual = req->request.actual; __entry->length = req->request.length; __entry->status = req->request.status; __entry->zero = req->request.zero; __entry->short_not_ok = req->request.short_not_ok; __entry->no_interrupt = req->request.no_interrupt; ), TP_printk("%s: req %p length %u/%u %s%s%s ==> %d", __get_str(name), __entry->req, __entry->actual, __entry->length, __entry->zero ? "Z" : "z", __entry->short_not_ok ? "S" : "s", __entry->no_interrupt ? "i" : "I", __entry->status ) ); DEFINE_EVENT(dwc3_log_request, dwc3_alloc_request, TP_PROTO(struct dwc3_request *req), TP_ARGS(req) ); DEFINE_EVENT(dwc3_log_request, dwc3_free_request, TP_PROTO(struct dwc3_request *req), TP_ARGS(req) ); DEFINE_EVENT(dwc3_log_request, dwc3_ep_queue, TP_PROTO(struct dwc3_request *req), TP_ARGS(req) ); DEFINE_EVENT(dwc3_log_request, dwc3_ep_dequeue, TP_PROTO(struct dwc3_request *req), TP_ARGS(req) ); DEFINE_EVENT(dwc3_log_request, dwc3_gadget_giveback, TP_PROTO(struct dwc3_request *req), TP_ARGS(req) ); DECLARE_EVENT_CLASS(dwc3_log_generic_cmd, TP_PROTO(unsigned int cmd, u32 param, int status), TP_ARGS(cmd, param, status), TP_STRUCT__entry( __field(unsigned int, cmd) __field(u32, param) __field(int, status) ), TP_fast_assign( __entry->cmd = cmd; __entry->param = param; __entry->status = status; ), TP_printk("cmd '%s' [%d] param %08x --> status: %s", dwc3_gadget_generic_cmd_string(__entry->cmd), __entry->cmd, __entry->param, dwc3_gadget_generic_cmd_status_string(__entry->status) ) ); DEFINE_EVENT(dwc3_log_generic_cmd, dwc3_gadget_generic_cmd, TP_PROTO(unsigned int cmd, u32 param, int status), TP_ARGS(cmd, param, status) ); DECLARE_EVENT_CLASS(dwc3_log_gadget_ep_cmd, TP_PROTO(struct dwc3_ep *dep, unsigned int cmd, struct dwc3_gadget_ep_cmd_params *params, int cmd_status), TP_ARGS(dep, cmd, params, cmd_status), TP_STRUCT__entry( __dynamic_array(char, name, DWC3_MSG_MAX) __field(unsigned int, cmd) __field(u32, param0) __field(u32, param1) __field(u32, param2) __field(int, cmd_status) ), TP_fast_assign( snprintf(__get_str(name), DWC3_MSG_MAX, "%s", dep->name); __entry->cmd = cmd; __entry->param0 = params->param0; __entry->param1 = params->param1; __entry->param2 = params->param2; __entry->cmd_status = cmd_status; ), TP_printk("%s: cmd '%s' [%d] params %08x %08x %08x --> status: %s", __get_str(name), dwc3_gadget_ep_cmd_string(__entry->cmd), __entry->cmd, __entry->param0, __entry->param1, __entry->param2, dwc3_ep_cmd_status_string(__entry->cmd_status) ) ); DEFINE_EVENT(dwc3_log_gadget_ep_cmd, dwc3_gadget_ep_cmd, TP_PROTO(struct dwc3_ep *dep, unsigned int cmd, struct dwc3_gadget_ep_cmd_params *params, int cmd_status), TP_ARGS(dep, cmd, params, cmd_status) ); DECLARE_EVENT_CLASS(dwc3_log_trb, TP_PROTO(struct dwc3_ep *dep, struct dwc3_trb *trb), TP_ARGS(dep, trb), TP_STRUCT__entry( __dynamic_array(char, name, DWC3_MSG_MAX) __field(struct dwc3_trb *, trb) __field(u32, allocated) __field(u32, queued) __field(u32, bpl) __field(u32, bph) __field(u32, size) __field(u32, ctrl) __field(u32, type) ), TP_fast_assign( snprintf(__get_str(name), DWC3_MSG_MAX, "%s", dep->name); __entry->trb = trb; __entry->allocated = dep->allocated_requests; __entry->queued = dep->queued_requests; __entry->bpl = trb->bpl; __entry->bph = trb->bph; __entry->size = trb->size; __entry->ctrl = trb->ctrl; __entry->type = usb_endpoint_type(dep->endpoint.desc); ), TP_printk("%s: %d/%d trb %p buf %08x%08x size %s%d ctrl %08x (%c%c%c%c:%c%c:%s)", __get_str(name), __entry->queued, __entry->allocated, __entry->trb, __entry->bph, __entry->bpl, ({char *s; int pcm = ((__entry->size >> 24) & 3) + 1; switch (__entry->type) { case USB_ENDPOINT_XFER_INT: case USB_ENDPOINT_XFER_ISOC: switch (pcm) { case 1: s = "1x "; break; case 2: s = "2x "; break; case 3: s = "3x "; break; } default: s = ""; } s; }), DWC3_TRB_SIZE_LENGTH(__entry->size), __entry->ctrl, __entry->ctrl & DWC3_TRB_CTRL_HWO ? 'H' : 'h', __entry->ctrl & DWC3_TRB_CTRL_LST ? 'L' : 'l', __entry->ctrl & DWC3_TRB_CTRL_CHN ? 'C' : 'c', __entry->ctrl & DWC3_TRB_CTRL_CSP ? 'S' : 's', __entry->ctrl & DWC3_TRB_CTRL_ISP_IMI ? 'S' : 's', __entry->ctrl & DWC3_TRB_CTRL_IOC ? 'C' : 'c', ({char *s; switch (__entry->ctrl & 0x3f0) { case DWC3_TRBCTL_NORMAL: s = "normal"; break; case DWC3_TRBCTL_CONTROL_SETUP: s = "setup"; break; case DWC3_TRBCTL_CONTROL_STATUS2: s = "status2"; break; case DWC3_TRBCTL_CONTROL_STATUS3: s = "status3"; break; case DWC3_TRBCTL_CONTROL_DATA: s = "data"; break; case DWC3_TRBCTL_ISOCHRONOUS_FIRST: s = "isoc-first"; break; case DWC3_TRBCTL_ISOCHRONOUS: s = "isoc"; break; case DWC3_TRBCTL_LINK_TRB: s = "link"; break; default: s = "UNKNOWN"; break; } s; }) ) ); DEFINE_EVENT(dwc3_log_trb, dwc3_prepare_trb, TP_PROTO(struct dwc3_ep *dep, struct dwc3_trb *trb), TP_ARGS(dep, trb) ); DEFINE_EVENT(dwc3_log_trb, dwc3_complete_trb, TP_PROTO(struct dwc3_ep *dep, struct dwc3_trb *trb), TP_ARGS(dep, trb) ); DECLARE_EVENT_CLASS(dwc3_log_ep, TP_PROTO(struct dwc3_ep *dep), TP_ARGS(dep), TP_STRUCT__entry( __dynamic_array(char, name, DWC3_MSG_MAX) __field(unsigned, maxpacket) __field(unsigned, maxpacket_limit) __field(unsigned, max_streams) __field(unsigned, maxburst) __field(unsigned, flags) __field(unsigned, direction) __field(u8, trb_enqueue) __field(u8, trb_dequeue) ), TP_fast_assign( snprintf(__get_str(name), DWC3_MSG_MAX, "%s", dep->name); __entry->maxpacket = dep->endpoint.maxpacket; __entry->maxpacket_limit = dep->endpoint.maxpacket_limit; __entry->max_streams = dep->endpoint.max_streams; __entry->maxburst = dep->endpoint.maxburst; __entry->flags = dep->flags; __entry->direction = dep->direction; __entry->trb_enqueue = dep->trb_enqueue; __entry->trb_dequeue = dep->trb_dequeue; ), TP_printk("%s: mps %d/%d streams %d burst %d ring %d/%d flags %c:%c%c%c%c%c:%c:%c", __get_str(name), __entry->maxpacket, __entry->maxpacket_limit, __entry->max_streams, __entry->maxburst, __entry->trb_enqueue, __entry->trb_dequeue, __entry->flags & DWC3_EP_ENABLED ? 'E' : 'e', __entry->flags & DWC3_EP_STALL ? 'S' : 's', __entry->flags & DWC3_EP_WEDGE ? 'W' : 'w', __entry->flags & DWC3_EP_BUSY ? 'B' : 'b', __entry->flags & DWC3_EP_PENDING_REQUEST ? 'P' : 'p', __entry->flags & DWC3_EP_MISSED_ISOC ? 'M' : 'm', __entry->flags & DWC3_EP_END_TRANSFER_PENDING ? 'E' : 'e', __entry->direction ? '<' : '>' ) ); DEFINE_EVENT(dwc3_log_ep, dwc3_gadget_ep_enable, TP_PROTO(struct dwc3_ep *dep), TP_ARGS(dep) ); DEFINE_EVENT(dwc3_log_ep, dwc3_gadget_ep_disable, TP_PROTO(struct dwc3_ep *dep), TP_ARGS(dep) ); #endif /* __DWC3_TRACE_H */ /* this part has to be here */ #undef TRACE_INCLUDE_PATH #define TRACE_INCLUDE_PATH . #undef TRACE_INCLUDE_FILE #define TRACE_INCLUDE_FILE trace #include t.cgi/linux/net-next.git/log/include/dt-bindings/clock/berlin2.h?h=nds-private-remove&id=b876b9aaadce9c6bb47508c4b31efc474b70f179'>logplain -rw-r--r--berlin2q.h695logplain -rw-r--r--clps711x-clock.h718logplain -rw-r--r--efm32-cmu.h1112logplain -rw-r--r--exynos-audss-clk.h597logplain -rw-r--r--exynos3250.h9083logplain -rw-r--r--exynos4.h8284logplain -rw-r--r--exynos4415.h9828logplain -rw-r--r--exynos5250.h4616logplain -rw-r--r--exynos5260-clk.h14876logplain -rw-r--r--exynos5410.h1689logplain -rw-r--r--exynos5420.h6857logplain -rw-r--r--exynos5433.h45372logplain -rw-r--r--exynos5440.h1141logplain -rw-r--r--exynos7-clk.h5281logplain -rw-r--r--gxbb-aoclkc.h2866logplain -rw-r--r--gxbb-clkc.h592logplain -rw-r--r--hi3516cv300-clock.h1668logplain -rw-r--r--hi3519-clock.h1328logplain -rw-r--r--hi3620-clock.h4496logplain -rw-r--r--hi6220-clock.h4508logplain -rw-r--r--hip04-clock.h1137logplain -rw-r--r--histb-clock.h2012logplain -rw-r--r--hix5hd2-clock.h2415logplain -rw-r--r--imx1-clock.h1055logplain -rw-r--r--imx21-clock.h2461logplain -rw-r--r--imx27-clock.h3494logplain -rw-r--r--imx5-clock.h7212logplain -rw-r--r--imx6qdl-clock.h9593logplain -rw-r--r--imx6sl-clock.h5849logplain -rw-r--r--imx6sx-clock.h9099logplain -rw-r--r--imx6ul-clock.h8203logplain -rw-r--r--imx7d-clock.h15974logplain -rw-r--r--jz4740-cgu.h1028logplain -rw-r--r--jz4780-cgu.h2470logplain -rw-r--r--lpc18xx-ccu.h2134logplain -rw-r--r--lpc18xx-cgu.h1142logplain -rw-r--r--lpc32xx-clock.h1633logplain -rw-r--r--lsi,axm5516-clks.h974logplain -rw-r--r--marvell,mmp2.h2022logplain -rw-r--r--marvell,pxa168.h1654logplain -rw-r--r--marvell,pxa1928.h1535logplain -rw-r--r--marvell,pxa910.h1598logplain -rw-r--r--maxim,max77620.h632logplain -rw-r--r--maxim,max77686.h648logplain -rw-r--r--maxim,max77802.h630logplain -rw-r--r--meson8b-clkc.h523logplain -rw-r--r--microchip,pic32-clock.h1150logplain -rw-r--r--mpc512x-clock.h2236logplain -rw-r--r--mt2701-clk.h13832logplain -rw-r--r--mt8135-clk.h5641logplain -rw-r--r--mt8173-clk.h9293logplain -rw-r--r--oxsemi,ox810se.h1002logplain -rw-r--r--oxsemi,ox820.h1203logplain -rw-r--r--pistachio-clk.h4863logplain -rw-r--r--pxa-clock.h1715logplain -rw-r--r--qcom,gcc-apq8084.h12872logplain -rw-r--r--qcom,gcc-ipq4019.h5423logplain -rw-r--r--qcom,gcc-ipq806x.h8574logplain -rw-r--r--qcom,gcc-mdm9615.h9497logplain -rw-r--r--qcom,gcc-msm8660.h7932logplain -rw-r--r--qcom,gcc-msm8916.h6190logplain -rw-r--r--qcom,gcc-msm8960.h9342logplain -rw-r--r--qcom,gcc-msm8974.h12340logplain -rw-r--r--qcom,gcc-msm8994.h4858logplain -rw-r--r--qcom,gcc-msm8996.h12575logplain -rw-r--r--qcom,lcc-ipq806x.h899logplain -rw-r--r--qcom,lcc-mdm9615.h1701logplain -rw-r--r--qcom,lcc-msm8960.h1616logplain -rw-r--r--qcom,mmcc-apq8084.h5722logplain -rw-r--r--qcom,mmcc-msm8960.h4109logplain -rw-r--r--qcom,mmcc-msm8974.h5223logplain -rw-r--r--qcom,mmcc-msm8996.h9403logplain -rw-r--r--qcom,rpmcc.h2101logplain -rw-r--r--r7s72100-clock.h1218logplain -rw-r--r--r8a73a4-clock.h1596logplain -rw-r--r--r8a7740-clock.h1992logplain -rw-r--r--r8a7743-cpg-mssr.h1269logplain -rw-r--r--r8a7745-cpg-mssr.h1298logplain -rw-r--r--r8a7778-clock.h1855logplain -rw-r--r--r8a7779-clock.h1647logplain -rw-r--r--r8a7790-clock.h4367logplain -rw-r--r--r8a7791-clock.h4388logplain -rw-r--r--r8a7792-clock.h2562logplain -rw-r--r--r8a7793-clock.h4561logplain -rw-r--r--r8a7794-clock.h3679logplain -rw-r--r--r8a7795-cpg-mssr.h1890logplain -rw-r--r--r8a7796-cpg-mssr.h2066logplain -rw-r--r--renesas-cpg-mssr.h542logplain -rw-r--r--rk1108-cru.h6605logplain -rw-r--r--rk3036-cru.h4584logplain -rw-r--r--rk3066a-cru.h1068logplain -rw-r--r--rk3188-cru-common.h6105logplain -rw-r--r--rk3188-cru.h1435logplain