b4860_ids.c 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. /*
  2. * Copyright 2012 Freescale Semiconductor, Inc.
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  20. * MA 02111-1307 USA
  21. */
  22. #include <common.h>
  23. #include <asm/fsl_portals.h>
  24. #include <asm/fsl_liodn.h>
  25. #ifdef CONFIG_SYS_DPAA_QBMAN
  26. struct qportal_info qp_info[CONFIG_SYS_QMAN_NUM_PORTALS] = {
  27. /* dqrr liodn, frame data liodn, liodn off, sdest */
  28. SET_QP_INFO(1, 27, 1, 0),
  29. SET_QP_INFO(2, 28, 1, 0),
  30. SET_QP_INFO(3, 29, 1, 1),
  31. SET_QP_INFO(4, 30, 1, 1),
  32. SET_QP_INFO(5, 31, 1, 2),
  33. SET_QP_INFO(6, 32, 1, 2),
  34. SET_QP_INFO(7, 33, 1, 3),
  35. SET_QP_INFO(8, 34, 1, 3),
  36. SET_QP_INFO(9, 35, 1, 0),
  37. SET_QP_INFO(10, 36, 1, 0),
  38. SET_QP_INFO(11, 37, 1, 1),
  39. SET_QP_INFO(12, 38, 1, 1),
  40. SET_QP_INFO(13, 39, 1, 2),
  41. SET_QP_INFO(14, 40, 1, 2),
  42. SET_QP_INFO(15, 41, 1, 3),
  43. SET_QP_INFO(16, 42, 1, 3),
  44. SET_QP_INFO(17, 43, 1, 0),
  45. SET_QP_INFO(18, 44, 1, 0),
  46. SET_QP_INFO(19, 45, 1, 1),
  47. SET_QP_INFO(20, 46, 1, 1),
  48. SET_QP_INFO(21, 47, 1, 2),
  49. SET_QP_INFO(22, 48, 1, 2),
  50. SET_QP_INFO(23, 49, 1, 3),
  51. SET_QP_INFO(24, 50, 1, 3),
  52. SET_QP_INFO(25, 51, 1, 0),
  53. };
  54. #endif
  55. #ifdef CONFIG_SYS_SRIO
  56. struct srio_liodn_id_table srio_liodn_tbl[] = {
  57. SET_SRIO_LIODN_1(1, 307),
  58. SET_SRIO_LIODN_1(2, 387),
  59. };
  60. int srio_liodn_tbl_sz = ARRAY_SIZE(srio_liodn_tbl);
  61. #endif
  62. struct liodn_id_table liodn_tbl[] = {
  63. #ifdef CONFIG_SYS_DPAA_QBMAN
  64. SET_QMAN_LIODN(62),
  65. SET_BMAN_LIODN(63),
  66. #endif
  67. SET_SDHC_LIODN(1, 552),
  68. SET_USB_LIODN(1, "fsl-usb2-mph", 553),
  69. SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 1, 148),
  70. SET_DMA_LIODN(1, 147),
  71. SET_DMA_LIODN(2, 227),
  72. #ifndef CONFIG_PPC_B4420
  73. SET_GUTS_LIODN("fsl,rapidio-delta", 199, rio1liodnr, 0),
  74. SET_GUTS_LIODN(NULL, 200, rio2liodnr, 0),
  75. SET_GUTS_LIODN(NULL, 201, rio1maintliodnr, 0),
  76. SET_GUTS_LIODN(NULL, 202, rio2maintliodnr, 0),
  77. #endif
  78. /* SET_NEXUS_LIODN(557), -- not yet implemented */
  79. };
  80. int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl);
  81. #ifdef CONFIG_SYS_DPAA_FMAN
  82. struct liodn_id_table fman1_liodn_tbl[] = {
  83. SET_FMAN_RX_1G_LIODN(1, 0, 88),
  84. SET_FMAN_RX_1G_LIODN(1, 1, 89),
  85. SET_FMAN_RX_1G_LIODN(1, 2, 90),
  86. SET_FMAN_RX_1G_LIODN(1, 3, 91),
  87. SET_FMAN_RX_1G_LIODN(1, 4, 92),
  88. SET_FMAN_RX_1G_LIODN(1, 5, 93),
  89. #ifndef CONFIG_PPC_B4420
  90. SET_FMAN_RX_10G_LIODN(1, 0, 94),
  91. SET_FMAN_RX_10G_LIODN(1, 1, 95),
  92. #endif
  93. };
  94. int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl);
  95. #endif
  96. struct liodn_id_table sec_liodn_tbl[] = {
  97. SET_SEC_JR_LIODN_ENTRY(0, 454, 458),
  98. SET_SEC_JR_LIODN_ENTRY(1, 455, 459),
  99. SET_SEC_JR_LIODN_ENTRY(2, 456, 460),
  100. SET_SEC_JR_LIODN_ENTRY(3, 457, 461),
  101. SET_SEC_RTIC_LIODN_ENTRY(a, 453),
  102. SET_SEC_RTIC_LIODN_ENTRY(b, 549),
  103. SET_SEC_RTIC_LIODN_ENTRY(c, 550),
  104. SET_SEC_RTIC_LIODN_ENTRY(d, 551),
  105. SET_SEC_DECO_LIODN_ENTRY(0, 541, 610),
  106. SET_SEC_DECO_LIODN_ENTRY(1, 542, 611),
  107. SET_SEC_DECO_LIODN_ENTRY(2, 543, 612),
  108. SET_SEC_DECO_LIODN_ENTRY(3, 544, 613),
  109. SET_SEC_DECO_LIODN_ENTRY(4, 545, 614),
  110. SET_SEC_DECO_LIODN_ENTRY(5, 546, 615),
  111. SET_SEC_DECO_LIODN_ENTRY(6, 547, 616),
  112. SET_SEC_DECO_LIODN_ENTRY(7, 548, 617),
  113. };
  114. int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl);
  115. #ifdef CONFIG_SYS_DPAA_RMAN
  116. struct liodn_id_table rman_liodn_tbl[] = {
  117. /* Set RMan block 0-3 liodn offset */
  118. SET_RMAN_LIODN(0, 678),
  119. SET_RMAN_LIODN(1, 679),
  120. SET_RMAN_LIODN(2, 680),
  121. SET_RMAN_LIODN(3, 681),
  122. };
  123. int rman_liodn_tbl_sz = ARRAY_SIZE(rman_liodn_tbl);
  124. #endif
  125. struct liodn_id_table liodn_bases[] = {
  126. [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(462, 558),
  127. #ifdef CONFIG_SYS_DPAA_FMAN
  128. [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(973),
  129. #endif
  130. #ifdef CONFIG_SYS_DPAA_RMAN
  131. [FSL_HW_PORTAL_RMAN] = SET_LIODN_BASE_1(922),
  132. #endif
  133. };