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