p4080_ids.c 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*
  2. * Copyright 2010-2011 Freescale Semiconductor, Inc.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <common.h>
  7. #include <asm/fsl_portals.h>
  8. #include <asm/fsl_liodn.h>
  9. #ifdef CONFIG_SYS_DPAA_QBMAN
  10. struct qportal_info qp_info[CONFIG_SYS_QMAN_NUM_PORTALS] = {
  11. /* dqrr liodn, frame data liodn, liodn off, sdest */
  12. SET_QP_INFO( 1, 2, 1, 0),
  13. SET_QP_INFO( 3, 4, 2, 1),
  14. SET_QP_INFO( 5, 6, 3, 2),
  15. SET_QP_INFO( 7, 8, 4, 3),
  16. SET_QP_INFO( 9, 10, 5, 4),
  17. SET_QP_INFO(11, 12, 6, 5),
  18. SET_QP_INFO(13, 14, 7, 6),
  19. SET_QP_INFO(15, 16, 8, 7),
  20. SET_QP_INFO(17, 18, 9, 0), /* for now sdest to 0 */
  21. SET_QP_INFO(19, 20, 10, 0), /* for now sdest to 0 */
  22. };
  23. #endif
  24. struct srio_liodn_id_table srio_liodn_tbl[] = {
  25. SET_SRIO_LIODN_1(1, 198),
  26. SET_SRIO_LIODN_1(2, 199),
  27. };
  28. int srio_liodn_tbl_sz = ARRAY_SIZE(srio_liodn_tbl);
  29. struct liodn_id_table liodn_tbl[] = {
  30. SET_USB_LIODN(1, "fsl-usb2-mph", 127),
  31. SET_USB_LIODN(2, "fsl-usb2-dr", 157),
  32. SET_SDHC_LIODN(1, 156),
  33. SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 1, 193),
  34. SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 2, 194),
  35. SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 3, 195),
  36. SET_DMA_LIODN(1, 196),
  37. SET_DMA_LIODN(2, 197),
  38. SET_GUTS_LIODN("fsl,srio-rmu", 200, rmuliodnr, 0xd3000),
  39. #ifdef CONFIG_SYS_DPAA_QBMAN
  40. SET_QMAN_LIODN(31),
  41. SET_BMAN_LIODN(32),
  42. #endif
  43. SET_PME_LIODN(128),
  44. };
  45. int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl);
  46. #ifdef CONFIG_SYS_DPAA_FMAN
  47. struct liodn_id_table fman1_liodn_tbl[] = {
  48. SET_FMAN_RX_1G_LIODN(1, 0, 11),
  49. SET_FMAN_RX_1G_LIODN(1, 1, 12),
  50. SET_FMAN_RX_1G_LIODN(1, 2, 13),
  51. SET_FMAN_RX_1G_LIODN(1, 3, 14),
  52. SET_FMAN_RX_10G_LIODN(1, 0, 15),
  53. };
  54. int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl);
  55. #if (CONFIG_SYS_NUM_FMAN == 2)
  56. struct liodn_id_table fman2_liodn_tbl[] = {
  57. SET_FMAN_RX_1G_LIODN(2, 0, 16),
  58. SET_FMAN_RX_1G_LIODN(2, 1, 17),
  59. SET_FMAN_RX_1G_LIODN(2, 2, 18),
  60. SET_FMAN_RX_1G_LIODN(2, 3, 19),
  61. SET_FMAN_RX_10G_LIODN(2, 0, 20),
  62. };
  63. int fman2_liodn_tbl_sz = ARRAY_SIZE(fman2_liodn_tbl);
  64. #endif
  65. #endif
  66. struct liodn_id_table sec_liodn_tbl[] = {
  67. /*
  68. * We assume currently that all JR are in the same partition
  69. * and as such they need to represent the same LIODN due to
  70. * a 4080 rev.2 h/w requirement that DECOs sharing from themselves
  71. * or from another DECO have the two Non-SEQ LIODN values equal
  72. */
  73. SET_SEC_JR_LIODN_ENTRY(0, 146, 154), /* (0, 146, 154), */
  74. SET_SEC_JR_LIODN_ENTRY(1, 146, 154), /* (1, 147, 155), */
  75. SET_SEC_JR_LIODN_ENTRY(2, 146, 154), /* (2, 178, 186), */
  76. SET_SEC_JR_LIODN_ENTRY(3, 146, 154), /* (3, 179, 187), */
  77. SET_SEC_RTIC_LIODN_ENTRY(a, 144),
  78. SET_SEC_RTIC_LIODN_ENTRY(b, 145),
  79. SET_SEC_RTIC_LIODN_ENTRY(c, 176),
  80. SET_SEC_RTIC_LIODN_ENTRY(d, 177),
  81. SET_SEC_DECO_LIODN_ENTRY(0, 129, 161),
  82. SET_SEC_DECO_LIODN_ENTRY(1, 130, 162),
  83. SET_SEC_DECO_LIODN_ENTRY(2, 131, 163),
  84. SET_SEC_DECO_LIODN_ENTRY(3, 132, 164),
  85. SET_SEC_DECO_LIODN_ENTRY(4, 133, 165),
  86. };
  87. int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl);
  88. struct liodn_id_table liodn_bases[] = {
  89. [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(96, 106),
  90. #ifdef CONFIG_SYS_DPAA_FMAN
  91. [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(32),
  92. #if (CONFIG_SYS_NUM_FMAN == 2)
  93. [FSL_HW_PORTAL_FMAN2] = SET_LIODN_BASE_1(64),
  94. #endif
  95. #endif
  96. #ifdef CONFIG_SYS_DPAA_PME
  97. [FSL_HW_PORTAL_PME] = SET_LIODN_BASE_2(116, 133),
  98. #endif
  99. };