trio_pcie_rc.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. /*
  2. * Copyright 2012 Tilera Corporation. All Rights Reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation, version 2.
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  11. * NON INFRINGEMENT. See the GNU General Public License for
  12. * more details.
  13. */
  14. /* Machine-generated file; do not edit. */
  15. #ifndef __ARCH_TRIO_PCIE_RC_H__
  16. #define __ARCH_TRIO_PCIE_RC_H__
  17. #include <arch/abi.h>
  18. #include <arch/trio_pcie_rc_def.h>
  19. #ifndef __ASSEMBLER__
  20. /* Device Capabilities Register. */
  21. __extension__
  22. typedef union
  23. {
  24. struct
  25. {
  26. #ifndef __BIG_ENDIAN__
  27. /*
  28. * Max_Payload_Size Supported, writablethrough the MAC_STANDARD interface
  29. */
  30. uint_reg_t mps_sup : 3;
  31. /*
  32. * This field is writable through the MAC_STANDARD interface. However,
  33. * Phantom Function is not supported. Therefore, the application must
  34. * not write any value other than 0x0 to this field.
  35. */
  36. uint_reg_t phantom_function_supported : 2;
  37. /* This bit is writable through the MAC_STANDARD interface. */
  38. uint_reg_t ext_tag_field_supported : 1;
  39. /* Reserved. */
  40. uint_reg_t __reserved_0 : 3;
  41. /* Endpoint L1 Acceptable Latency Must be 0x0 for non-Endpoint devices. */
  42. uint_reg_t l1_lat : 3;
  43. /*
  44. * Undefined since PCI Express 1.1 (Was Attention Button Present for PCI
  45. * Express 1.0a)
  46. */
  47. uint_reg_t r1 : 1;
  48. /*
  49. * Undefined since PCI Express 1.1 (Was Attention Indicator Present for
  50. * PCI Express 1.0a)
  51. */
  52. uint_reg_t r2 : 1;
  53. /*
  54. * Undefined since PCI Express 1.1 (Was Power Indicator Present for PCI
  55. * Express 1.0a)
  56. */
  57. uint_reg_t r3 : 1;
  58. /*
  59. * Role-Based Error Reporting, writable through the MAC_STANDARD
  60. * interface. Required to be set for device compliant to 1.1 spec and
  61. * later.
  62. */
  63. uint_reg_t rer : 1;
  64. /* Reserved. */
  65. uint_reg_t __reserved_1 : 2;
  66. /* Captured Slot Power Limit Value Upstream port only. */
  67. uint_reg_t slot_pwr_lim : 8;
  68. /* Captured Slot Power Limit Scale Upstream port only. */
  69. uint_reg_t slot_pwr_scale : 2;
  70. /* Reserved. */
  71. uint_reg_t __reserved_2 : 4;
  72. /* Endpoint L0s Acceptable LatencyMust be 0x0 for non-Endpoint devices. */
  73. uint_reg_t l0s_lat : 1;
  74. /* Reserved. */
  75. uint_reg_t __reserved_3 : 31;
  76. #else /* __BIG_ENDIAN__ */
  77. uint_reg_t __reserved_3 : 31;
  78. uint_reg_t l0s_lat : 1;
  79. uint_reg_t __reserved_2 : 4;
  80. uint_reg_t slot_pwr_scale : 2;
  81. uint_reg_t slot_pwr_lim : 8;
  82. uint_reg_t __reserved_1 : 2;
  83. uint_reg_t rer : 1;
  84. uint_reg_t r3 : 1;
  85. uint_reg_t r2 : 1;
  86. uint_reg_t r1 : 1;
  87. uint_reg_t l1_lat : 3;
  88. uint_reg_t __reserved_0 : 3;
  89. uint_reg_t ext_tag_field_supported : 1;
  90. uint_reg_t phantom_function_supported : 2;
  91. uint_reg_t mps_sup : 3;
  92. #endif
  93. };
  94. uint_reg_t word;
  95. } TRIO_PCIE_RC_DEVICE_CAP_t;
  96. /* Device Control Register. */
  97. __extension__
  98. typedef union
  99. {
  100. struct
  101. {
  102. #ifndef __BIG_ENDIAN__
  103. /* Correctable Error Reporting Enable */
  104. uint_reg_t cor_err_ena : 1;
  105. /* Non-Fatal Error Reporting Enable */
  106. uint_reg_t nf_err_ena : 1;
  107. /* Fatal Error Reporting Enable */
  108. uint_reg_t fatal_err_ena : 1;
  109. /* Unsupported Request Reporting Enable */
  110. uint_reg_t ur_ena : 1;
  111. /* Relaxed orderring enable */
  112. uint_reg_t ro_ena : 1;
  113. /* Max Payload Size */
  114. uint_reg_t max_payload_size : 3;
  115. /* Extended Tag Field Enable */
  116. uint_reg_t ext_tag : 1;
  117. /* Phantom Function Enable */
  118. uint_reg_t ph_fn_ena : 1;
  119. /* AUX Power PM Enable */
  120. uint_reg_t aux_pm_ena : 1;
  121. /* Enable NoSnoop */
  122. uint_reg_t no_snoop : 1;
  123. /* Max read request size */
  124. uint_reg_t max_read_req_sz : 3;
  125. /* Reserved. */
  126. uint_reg_t __reserved : 49;
  127. #else /* __BIG_ENDIAN__ */
  128. uint_reg_t __reserved : 49;
  129. uint_reg_t max_read_req_sz : 3;
  130. uint_reg_t no_snoop : 1;
  131. uint_reg_t aux_pm_ena : 1;
  132. uint_reg_t ph_fn_ena : 1;
  133. uint_reg_t ext_tag : 1;
  134. uint_reg_t max_payload_size : 3;
  135. uint_reg_t ro_ena : 1;
  136. uint_reg_t ur_ena : 1;
  137. uint_reg_t fatal_err_ena : 1;
  138. uint_reg_t nf_err_ena : 1;
  139. uint_reg_t cor_err_ena : 1;
  140. #endif
  141. };
  142. uint_reg_t word;
  143. } TRIO_PCIE_RC_DEVICE_CONTROL_t;
  144. #endif /* !defined(__ASSEMBLER__) */
  145. #endif /* !defined(__ARCH_TRIO_PCIE_RC_H__) */