p5040_ids.c 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /*
  2. * Copyright 2010-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, 0),
  33. SET_QP_INFO(11, 12, 6, 1),
  34. SET_QP_INFO(13, 14, 7, 2),
  35. SET_QP_INFO(15, 16, 8, 3),
  36. SET_QP_INFO(17, 18, 9, 0), /* for now, set sdest to 0 */
  37. SET_QP_INFO(19, 20, 10, 0), /* for now, set sdest to 0 */
  38. };
  39. #endif
  40. struct liodn_id_table liodn_tbl[] = {
  41. #ifdef CONFIG_SYS_DPAA_QBMAN
  42. SET_QMAN_LIODN(31),
  43. SET_BMAN_LIODN(32),
  44. #endif
  45. SET_SDHC_LIODN(1, 64),
  46. SET_USB_LIODN(1, "fsl-usb2-mph", 93),
  47. SET_USB_LIODN(2, "fsl-usb2-dr", 94),
  48. SET_SATA_LIODN(1, 95),
  49. SET_SATA_LIODN(2, 96),
  50. SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 1, 195),
  51. SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 2, 196),
  52. SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 3, 197),
  53. SET_DMA_LIODN(1, 193),
  54. SET_DMA_LIODN(2, 194),
  55. };
  56. int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl);
  57. #ifdef CONFIG_SYS_DPAA_FMAN
  58. struct liodn_id_table fman1_liodn_tbl[] = {
  59. SET_FMAN_RX_1G_LIODN(1, 0, 6),
  60. SET_FMAN_RX_1G_LIODN(1, 1, 7),
  61. SET_FMAN_RX_1G_LIODN(1, 2, 8),
  62. SET_FMAN_RX_1G_LIODN(1, 3, 9),
  63. SET_FMAN_RX_1G_LIODN(1, 4, 10),
  64. SET_FMAN_RX_10G_LIODN(1, 0, 11),
  65. };
  66. int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl);
  67. #if (CONFIG_SYS_NUM_FMAN == 2)
  68. struct liodn_id_table fman2_liodn_tbl[] = {
  69. SET_FMAN_RX_1G_LIODN(2, 0, 12),
  70. SET_FMAN_RX_1G_LIODN(2, 1, 13),
  71. SET_FMAN_RX_1G_LIODN(2, 2, 14),
  72. SET_FMAN_RX_1G_LIODN(2, 3, 15),
  73. SET_FMAN_RX_1G_LIODN(2, 4, 16),
  74. SET_FMAN_RX_10G_LIODN(2, 0, 17),
  75. };
  76. int fman2_liodn_tbl_sz = ARRAY_SIZE(fman2_liodn_tbl);
  77. #endif
  78. #endif
  79. struct liodn_id_table sec_liodn_tbl[] = {
  80. SET_SEC_JR_LIODN_ENTRY(0, 129, 130),
  81. SET_SEC_JR_LIODN_ENTRY(1, 131, 132),
  82. SET_SEC_JR_LIODN_ENTRY(2, 133, 134),
  83. SET_SEC_JR_LIODN_ENTRY(3, 135, 136),
  84. SET_SEC_RTIC_LIODN_ENTRY(a, 89),
  85. SET_SEC_RTIC_LIODN_ENTRY(b, 90),
  86. SET_SEC_RTIC_LIODN_ENTRY(c, 91),
  87. SET_SEC_RTIC_LIODN_ENTRY(d, 92),
  88. SET_SEC_DECO_LIODN_ENTRY(0, 139, 140),
  89. SET_SEC_DECO_LIODN_ENTRY(1, 141, 142),
  90. SET_SEC_DECO_LIODN_ENTRY(2, 143, 144),
  91. SET_SEC_DECO_LIODN_ENTRY(3, 145, 146),
  92. };
  93. int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl);
  94. #ifdef CONFIG_SYS_FSL_RAID_ENGINE
  95. struct liodn_id_table raide_liodn_tbl[] = {
  96. SET_RAID_ENGINE_JQ_LIODN_ENTRY(0, 0, 60),
  97. SET_RAID_ENGINE_JQ_LIODN_ENTRY(0, 1, 61),
  98. SET_RAID_ENGINE_JQ_LIODN_ENTRY(1, 0, 62),
  99. SET_RAID_ENGINE_JQ_LIODN_ENTRY(1, 1, 63),
  100. };
  101. int raide_liodn_tbl_sz = ARRAY_SIZE(raide_liodn_tbl);
  102. #endif
  103. struct liodn_id_table liodn_bases[] = {
  104. [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(64, 101),
  105. #ifdef CONFIG_SYS_DPAA_FMAN
  106. [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(32),
  107. #endif
  108. #if (CONFIG_SYS_NUM_FMAN == 2)
  109. [FSL_HW_PORTAL_FMAN2] = SET_LIODN_BASE_1(160),
  110. #endif
  111. #ifdef CONFIG_SYS_FSL_RAID_ENGINE
  112. [FSL_HW_PORTAL_RAID_ENGINE] = SET_LIODN_BASE_1(49),
  113. #endif
  114. };