p3041_ids.c 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright 2010-2011 Freescale Semiconductor, Inc.
  4. */
  5. #include <common.h>
  6. #include <asm/fsl_portals.h>
  7. #include <asm/fsl_liodn.h>
  8. #ifdef CONFIG_SYS_DPAA_QBMAN
  9. struct qportal_info qp_info[CONFIG_SYS_QMAN_NUM_PORTALS] = {
  10. /* dqrr liodn, frame data liodn, liodn off, sdest */
  11. SET_QP_INFO(1, 2, 1, 0),
  12. SET_QP_INFO(3, 4, 2, 1),
  13. SET_QP_INFO(5, 6, 3, 2),
  14. SET_QP_INFO(7, 8, 4, 3),
  15. SET_QP_INFO(9, 10, 5, 0),
  16. SET_QP_INFO(1, 12, 6, 1),
  17. SET_QP_INFO(13, 14, 7, 2),
  18. SET_QP_INFO(15, 16, 8, 3),
  19. SET_QP_INFO(17, 18, 9, 0), /* for now sdest to 0 */
  20. SET_QP_INFO(19, 20, 10, 0), /* for now sdest to 0 */
  21. };
  22. #endif
  23. struct srio_liodn_id_table srio_liodn_tbl[] = {
  24. SET_SRIO_LIODN_2(1, 199, 200),
  25. SET_SRIO_LIODN_2(2, 201, 202),
  26. };
  27. int srio_liodn_tbl_sz = ARRAY_SIZE(srio_liodn_tbl);
  28. struct liodn_id_table liodn_tbl[] = {
  29. #ifdef CONFIG_SYS_DPAA_QBMAN
  30. SET_QMAN_LIODN(31),
  31. SET_BMAN_LIODN(32),
  32. #endif
  33. SET_SDHC_LIODN(1, 64),
  34. SET_PME_LIODN(117),
  35. SET_USB_LIODN(1, "fsl-usb2-mph", 125),
  36. SET_USB_LIODN(2, "fsl-usb2-dr", 126),
  37. SET_SATA_LIODN(1, 127),
  38. SET_SATA_LIODN(2, 128),
  39. SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 1, 193),
  40. SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 2, 194),
  41. SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 3, 195),
  42. SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 4, 196),
  43. SET_DMA_LIODN(1, "fsl,eloplus-dma", 197),
  44. SET_DMA_LIODN(2, "fsl,eloplus-dma", 198),
  45. SET_GUTS_LIODN("fsl,rapidio-delta", 199, rio1liodnr, 0),
  46. SET_GUTS_LIODN(NULL, 200, rio2liodnr, 0),
  47. SET_GUTS_LIODN(NULL, 201, rio1maintliodnr, 0),
  48. SET_GUTS_LIODN(NULL, 202, rio2maintliodnr, 0),
  49. };
  50. int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl);
  51. #ifdef CONFIG_SYS_DPAA_FMAN
  52. struct fman_liodn_id_table fman1_liodn_tbl[] = {
  53. SET_FMAN_RX_1G_LIODN(1, 0, 10),
  54. SET_FMAN_RX_1G_LIODN(1, 1, 11),
  55. SET_FMAN_RX_1G_LIODN(1, 2, 12),
  56. SET_FMAN_RX_1G_LIODN(1, 3, 13),
  57. SET_FMAN_RX_1G_LIODN(1, 4, 14),
  58. SET_FMAN_RX_10G_LIODN(1, 0, 15),
  59. };
  60. int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl);
  61. #endif
  62. struct liodn_id_table sec_liodn_tbl[] = {
  63. SET_SEC_JR_LIODN_ENTRY(0, 129, 130),
  64. SET_SEC_JR_LIODN_ENTRY(1, 131, 132),
  65. SET_SEC_JR_LIODN_ENTRY(2, 133, 134),
  66. SET_SEC_JR_LIODN_ENTRY(3, 135, 136),
  67. SET_SEC_RTIC_LIODN_ENTRY(a, 154),
  68. SET_SEC_RTIC_LIODN_ENTRY(b, 155),
  69. SET_SEC_RTIC_LIODN_ENTRY(c, 156),
  70. SET_SEC_RTIC_LIODN_ENTRY(d, 157),
  71. SET_SEC_DECO_LIODN_ENTRY(0, 97, 98),
  72. SET_SEC_DECO_LIODN_ENTRY(1, 99, 100),
  73. };
  74. int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl);
  75. #ifdef CONFIG_SYS_DPAA_RMAN
  76. struct liodn_id_table rman_liodn_tbl[] = {
  77. /* Set RMan block 0-3 liodn offset */
  78. SET_RMAN_LIODN(0, 6),
  79. SET_RMAN_LIODN(1, 7),
  80. SET_RMAN_LIODN(2, 8),
  81. SET_RMAN_LIODN(3, 9),
  82. };
  83. int rman_liodn_tbl_sz = ARRAY_SIZE(rman_liodn_tbl);
  84. #endif
  85. struct liodn_id_table liodn_bases[] = {
  86. [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(64, 100),
  87. #ifdef CONFIG_SYS_DPAA_FMAN
  88. [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(32),
  89. #endif
  90. #ifdef CONFIG_SYS_DPAA_PME
  91. [FSL_HW_PORTAL_PME] = SET_LIODN_BASE_2(136, 172),
  92. #endif
  93. #ifdef CONFIG_SYS_DPAA_RMAN
  94. [FSL_HW_PORTAL_RMAN] = SET_LIODN_BASE_1(80),
  95. #endif
  96. };