cvmx-smix-defs.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. /***********************license start***************
  2. * Author: Cavium Networks
  3. *
  4. * Contact: support@caviumnetworks.com
  5. * This file is part of the OCTEON SDK
  6. *
  7. * Copyright (c) 2003-2008 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_SMIX_DEFS_H__
  28. #define __CVMX_SMIX_DEFS_H__
  29. #define CVMX_SMIX_CLK(offset) \
  30. CVMX_ADD_IO_SEG(0x0001180000001818ull + (((offset) & 1) * 256))
  31. #define CVMX_SMIX_CMD(offset) \
  32. CVMX_ADD_IO_SEG(0x0001180000001800ull + (((offset) & 1) * 256))
  33. #define CVMX_SMIX_EN(offset) \
  34. CVMX_ADD_IO_SEG(0x0001180000001820ull + (((offset) & 1) * 256))
  35. #define CVMX_SMIX_RD_DAT(offset) \
  36. CVMX_ADD_IO_SEG(0x0001180000001810ull + (((offset) & 1) * 256))
  37. #define CVMX_SMIX_WR_DAT(offset) \
  38. CVMX_ADD_IO_SEG(0x0001180000001808ull + (((offset) & 1) * 256))
  39. union cvmx_smix_clk {
  40. uint64_t u64;
  41. struct cvmx_smix_clk_s {
  42. uint64_t reserved_25_63:39;
  43. uint64_t mode:1;
  44. uint64_t reserved_21_23:3;
  45. uint64_t sample_hi:5;
  46. uint64_t sample_mode:1;
  47. uint64_t reserved_14_14:1;
  48. uint64_t clk_idle:1;
  49. uint64_t preamble:1;
  50. uint64_t sample:4;
  51. uint64_t phase:8;
  52. } s;
  53. struct cvmx_smix_clk_cn30xx {
  54. uint64_t reserved_21_63:43;
  55. uint64_t sample_hi:5;
  56. uint64_t reserved_14_15:2;
  57. uint64_t clk_idle:1;
  58. uint64_t preamble:1;
  59. uint64_t sample:4;
  60. uint64_t phase:8;
  61. } cn30xx;
  62. struct cvmx_smix_clk_cn30xx cn31xx;
  63. struct cvmx_smix_clk_cn30xx cn38xx;
  64. struct cvmx_smix_clk_cn30xx cn38xxp2;
  65. struct cvmx_smix_clk_cn50xx {
  66. uint64_t reserved_25_63:39;
  67. uint64_t mode:1;
  68. uint64_t reserved_21_23:3;
  69. uint64_t sample_hi:5;
  70. uint64_t reserved_14_15:2;
  71. uint64_t clk_idle:1;
  72. uint64_t preamble:1;
  73. uint64_t sample:4;
  74. uint64_t phase:8;
  75. } cn50xx;
  76. struct cvmx_smix_clk_s cn52xx;
  77. struct cvmx_smix_clk_cn50xx cn52xxp1;
  78. struct cvmx_smix_clk_s cn56xx;
  79. struct cvmx_smix_clk_cn50xx cn56xxp1;
  80. struct cvmx_smix_clk_cn30xx cn58xx;
  81. struct cvmx_smix_clk_cn30xx cn58xxp1;
  82. };
  83. union cvmx_smix_cmd {
  84. uint64_t u64;
  85. struct cvmx_smix_cmd_s {
  86. uint64_t reserved_18_63:46;
  87. uint64_t phy_op:2;
  88. uint64_t reserved_13_15:3;
  89. uint64_t phy_adr:5;
  90. uint64_t reserved_5_7:3;
  91. uint64_t reg_adr:5;
  92. } s;
  93. struct cvmx_smix_cmd_cn30xx {
  94. uint64_t reserved_17_63:47;
  95. uint64_t phy_op:1;
  96. uint64_t reserved_13_15:3;
  97. uint64_t phy_adr:5;
  98. uint64_t reserved_5_7:3;
  99. uint64_t reg_adr:5;
  100. } cn30xx;
  101. struct cvmx_smix_cmd_cn30xx cn31xx;
  102. struct cvmx_smix_cmd_cn30xx cn38xx;
  103. struct cvmx_smix_cmd_cn30xx cn38xxp2;
  104. struct cvmx_smix_cmd_s cn50xx;
  105. struct cvmx_smix_cmd_s cn52xx;
  106. struct cvmx_smix_cmd_s cn52xxp1;
  107. struct cvmx_smix_cmd_s cn56xx;
  108. struct cvmx_smix_cmd_s cn56xxp1;
  109. struct cvmx_smix_cmd_cn30xx cn58xx;
  110. struct cvmx_smix_cmd_cn30xx cn58xxp1;
  111. };
  112. union cvmx_smix_en {
  113. uint64_t u64;
  114. struct cvmx_smix_en_s {
  115. uint64_t reserved_1_63:63;
  116. uint64_t en:1;
  117. } s;
  118. struct cvmx_smix_en_s cn30xx;
  119. struct cvmx_smix_en_s cn31xx;
  120. struct cvmx_smix_en_s cn38xx;
  121. struct cvmx_smix_en_s cn38xxp2;
  122. struct cvmx_smix_en_s cn50xx;
  123. struct cvmx_smix_en_s cn52xx;
  124. struct cvmx_smix_en_s cn52xxp1;
  125. struct cvmx_smix_en_s cn56xx;
  126. struct cvmx_smix_en_s cn56xxp1;
  127. struct cvmx_smix_en_s cn58xx;
  128. struct cvmx_smix_en_s cn58xxp1;
  129. };
  130. union cvmx_smix_rd_dat {
  131. uint64_t u64;
  132. struct cvmx_smix_rd_dat_s {
  133. uint64_t reserved_18_63:46;
  134. uint64_t pending:1;
  135. uint64_t val:1;
  136. uint64_t dat:16;
  137. } s;
  138. struct cvmx_smix_rd_dat_s cn30xx;
  139. struct cvmx_smix_rd_dat_s cn31xx;
  140. struct cvmx_smix_rd_dat_s cn38xx;
  141. struct cvmx_smix_rd_dat_s cn38xxp2;
  142. struct cvmx_smix_rd_dat_s cn50xx;
  143. struct cvmx_smix_rd_dat_s cn52xx;
  144. struct cvmx_smix_rd_dat_s cn52xxp1;
  145. struct cvmx_smix_rd_dat_s cn56xx;
  146. struct cvmx_smix_rd_dat_s cn56xxp1;
  147. struct cvmx_smix_rd_dat_s cn58xx;
  148. struct cvmx_smix_rd_dat_s cn58xxp1;
  149. };
  150. union cvmx_smix_wr_dat {
  151. uint64_t u64;
  152. struct cvmx_smix_wr_dat_s {
  153. uint64_t reserved_18_63:46;
  154. uint64_t pending:1;
  155. uint64_t val:1;
  156. uint64_t dat:16;
  157. } s;
  158. struct cvmx_smix_wr_dat_s cn30xx;
  159. struct cvmx_smix_wr_dat_s cn31xx;
  160. struct cvmx_smix_wr_dat_s cn38xx;
  161. struct cvmx_smix_wr_dat_s cn38xxp2;
  162. struct cvmx_smix_wr_dat_s cn50xx;
  163. struct cvmx_smix_wr_dat_s cn52xx;
  164. struct cvmx_smix_wr_dat_s cn52xxp1;
  165. struct cvmx_smix_wr_dat_s cn56xx;
  166. struct cvmx_smix_wr_dat_s cn56xxp1;
  167. struct cvmx_smix_wr_dat_s cn58xx;
  168. struct cvmx_smix_wr_dat_s cn58xxp1;
  169. };
  170. #endif