cvmx-led-defs.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. /***********************license start***************
  2. * Author: Cavium Networks
  3. *
  4. * Contact: [email protected]
  5. * This file is part of the OCTEON SDK
  6. *
  7. * Copyright (c) 2003-2012 Cavium Networks
  8. *
  9. * This file is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License, Version 2, as
  11. * published by the Free Software Foundation.
  12. *
  13. * This file is distributed in the hope that it will be useful, but
  14. * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
  15. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
  16. * NONINFRINGEMENT. See the GNU General Public License for more
  17. * details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this file; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  22. * or visit http://www.gnu.org/licenses/.
  23. *
  24. * This file may also be available under a different license from Cavium.
  25. * Contact Cavium Networks for more information
  26. ***********************license end**************************************/
  27. #ifndef __CVMX_LED_DEFS_H__
  28. #define __CVMX_LED_DEFS_H__
  29. #define CVMX_LED_BLINK (CVMX_ADD_IO_SEG(0x0001180000001A48ull))
  30. #define CVMX_LED_CLK_PHASE (CVMX_ADD_IO_SEG(0x0001180000001A08ull))
  31. #define CVMX_LED_CYLON (CVMX_ADD_IO_SEG(0x0001180000001AF8ull))
  32. #define CVMX_LED_DBG (CVMX_ADD_IO_SEG(0x0001180000001A18ull))
  33. #define CVMX_LED_EN (CVMX_ADD_IO_SEG(0x0001180000001A00ull))
  34. #define CVMX_LED_POLARITY (CVMX_ADD_IO_SEG(0x0001180000001A50ull))
  35. #define CVMX_LED_PRT (CVMX_ADD_IO_SEG(0x0001180000001A10ull))
  36. #define CVMX_LED_PRT_FMT (CVMX_ADD_IO_SEG(0x0001180000001A30ull))
  37. #define CVMX_LED_PRT_STATUSX(offset) (CVMX_ADD_IO_SEG(0x0001180000001A80ull) + ((offset) & 7) * 8)
  38. #define CVMX_LED_UDD_CNTX(offset) (CVMX_ADD_IO_SEG(0x0001180000001A20ull) + ((offset) & 1) * 8)
  39. #define CVMX_LED_UDD_DATX(offset) (CVMX_ADD_IO_SEG(0x0001180000001A38ull) + ((offset) & 1) * 8)
  40. #define CVMX_LED_UDD_DAT_CLRX(offset) (CVMX_ADD_IO_SEG(0x0001180000001AC8ull) + ((offset) & 1) * 16)
  41. #define CVMX_LED_UDD_DAT_SETX(offset) (CVMX_ADD_IO_SEG(0x0001180000001AC0ull) + ((offset) & 1) * 16)
  42. union cvmx_led_blink {
  43. uint64_t u64;
  44. struct cvmx_led_blink_s {
  45. #ifdef __BIG_ENDIAN_BITFIELD
  46. uint64_t reserved_8_63:56;
  47. uint64_t rate:8;
  48. #else
  49. uint64_t rate:8;
  50. uint64_t reserved_8_63:56;
  51. #endif
  52. } s;
  53. };
  54. union cvmx_led_clk_phase {
  55. uint64_t u64;
  56. struct cvmx_led_clk_phase_s {
  57. #ifdef __BIG_ENDIAN_BITFIELD
  58. uint64_t reserved_7_63:57;
  59. uint64_t phase:7;
  60. #else
  61. uint64_t phase:7;
  62. uint64_t reserved_7_63:57;
  63. #endif
  64. } s;
  65. };
  66. union cvmx_led_cylon {
  67. uint64_t u64;
  68. struct cvmx_led_cylon_s {
  69. #ifdef __BIG_ENDIAN_BITFIELD
  70. uint64_t reserved_16_63:48;
  71. uint64_t rate:16;
  72. #else
  73. uint64_t rate:16;
  74. uint64_t reserved_16_63:48;
  75. #endif
  76. } s;
  77. };
  78. union cvmx_led_dbg {
  79. uint64_t u64;
  80. struct cvmx_led_dbg_s {
  81. #ifdef __BIG_ENDIAN_BITFIELD
  82. uint64_t reserved_1_63:63;
  83. uint64_t dbg_en:1;
  84. #else
  85. uint64_t dbg_en:1;
  86. uint64_t reserved_1_63:63;
  87. #endif
  88. } s;
  89. };
  90. union cvmx_led_en {
  91. uint64_t u64;
  92. struct cvmx_led_en_s {
  93. #ifdef __BIG_ENDIAN_BITFIELD
  94. uint64_t reserved_1_63:63;
  95. uint64_t en:1;
  96. #else
  97. uint64_t en:1;
  98. uint64_t reserved_1_63:63;
  99. #endif
  100. } s;
  101. };
  102. union cvmx_led_polarity {
  103. uint64_t u64;
  104. struct cvmx_led_polarity_s {
  105. #ifdef __BIG_ENDIAN_BITFIELD
  106. uint64_t reserved_1_63:63;
  107. uint64_t polarity:1;
  108. #else
  109. uint64_t polarity:1;
  110. uint64_t reserved_1_63:63;
  111. #endif
  112. } s;
  113. };
  114. union cvmx_led_prt {
  115. uint64_t u64;
  116. struct cvmx_led_prt_s {
  117. #ifdef __BIG_ENDIAN_BITFIELD
  118. uint64_t reserved_8_63:56;
  119. uint64_t prt_en:8;
  120. #else
  121. uint64_t prt_en:8;
  122. uint64_t reserved_8_63:56;
  123. #endif
  124. } s;
  125. };
  126. union cvmx_led_prt_fmt {
  127. uint64_t u64;
  128. struct cvmx_led_prt_fmt_s {
  129. #ifdef __BIG_ENDIAN_BITFIELD
  130. uint64_t reserved_4_63:60;
  131. uint64_t format:4;
  132. #else
  133. uint64_t format:4;
  134. uint64_t reserved_4_63:60;
  135. #endif
  136. } s;
  137. };
  138. union cvmx_led_prt_statusx {
  139. uint64_t u64;
  140. struct cvmx_led_prt_statusx_s {
  141. #ifdef __BIG_ENDIAN_BITFIELD
  142. uint64_t reserved_6_63:58;
  143. uint64_t status:6;
  144. #else
  145. uint64_t status:6;
  146. uint64_t reserved_6_63:58;
  147. #endif
  148. } s;
  149. };
  150. union cvmx_led_udd_cntx {
  151. uint64_t u64;
  152. struct cvmx_led_udd_cntx_s {
  153. #ifdef __BIG_ENDIAN_BITFIELD
  154. uint64_t reserved_6_63:58;
  155. uint64_t cnt:6;
  156. #else
  157. uint64_t cnt:6;
  158. uint64_t reserved_6_63:58;
  159. #endif
  160. } s;
  161. };
  162. union cvmx_led_udd_datx {
  163. uint64_t u64;
  164. struct cvmx_led_udd_datx_s {
  165. #ifdef __BIG_ENDIAN_BITFIELD
  166. uint64_t reserved_32_63:32;
  167. uint64_t dat:32;
  168. #else
  169. uint64_t dat:32;
  170. uint64_t reserved_32_63:32;
  171. #endif
  172. } s;
  173. };
  174. union cvmx_led_udd_dat_clrx {
  175. uint64_t u64;
  176. struct cvmx_led_udd_dat_clrx_s {
  177. #ifdef __BIG_ENDIAN_BITFIELD
  178. uint64_t reserved_32_63:32;
  179. uint64_t clr:32;
  180. #else
  181. uint64_t clr:32;
  182. uint64_t reserved_32_63:32;
  183. #endif
  184. } s;
  185. };
  186. union cvmx_led_udd_dat_setx {
  187. uint64_t u64;
  188. struct cvmx_led_udd_dat_setx_s {
  189. #ifdef __BIG_ENDIAN_BITFIELD
  190. uint64_t reserved_32_63:32;
  191. uint64_t set:32;
  192. #else
  193. uint64_t set:32;
  194. uint64_t reserved_32_63:32;
  195. #endif
  196. } s;
  197. };
  198. #endif