iwl-devtrace-io.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2 of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17. *
  18. * The full GNU General Public License is included in this distribution in the
  19. * file called LICENSE.
  20. *
  21. * Contact Information:
  22. * Intel Linux Wireless <ilw@linux.intel.com>
  23. * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  24. *
  25. *****************************************************************************/
  26. #if !defined(__IWLWIFI_DEVICE_TRACE_IO) || defined(TRACE_HEADER_MULTI_READ)
  27. #define __IWLWIFI_DEVICE_TRACE_IO
  28. #include <linux/tracepoint.h>
  29. #undef TRACE_SYSTEM
  30. #define TRACE_SYSTEM iwlwifi_io
  31. TRACE_EVENT(iwlwifi_dev_ioread32,
  32. TP_PROTO(const struct device *dev, u32 offs, u32 val),
  33. TP_ARGS(dev, offs, val),
  34. TP_STRUCT__entry(
  35. DEV_ENTRY
  36. __field(u32, offs)
  37. __field(u32, val)
  38. ),
  39. TP_fast_assign(
  40. DEV_ASSIGN;
  41. __entry->offs = offs;
  42. __entry->val = val;
  43. ),
  44. TP_printk("[%s] read io[%#x] = %#x",
  45. __get_str(dev), __entry->offs, __entry->val)
  46. );
  47. TRACE_EVENT(iwlwifi_dev_iowrite8,
  48. TP_PROTO(const struct device *dev, u32 offs, u8 val),
  49. TP_ARGS(dev, offs, val),
  50. TP_STRUCT__entry(
  51. DEV_ENTRY
  52. __field(u32, offs)
  53. __field(u8, val)
  54. ),
  55. TP_fast_assign(
  56. DEV_ASSIGN;
  57. __entry->offs = offs;
  58. __entry->val = val;
  59. ),
  60. TP_printk("[%s] write io[%#x] = %#x)",
  61. __get_str(dev), __entry->offs, __entry->val)
  62. );
  63. TRACE_EVENT(iwlwifi_dev_iowrite32,
  64. TP_PROTO(const struct device *dev, u32 offs, u32 val),
  65. TP_ARGS(dev, offs, val),
  66. TP_STRUCT__entry(
  67. DEV_ENTRY
  68. __field(u32, offs)
  69. __field(u32, val)
  70. ),
  71. TP_fast_assign(
  72. DEV_ASSIGN;
  73. __entry->offs = offs;
  74. __entry->val = val;
  75. ),
  76. TP_printk("[%s] write io[%#x] = %#x)",
  77. __get_str(dev), __entry->offs, __entry->val)
  78. );
  79. TRACE_EVENT(iwlwifi_dev_iowrite_prph32,
  80. TP_PROTO(const struct device *dev, u32 offs, u32 val),
  81. TP_ARGS(dev, offs, val),
  82. TP_STRUCT__entry(
  83. DEV_ENTRY
  84. __field(u32, offs)
  85. __field(u32, val)
  86. ),
  87. TP_fast_assign(
  88. DEV_ASSIGN;
  89. __entry->offs = offs;
  90. __entry->val = val;
  91. ),
  92. TP_printk("[%s] write PRPH[%#x] = %#x)",
  93. __get_str(dev), __entry->offs, __entry->val)
  94. );
  95. TRACE_EVENT(iwlwifi_dev_ioread_prph32,
  96. TP_PROTO(const struct device *dev, u32 offs, u32 val),
  97. TP_ARGS(dev, offs, val),
  98. TP_STRUCT__entry(
  99. DEV_ENTRY
  100. __field(u32, offs)
  101. __field(u32, val)
  102. ),
  103. TP_fast_assign(
  104. DEV_ASSIGN;
  105. __entry->offs = offs;
  106. __entry->val = val;
  107. ),
  108. TP_printk("[%s] read PRPH[%#x] = %#x",
  109. __get_str(dev), __entry->offs, __entry->val)
  110. );
  111. TRACE_EVENT(iwlwifi_dev_irq,
  112. TP_PROTO(const struct device *dev),
  113. TP_ARGS(dev),
  114. TP_STRUCT__entry(
  115. DEV_ENTRY
  116. ),
  117. TP_fast_assign(
  118. DEV_ASSIGN;
  119. ),
  120. /* TP_printk("") doesn't compile */
  121. TP_printk("%d", 0)
  122. );
  123. TRACE_EVENT(iwlwifi_dev_ict_read,
  124. TP_PROTO(const struct device *dev, u32 index, u32 value),
  125. TP_ARGS(dev, index, value),
  126. TP_STRUCT__entry(
  127. DEV_ENTRY
  128. __field(u32, index)
  129. __field(u32, value)
  130. ),
  131. TP_fast_assign(
  132. DEV_ASSIGN;
  133. __entry->index = index;
  134. __entry->value = value;
  135. ),
  136. TP_printk("[%s] read ict[%d] = %#.8x",
  137. __get_str(dev), __entry->index, __entry->value)
  138. );
  139. #endif /* __IWLWIFI_DEVICE_TRACE_IO */
  140. #undef TRACE_INCLUDE_PATH
  141. #define TRACE_INCLUDE_PATH .
  142. #undef TRACE_INCLUDE_FILE
  143. #define TRACE_INCLUDE_FILE iwl-devtrace-io
  144. #include <trace/define_trace.h>