p3060_ids.c 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. * Copyright 2011 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, 2, 1, 0),
  29. SET_QP_INFO( 3, 4, 2, 1),
  30. SET_QP_INFO( 5, 6, 3, 2),
  31. SET_QP_INFO( 7, 8, 4, 3),
  32. SET_QP_INFO( 9, 10, 5, 4),
  33. SET_QP_INFO(11, 12, 6, 5),
  34. SET_QP_INFO(13, 14, 7, 6),
  35. SET_QP_INFO(15, 16, 8, 7),
  36. SET_QP_INFO(17, 18, 9, 0), /* for now sdest to 0 */
  37. SET_QP_INFO(19, 20, 10, 0), /* for now sdest to 0 */
  38. };
  39. #endif
  40. struct srio_liodn_id_table srio_liodn_tbl[] = {
  41. SET_SRIO_LIODN_1(1, 198),
  42. SET_SRIO_LIODN_1(2, 199),
  43. };
  44. int srio_liodn_tbl_sz = ARRAY_SIZE(srio_liodn_tbl);
  45. struct liodn_id_table liodn_tbl[] = {
  46. SET_USB_LIODN(1, "fsl-usb2-mph", 127),
  47. SET_USB_LIODN(2, "fsl-usb2-dr", 157),
  48. SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 1, 193),
  49. SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 2, 194),
  50. SET_DMA_LIODN(1, 196),
  51. SET_DMA_LIODN(2, 197),
  52. SET_GUTS_LIODN("fsl,srio-rmu", 200, rmuliodnr, 0xd3000),
  53. #ifdef CONFIG_SYS_DPAA_QBMAN
  54. SET_QMAN_LIODN(31),
  55. SET_BMAN_LIODN(32),
  56. #endif
  57. SET_PME_LIODN(128),
  58. };
  59. int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl);
  60. #ifdef CONFIG_SYS_DPAA_FMAN
  61. struct liodn_id_table fman1_liodn_tbl[] = {
  62. SET_FMAN_RX_1G_LIODN(1, 0, 11),
  63. SET_FMAN_RX_1G_LIODN(1, 1, 12),
  64. SET_FMAN_RX_1G_LIODN(1, 2, 13),
  65. SET_FMAN_RX_1G_LIODN(1, 3, 14),
  66. };
  67. int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl);
  68. #if (CONFIG_SYS_NUM_FMAN == 2)
  69. struct liodn_id_table fman2_liodn_tbl[] = {
  70. SET_FMAN_RX_1G_LIODN(2, 0, 16),
  71. SET_FMAN_RX_1G_LIODN(2, 1, 17),
  72. SET_FMAN_RX_1G_LIODN(2, 2, 18),
  73. SET_FMAN_RX_1G_LIODN(2, 3, 19),
  74. };
  75. int fman2_liodn_tbl_sz = ARRAY_SIZE(fman2_liodn_tbl);
  76. #endif
  77. #endif
  78. struct liodn_id_table sec_liodn_tbl[] = {
  79. SET_SEC_JR_LIODN_ENTRY(0, 146, 154),
  80. SET_SEC_JR_LIODN_ENTRY(1, 147, 155),
  81. SET_SEC_JR_LIODN_ENTRY(2, 178, 186),
  82. SET_SEC_JR_LIODN_ENTRY(3, 179, 187),
  83. SET_SEC_RTIC_LIODN_ENTRY(a, 144),
  84. SET_SEC_RTIC_LIODN_ENTRY(b, 145),
  85. SET_SEC_RTIC_LIODN_ENTRY(c, 176),
  86. SET_SEC_RTIC_LIODN_ENTRY(d, 177),
  87. SET_SEC_DECO_LIODN_ENTRY(0, 129, 161),
  88. SET_SEC_DECO_LIODN_ENTRY(1, 130, 162),
  89. SET_SEC_DECO_LIODN_ENTRY(2, 131, 163),
  90. SET_SEC_DECO_LIODN_ENTRY(3, 132, 164),
  91. SET_SEC_DECO_LIODN_ENTRY(4, 133, 165),
  92. };
  93. int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl);
  94. struct liodn_id_table liodn_bases[] = {
  95. [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(96, 106),
  96. #ifdef CONFIG_SYS_DPAA_FMAN
  97. [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(32),
  98. #if (CONFIG_SYS_NUM_FMAN == 2)
  99. [FSL_HW_PORTAL_FMAN2] = SET_LIODN_BASE_1(64),
  100. #endif
  101. #endif
  102. #ifdef CONFIG_SYS_DPAA_PME
  103. [FSL_HW_PORTAL_PME] = SET_LIODN_BASE_2(116, 133),
  104. #endif
  105. };