fsl_fman.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. /*
  2. * MPC85xx Internal Memory Map
  3. *
  4. * Copyright 2010 Freescale Semiconductor, Inc.
  5. *
  6. * See file CREDITS for list of people who contributed to this
  7. * project.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of
  12. * the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  22. * MA 02111-1307 USA
  23. */
  24. #ifndef __FSL_FMAN_H__
  25. #define __FSL_FMAN_H__
  26. #include <asm/types.h>
  27. typedef struct fm_bmi_common {
  28. u32 fmbm_init; /* BMI initialization */
  29. u32 fmbm_cfg1; /* BMI configuration1 */
  30. u32 fmbm_cfg2; /* BMI configuration2 */
  31. u32 res0[0x5];
  32. u32 fmbm_ievr; /* interrupt event register */
  33. u32 fmbm_ier; /* interrupt enable register */
  34. u32 fmbm_ifr; /* interrupt force register */
  35. u32 res1[0x5];
  36. u32 fmbm_arb[0x8]; /* BMI arbitration */
  37. u32 res2[0x28];
  38. u32 fmbm_gde; /* global debug enable */
  39. u32 fmbm_pp[0x3f]; /* BMI port parameters */
  40. u32 res3;
  41. u32 fmbm_pfs[0x3f]; /* BMI port FIFO size */
  42. u32 res4;
  43. u32 fmbm_ppid[0x3f];/* port partition ID */
  44. } fm_bmi_common_t;
  45. typedef struct fm_qmi_common {
  46. u32 fmqm_gc; /* general configuration register */
  47. u32 res0;
  48. u32 fmqm_eie; /* error interrupt event register */
  49. u32 fmqm_eien; /* error interrupt enable register */
  50. u32 fmqm_eif; /* error interrupt force register */
  51. u32 fmqm_ie; /* interrupt event register */
  52. u32 fmqm_ien; /* interrupt enable register */
  53. u32 fmqm_if; /* interrupt force register */
  54. u32 fmqm_gs; /* global status register */
  55. u32 fmqm_ts; /* task status register */
  56. u32 fmqm_etfc; /* enqueue total frame counter */
  57. u32 fmqm_dtfc; /* dequeue total frame counter */
  58. u32 fmqm_dc0; /* dequeue counter 0 */
  59. u32 fmqm_dc1; /* dequeue counter 1 */
  60. u32 fmqm_dc2; /* dequeue counter 2 */
  61. u32 fmqm_dc3; /* dequeue counter 3 */
  62. u32 fmqm_dfnoc; /* dequeue FQID not override counter */
  63. u32 fmqm_dfcc; /* dequeue FQID from context counter */
  64. u32 fmqm_dffc; /* dequeue FQID from FD counter */
  65. u32 fmqm_dcc; /* dequeue confirm counter */
  66. u32 res1[0xc];
  67. u32 fmqm_dtrc; /* debug trap configuration register */
  68. u32 fmqm_efddd; /* enqueue frame descriptor dynamic debug */
  69. u32 res3[0x2];
  70. u32 res4[0xdc]; /* missing debug regs */
  71. } fm_qmi_common_t;
  72. typedef struct fm_bmi {
  73. u8 res[1024];
  74. } fm_bmi_t;
  75. typedef struct fm_qmi {
  76. u8 res[1024];
  77. } fm_qmi_t;
  78. typedef struct fm_parser {
  79. u8 res[1024];
  80. } fm_parser_t;
  81. typedef struct fm_policer {
  82. u8 res[4*1024];
  83. } fm_policer_t;
  84. typedef struct fm_keygen {
  85. u8 res[4*1024];
  86. } fm_keygen_t;
  87. typedef struct fm_dma {
  88. u32 fmdmsr; /* status register */
  89. u32 fmdmmr; /* mode register */
  90. u32 fmdmtr; /* bus threshold register */
  91. u32 fmdmhy; /* bus hysteresis register */
  92. u32 fmdmsetr; /* SOS emergency threshold register */
  93. u32 fmdmtah; /* transfer bus address high register */
  94. u32 fmdmtal; /* transfer bus address low register */
  95. u32 fmdmtcid; /* transfer bus communication ID register */
  96. u32 fmdmra; /* DMA bus internal ram address register */
  97. u32 fmdmrd; /* DMA bus internal ram data register */
  98. u32 res0[0xb];
  99. u32 fmdmdcr; /* debug counter */
  100. u32 fmdmemsr; /* emrgency smoother register */
  101. u32 res1;
  102. u32 fmdmplr[32]; /* FM DMA PID-LIODN # register */
  103. u32 res[0x3c8];
  104. } fm_dma_t;
  105. typedef struct fm_fpm {
  106. u32 fpmtnc; /* TNUM control */
  107. u32 fpmprc; /* Port_ID control */
  108. u32 res0;
  109. u32 fpmflc; /* flush control */
  110. u32 fpmdis1; /* dispatch thresholds1 */
  111. u32 fpmdis2; /* dispatch thresholds2 */
  112. u32 fmepi; /* error pending interrupts */
  113. u32 fmrie; /* rams interrupt enable */
  114. u32 fpmfcevent[0x4];/* FMan controller event 0-3 */
  115. u32 res1[0x4];
  116. u32 fpmfcmask[0x4]; /* FMan controller mask 0-3 */
  117. u32 res2[0x4];
  118. u32 fpmtsc1; /* timestamp control1 */
  119. u32 fpmtsc2; /* timestamp control2 */
  120. u32 fpmtsp; /* time stamp */
  121. u32 fpmtsf; /* time stamp fraction */
  122. u32 fpmrcr; /* rams control and event */
  123. u32 res3[0x3];
  124. u32 fpmdrd[0x4]; /* data_ram data 0-3 */
  125. u32 res4[0xc];
  126. u32 fpmdra; /* data ram access */
  127. u32 fm_ip_rev_1; /* IP block revision 1 */
  128. u32 fm_ip_rev_2; /* IP block revision 2 */
  129. u32 fmrstc; /* reset command */
  130. u32 fmcld; /* classifier debug control */
  131. u32 fmnpi; /* normal pending interrupts */
  132. u32 res5;
  133. u32 fmnee; /* event and enable */
  134. u32 fpmcev[0x4]; /* CPU event 0-3 */
  135. u32 res6[0x4];
  136. u32 fmfp_ps[0x40]; /* port status */
  137. u32 res7[0x260];
  138. u32 fpmts[0x80]; /* task status */
  139. u32 res8[0xa0];
  140. } fm_fpm_t;
  141. typedef struct fm_imem {
  142. u8 res[4*1024];
  143. } fm_imem_t;
  144. typedef struct fm_soft_parser {
  145. u8 res[4*1024];
  146. } fm_soft_parser_t;
  147. typedef struct fm_dtesc {
  148. u8 res[4*1024];
  149. } fm_dtsec_t;
  150. typedef struct fm_mdio {
  151. u8 res[4*1024];
  152. } fm_mdio_t;
  153. typedef struct fm_10gec {
  154. u8 res[4*1024];
  155. } fm_10gec_t;
  156. typedef struct fm_10gec_mdio {
  157. u8 res[4*1024];
  158. } fm_10gec_mdio_t;
  159. typedef struct fm_1588 {
  160. u8 res[4*1024];
  161. } fm_1588_t;
  162. typedef struct ccsr_fman {
  163. u8 muram[0x80000];
  164. fm_bmi_common_t fm_bmi_common;
  165. fm_qmi_common_t fm_qmi_common;
  166. u8 res0[2048];
  167. struct {
  168. fm_bmi_t fm_bmi;
  169. fm_qmi_t fm_qmi;
  170. fm_parser_t fm_parser;
  171. u8 res[1024];
  172. } port[63];
  173. fm_policer_t fm_policer;
  174. fm_keygen_t fm_keygen;
  175. fm_dma_t fm_dma;
  176. fm_fpm_t fm_fpm;
  177. fm_imem_t fm_imem;
  178. u8 res1[8*1024];
  179. fm_soft_parser_t fm_soft_parser;
  180. u8 res2[96*1024];
  181. struct {
  182. fm_dtsec_t fm_dtesc;
  183. fm_mdio_t fm_mdio;
  184. } mac[4];
  185. u8 res3[32*1024];
  186. fm_10gec_t fm_10gec;
  187. fm_10gec_mdio_t fm_10gec_mdio;
  188. u8 res4[48*1024];
  189. fm_1588_t fm_1588;
  190. u8 res5[4*1024];
  191. } ccsr_fman_t;
  192. #endif /*__FSL_FMAN_H__*/