p5020_ids.c 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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, 0),
  31. SET_QP_INFO(7, 8, 4, 1),
  32. SET_QP_INFO(9, 10, 5, 0),
  33. SET_QP_INFO(11, 12, 1, 1),
  34. SET_QP_INFO(13, 14, 2, 0),
  35. SET_QP_INFO(15, 16, 3, 1),
  36. SET_QP_INFO(17, 18, 4, 0),
  37. SET_QP_INFO(19, 20, 5, 1),
  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_PME_LIODN(117),
  47. SET_USB_LIODN(1, "fsl-usb2-mph", 125),
  48. SET_USB_LIODN(2, "fsl-usb2-dr", 126),
  49. SET_SATA_LIODN(1, 127),
  50. SET_SATA_LIODN(2, 128),
  51. SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 1, 193),
  52. SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 2, 194),
  53. SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 3, 195),
  54. SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 4, 196),
  55. SET_DMA_LIODN(1, 197),
  56. SET_DMA_LIODN(2, 198),
  57. SET_GUTS_LIODN("fsl,rapidio-delta", 199, rio1liodnr, 0),
  58. SET_GUTS_LIODN(NULL, 200, rio2liodnr, 0),
  59. SET_GUTS_LIODN(NULL, 201, rio1maintliodnr, 0),
  60. SET_GUTS_LIODN(NULL, 202, rio2maintliodnr, 0),
  61. };
  62. int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl);
  63. #ifdef CONFIG_SYS_DPAA_FMAN
  64. struct liodn_id_table fman1_liodn_tbl[] = {
  65. SET_FMAN_RX_1G_LIODN(1, 0, 10),
  66. SET_FMAN_RX_1G_LIODN(1, 1, 11),
  67. SET_FMAN_RX_1G_LIODN(1, 2, 12),
  68. SET_FMAN_RX_1G_LIODN(1, 3, 13),
  69. SET_FMAN_RX_1G_LIODN(1, 4, 14),
  70. SET_FMAN_RX_10G_LIODN(1, 0, 15),
  71. };
  72. int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl);
  73. #endif
  74. struct liodn_id_table sec_liodn_tbl[] = {
  75. SET_SEC_JR_LIODN_ENTRY(0, 129, 130),
  76. SET_SEC_JR_LIODN_ENTRY(1, 131, 132),
  77. SET_SEC_JR_LIODN_ENTRY(2, 133, 134),
  78. SET_SEC_JR_LIODN_ENTRY(3, 135, 136),
  79. SET_SEC_RTIC_LIODN_ENTRY(a, 154),
  80. SET_SEC_RTIC_LIODN_ENTRY(b, 155),
  81. SET_SEC_RTIC_LIODN_ENTRY(c, 156),
  82. SET_SEC_RTIC_LIODN_ENTRY(d, 157),
  83. SET_SEC_DECO_LIODN_ENTRY(0, 97, 98),
  84. SET_SEC_DECO_LIODN_ENTRY(1, 99, 100),
  85. };
  86. int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl);
  87. #ifdef CONFIG_SYS_FSL_RAID_ENGINE
  88. struct liodn_id_table raide_liodn_tbl[] = {
  89. SET_RAID_ENGINE_JQ_LIODN_ENTRY(0, 0, 60),
  90. SET_RAID_ENGINE_JQ_LIODN_ENTRY(0, 1, 61),
  91. SET_RAID_ENGINE_JQ_LIODN_ENTRY(1, 0, 62),
  92. SET_RAID_ENGINE_JQ_LIODN_ENTRY(1, 1, 63),
  93. };
  94. int raide_liodn_tbl_sz = ARRAY_SIZE(raide_liodn_tbl);
  95. #endif
  96. struct liodn_id_table liodn_bases[] = {
  97. [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(64, 100),
  98. #ifdef CONFIG_SYS_DPAA_FMAN
  99. [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(32),
  100. #endif
  101. #ifdef CONFIG_SYS_DPAA_PME
  102. [FSL_HW_PORTAL_PME] = SET_LIODN_BASE_2(136, 172),
  103. #endif
  104. #ifdef CONFIG_SYS_FSL_RAID_ENGINE
  105. [FSL_HW_PORTAL_RAID_ENGINE] = SET_LIODN_BASE_1(47),
  106. #endif
  107. };