gth.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Intel(R) Trace Hub Global Trace Hub (GTH) data structures
  4. *
  5. * Copyright (C) 2014-2015 Intel Corporation.
  6. */
  7. #ifndef __INTEL_TH_GTH_H__
  8. #define __INTEL_TH_GTH_H__
  9. /* Map output port parameter bits to symbolic names */
  10. #define TH_OUTPUT_PARM(name) \
  11. TH_OUTPUT_ ## name
  12. enum intel_th_output_parm {
  13. /* output port type */
  14. TH_OUTPUT_PARM(port),
  15. /* generate NULL packet */
  16. TH_OUTPUT_PARM(null),
  17. /* packet drop */
  18. TH_OUTPUT_PARM(drop),
  19. /* port in reset state */
  20. TH_OUTPUT_PARM(reset),
  21. /* flush out data */
  22. TH_OUTPUT_PARM(flush),
  23. /* mainenance packet frequency */
  24. TH_OUTPUT_PARM(smcfreq),
  25. };
  26. /*
  27. * Register offsets
  28. */
  29. enum {
  30. REG_GTH_GTHOPT0 = 0x00, /* Output ports 0..3 config */
  31. REG_GTH_GTHOPT1 = 0x04, /* Output ports 4..7 config */
  32. REG_GTH_SWDEST0 = 0x08, /* Switching destination masters 0..7 */
  33. REG_GTH_GSWTDEST = 0x88, /* Global sw trace destination */
  34. REG_GTH_SMCR0 = 0x9c, /* STP mainenance for ports 0/1 */
  35. REG_GTH_SMCR1 = 0xa0, /* STP mainenance for ports 2/3 */
  36. REG_GTH_SMCR2 = 0xa4, /* STP mainenance for ports 4/5 */
  37. REG_GTH_SMCR3 = 0xa8, /* STP mainenance for ports 6/7 */
  38. REG_GTH_SCR = 0xc8, /* Source control (storeEn override) */
  39. REG_GTH_STAT = 0xd4, /* GTH status */
  40. REG_GTH_SCR2 = 0xd8, /* Source control (force storeEn off) */
  41. REG_GTH_DESTOVR = 0xdc, /* Destination override */
  42. REG_GTH_SCRPD0 = 0xe0, /* ScratchPad[0] */
  43. REG_GTH_SCRPD1 = 0xe4, /* ScratchPad[1] */
  44. REG_GTH_SCRPD2 = 0xe8, /* ScratchPad[2] */
  45. REG_GTH_SCRPD3 = 0xec, /* ScratchPad[3] */
  46. REG_TSCU_TSUCTRL = 0x2000, /* TSCU control register */
  47. REG_TSCU_TSCUSTAT = 0x2004, /* TSCU status register */
  48. };
  49. /* waiting for Pipeline Empty bit(s) to assert for GTH */
  50. #define GTH_PLE_WAITLOOP_DEPTH 10000
  51. #define TSUCTRL_CTCRESYNC BIT(0)
  52. #define TSCUSTAT_CTCSYNCING BIT(1)
  53. #endif /* __INTEL_TH_GTH_H__ */