Kumar Gala | db977ab | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 1 | /* |
Laurentiu TUDOR | 33e6835 | 2011-03-15 16:37:36 +0200 | [diff] [blame] | 2 | * Copyright 2010-2011 Freescale Semiconductor, Inc. |
Kumar Gala | db977ab | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 3 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 4 | * SPDX-License-Identifier: GPL-2.0+ |
Kumar Gala | db977ab | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <common.h> |
| 8 | #include <asm/fsl_portals.h> |
| 9 | #include <asm/fsl_liodn.h> |
| 10 | |
Kumar Gala | 58b2f96 | 2011-05-19 16:15:11 -0500 | [diff] [blame] | 11 | #ifdef CONFIG_SYS_DPAA_QBMAN |
Kumar Gala | db977ab | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 12 | struct qportal_info qp_info[CONFIG_SYS_QMAN_NUM_PORTALS] = { |
| 13 | /* dqrr liodn, frame data liodn, liodn off, sdest */ |
| 14 | SET_QP_INFO( 1, 2, 1, 0), |
| 15 | SET_QP_INFO( 3, 4, 2, 1), |
| 16 | SET_QP_INFO( 5, 6, 3, 2), |
| 17 | SET_QP_INFO( 7, 8, 4, 3), |
| 18 | SET_QP_INFO( 9, 10, 5, 4), |
| 19 | SET_QP_INFO(11, 12, 6, 5), |
| 20 | SET_QP_INFO(13, 14, 7, 6), |
| 21 | SET_QP_INFO(15, 16, 8, 7), |
| 22 | SET_QP_INFO(17, 18, 9, 0), /* for now sdest to 0 */ |
| 23 | SET_QP_INFO(19, 20, 10, 0), /* for now sdest to 0 */ |
| 24 | }; |
Kumar Gala | 58b2f96 | 2011-05-19 16:15:11 -0500 | [diff] [blame] | 25 | #endif |
Kumar Gala | db977ab | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 26 | |
Kumar Gala | 1a0c642 | 2011-10-14 00:01:23 -0500 | [diff] [blame] | 27 | struct srio_liodn_id_table srio_liodn_tbl[] = { |
| 28 | SET_SRIO_LIODN_1(1, 198), |
| 29 | SET_SRIO_LIODN_1(2, 199), |
| 30 | }; |
| 31 | int srio_liodn_tbl_sz = ARRAY_SIZE(srio_liodn_tbl); |
| 32 | |
Kumar Gala | db977ab | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 33 | struct liodn_id_table liodn_tbl[] = { |
| 34 | SET_USB_LIODN(1, "fsl-usb2-mph", 127), |
| 35 | SET_USB_LIODN(2, "fsl-usb2-dr", 157), |
| 36 | |
| 37 | SET_SDHC_LIODN(1, 156), |
| 38 | |
Timur Tabi | 5c5befd | 2012-07-25 11:03:34 +0000 | [diff] [blame] | 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), |
Kumar Gala | db977ab | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 42 | |
Tudor Laurentiu | 8d3eaa9 | 2014-11-20 12:09:31 +0200 | [diff] [blame] | 43 | SET_DMA_LIODN(1, "fsl,eloplus-dma", 196), |
| 44 | SET_DMA_LIODN(2, "fsl,eloplus-dma", 197), |
Kumar Gala | db977ab | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 45 | |
Kumar Gala | 1a0c642 | 2011-10-14 00:01:23 -0500 | [diff] [blame] | 46 | SET_GUTS_LIODN("fsl,srio-rmu", 200, rmuliodnr, 0xd3000), |
Kumar Gala | db977ab | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 47 | |
Kumar Gala | 58b2f96 | 2011-05-19 16:15:11 -0500 | [diff] [blame] | 48 | #ifdef CONFIG_SYS_DPAA_QBMAN |
Kumar Gala | db977ab | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 49 | SET_QMAN_LIODN(31), |
| 50 | SET_BMAN_LIODN(32), |
Kumar Gala | 58b2f96 | 2011-05-19 16:15:11 -0500 | [diff] [blame] | 51 | #endif |
Kumar Gala | db977ab | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 52 | SET_PME_LIODN(128), |
| 53 | }; |
Kumar Gala | 58b2f96 | 2011-05-19 16:15:11 -0500 | [diff] [blame] | 54 | int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl); |
Kumar Gala | db977ab | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 55 | |
| 56 | #ifdef CONFIG_SYS_DPAA_FMAN |
Igal Liberman | 97a8d01 | 2015-08-18 14:47:05 +0300 | [diff] [blame] | 57 | struct fman_liodn_id_table fman1_liodn_tbl[] = { |
Kumar Gala | db977ab | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 58 | SET_FMAN_RX_1G_LIODN(1, 0, 11), |
| 59 | SET_FMAN_RX_1G_LIODN(1, 1, 12), |
| 60 | SET_FMAN_RX_1G_LIODN(1, 2, 13), |
| 61 | SET_FMAN_RX_1G_LIODN(1, 3, 14), |
| 62 | SET_FMAN_RX_10G_LIODN(1, 0, 15), |
| 63 | }; |
Kumar Gala | 58b2f96 | 2011-05-19 16:15:11 -0500 | [diff] [blame] | 64 | int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl); |
Kumar Gala | db977ab | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 65 | |
| 66 | #if (CONFIG_SYS_NUM_FMAN == 2) |
Igal Liberman | 97a8d01 | 2015-08-18 14:47:05 +0300 | [diff] [blame] | 67 | struct fman_liodn_id_table fman2_liodn_tbl[] = { |
Kumar Gala | db977ab | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 68 | SET_FMAN_RX_1G_LIODN(2, 0, 16), |
| 69 | SET_FMAN_RX_1G_LIODN(2, 1, 17), |
| 70 | SET_FMAN_RX_1G_LIODN(2, 2, 18), |
| 71 | SET_FMAN_RX_1G_LIODN(2, 3, 19), |
| 72 | SET_FMAN_RX_10G_LIODN(2, 0, 20), |
| 73 | }; |
Kumar Gala | 58b2f96 | 2011-05-19 16:15:11 -0500 | [diff] [blame] | 74 | int fman2_liodn_tbl_sz = ARRAY_SIZE(fman2_liodn_tbl); |
Kumar Gala | db977ab | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 75 | #endif |
| 76 | #endif |
| 77 | |
| 78 | struct liodn_id_table sec_liodn_tbl[] = { |
Kim Phillips | e95a061 | 2010-09-03 10:57:31 -0500 | [diff] [blame] | 79 | /* |
| 80 | * We assume currently that all JR are in the same partition |
| 81 | * and as such they need to represent the same LIODN due to |
| 82 | * a 4080 rev.2 h/w requirement that DECOs sharing from themselves |
| 83 | * or from another DECO have the two Non-SEQ LIODN values equal |
| 84 | */ |
| 85 | SET_SEC_JR_LIODN_ENTRY(0, 146, 154), /* (0, 146, 154), */ |
| 86 | SET_SEC_JR_LIODN_ENTRY(1, 146, 154), /* (1, 147, 155), */ |
| 87 | SET_SEC_JR_LIODN_ENTRY(2, 146, 154), /* (2, 178, 186), */ |
| 88 | SET_SEC_JR_LIODN_ENTRY(3, 146, 154), /* (3, 179, 187), */ |
Kumar Gala | db977ab | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 89 | SET_SEC_RTIC_LIODN_ENTRY(a, 144), |
| 90 | SET_SEC_RTIC_LIODN_ENTRY(b, 145), |
| 91 | SET_SEC_RTIC_LIODN_ENTRY(c, 176), |
| 92 | SET_SEC_RTIC_LIODN_ENTRY(d, 177), |
| 93 | SET_SEC_DECO_LIODN_ENTRY(0, 129, 161), |
| 94 | SET_SEC_DECO_LIODN_ENTRY(1, 130, 162), |
| 95 | SET_SEC_DECO_LIODN_ENTRY(2, 131, 163), |
| 96 | SET_SEC_DECO_LIODN_ENTRY(3, 132, 164), |
| 97 | SET_SEC_DECO_LIODN_ENTRY(4, 133, 165), |
| 98 | }; |
Kumar Gala | 58b2f96 | 2011-05-19 16:15:11 -0500 | [diff] [blame] | 99 | int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl); |
Kumar Gala | db977ab | 2009-09-10 03:02:13 -0500 | [diff] [blame] | 100 | |
| 101 | struct liodn_id_table liodn_bases[] = { |
| 102 | [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(96, 106), |
| 103 | #ifdef CONFIG_SYS_DPAA_FMAN |
| 104 | [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(32), |
| 105 | #if (CONFIG_SYS_NUM_FMAN == 2) |
| 106 | [FSL_HW_PORTAL_FMAN2] = SET_LIODN_BASE_1(64), |
| 107 | #endif |
| 108 | #endif |
| 109 | #ifdef CONFIG_SYS_DPAA_PME |
| 110 | [FSL_HW_PORTAL_PME] = SET_LIODN_BASE_2(116, 133), |
| 111 | #endif |
| 112 | }; |