z180_trace.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* Copyright (c) 2011, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. */
  13. #if !defined(_Z180_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
  14. #define _Z180_TRACE_H
  15. #undef TRACE_SYSTEM
  16. #define TRACE_SYSTEM kgsl
  17. #undef TRACE_INCLUDE_PATH
  18. #define TRACE_INCLUDE_PATH .
  19. #undef TRACE_INCLUDE_FILE
  20. #define TRACE_INCLUDE_FILE z180_trace
  21. #include <linux/tracepoint.h>
  22. struct kgsl_device;
  23. /*
  24. * Tracepoint for z180 irq. Includes status info
  25. */
  26. TRACE_EVENT(kgsl_z180_irq_status,
  27. TP_PROTO(struct kgsl_device *device, unsigned int status),
  28. TP_ARGS(device, status),
  29. TP_STRUCT__entry(
  30. __string(device_name, device->name)
  31. __field(unsigned int, status)
  32. ),
  33. TP_fast_assign(
  34. __assign_str(device_name, device->name);
  35. __entry->status = status;
  36. ),
  37. TP_printk(
  38. "d_name=%s status=%s",
  39. __get_str(device_name),
  40. __entry->status ? __print_flags(__entry->status, "|",
  41. { REG_VGC_IRQSTATUS__MH_MASK, "MH" },
  42. { REG_VGC_IRQSTATUS__G2D_MASK, "G2D" },
  43. { REG_VGC_IRQSTATUS__FIFO_MASK, "FIFO" }) : "None"
  44. )
  45. );
  46. #endif /* _Z180_TRACE_H */
  47. /* This part must be outside protection */
  48. #include <trace/define_trace.h>