Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Mingkai Hu | 4a75bb3 | 2011-04-15 15:18:03 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2011 Freescale Semiconductor, Inc. |
Mingkai Hu | 4a75bb3 | 2011-04-15 15:18:03 +0800 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include <common.h> |
| 7 | #include <asm/fsl_portals.h> |
| 8 | #include <asm/fsl_liodn.h> |
| 9 | |
| 10 | #ifdef CONFIG_SYS_DPAA_QBMAN |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 11 | struct qportal_info qp_info[CFG_SYS_QMAN_NUM_PORTALS] = { |
Mingkai Hu | 4a75bb3 | 2011-04-15 15:18:03 +0800 | [diff] [blame] | 12 | /* dqrr liodn, frame data liodn, liodn off, sdest */ |
Cristian Sovaiala | 060c491 | 2013-03-25 07:30:12 +0000 | [diff] [blame] | 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, 0), |
| 18 | SET_QP_INFO(11, 12, 6, 1), |
| 19 | SET_QP_INFO(13, 14, 7, 2), |
| 20 | SET_QP_INFO(15, 16, 8, 3), |
| 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 */ |
Mingkai Hu | 4a75bb3 | 2011-04-15 15:18:03 +0800 | [diff] [blame] | 23 | }; |
| 24 | #endif |
| 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_2(1, 199, 200), |
| 28 | SET_SRIO_LIODN_2(2, 201, 202), |
| 29 | }; |
| 30 | int srio_liodn_tbl_sz = ARRAY_SIZE(srio_liodn_tbl); |
| 31 | |
Mingkai Hu | 4a75bb3 | 2011-04-15 15:18:03 +0800 | [diff] [blame] | 32 | struct liodn_id_table liodn_tbl[] = { |
| 33 | #ifdef CONFIG_SYS_DPAA_QBMAN |
| 34 | SET_QMAN_LIODN(31), |
| 35 | SET_BMAN_LIODN(32), |
| 36 | #endif |
| 37 | |
| 38 | SET_SDHC_LIODN(1, 64), |
| 39 | |
| 40 | SET_PME_LIODN(117), |
| 41 | |
| 42 | SET_USB_LIODN(1, "fsl-usb2-mph", 125), |
| 43 | SET_USB_LIODN(2, "fsl-usb2-dr", 126), |
| 44 | |
| 45 | SET_SATA_LIODN(1, 127), |
| 46 | SET_SATA_LIODN(2, 128), |
| 47 | |
Timur Tabi | 913b6e6 | 2012-07-25 11:03:34 +0000 | [diff] [blame] | 48 | SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 1, 193), |
| 49 | SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 2, 194), |
| 50 | SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 3, 195), |
Mingkai Hu | 4a75bb3 | 2011-04-15 15:18:03 +0800 | [diff] [blame] | 51 | |
Tudor Laurentiu | 7210d9a | 2014-11-20 12:09:31 +0200 | [diff] [blame] | 52 | SET_DMA_LIODN(1, "fsl,eloplus-dma", 197), |
| 53 | SET_DMA_LIODN(2, "fsl,eloplus-dma", 198), |
Mingkai Hu | 4a75bb3 | 2011-04-15 15:18:03 +0800 | [diff] [blame] | 54 | |
| 55 | SET_GUTS_LIODN("fsl,rapidio-delta", 199, rio1liodnr, 0), |
| 56 | SET_GUTS_LIODN(NULL, 200, rio2liodnr, 0), |
| 57 | SET_GUTS_LIODN(NULL, 201, rio1maintliodnr, 0), |
| 58 | SET_GUTS_LIODN(NULL, 202, rio2maintliodnr, 0), |
| 59 | }; |
| 60 | int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl); |
| 61 | |
| 62 | #ifdef CONFIG_SYS_DPAA_FMAN |
Igal Liberman | e14ec99 | 2015-08-18 14:47:05 +0300 | [diff] [blame] | 63 | struct fman_liodn_id_table fman1_liodn_tbl[] = { |
Mingkai Hu | 4a75bb3 | 2011-04-15 15:18:03 +0800 | [diff] [blame] | 64 | SET_FMAN_RX_1G_LIODN(1, 0, 10), |
| 65 | SET_FMAN_RX_1G_LIODN(1, 1, 11), |
| 66 | SET_FMAN_RX_1G_LIODN(1, 2, 12), |
| 67 | SET_FMAN_RX_1G_LIODN(1, 3, 13), |
| 68 | SET_FMAN_RX_1G_LIODN(1, 4, 14), |
Tom Rini | 0a2bac7 | 2022-11-16 13:10:29 -0500 | [diff] [blame] | 69 | #if (CFG_SYS_NUM_FM1_10GEC == 1) |
Kumar Gala | 619541b | 2011-05-13 01:16:07 -0500 | [diff] [blame] | 70 | SET_FMAN_RX_10G_LIODN(1, 0, 15), |
| 71 | #endif |
Mingkai Hu | 4a75bb3 | 2011-04-15 15:18:03 +0800 | [diff] [blame] | 72 | }; |
| 73 | int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl); |
| 74 | #endif |
| 75 | |
| 76 | struct liodn_id_table sec_liodn_tbl[] = { |
| 77 | SET_SEC_JR_LIODN_ENTRY(0, 129, 130), |
| 78 | SET_SEC_JR_LIODN_ENTRY(1, 131, 132), |
| 79 | SET_SEC_JR_LIODN_ENTRY(2, 133, 134), |
| 80 | SET_SEC_JR_LIODN_ENTRY(3, 135, 136), |
| 81 | SET_SEC_RTIC_LIODN_ENTRY(a, 154), |
| 82 | SET_SEC_RTIC_LIODN_ENTRY(b, 155), |
| 83 | SET_SEC_RTIC_LIODN_ENTRY(c, 156), |
| 84 | SET_SEC_RTIC_LIODN_ENTRY(d, 157), |
| 85 | SET_SEC_DECO_LIODN_ENTRY(0, 97, 98), |
| 86 | SET_SEC_DECO_LIODN_ENTRY(1, 99, 100), |
| 87 | }; |
| 88 | int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl); |
| 89 | |
Kumar Gala | 4eb3c37 | 2011-10-14 13:28:52 -0500 | [diff] [blame] | 90 | #ifdef CONFIG_SYS_DPAA_RMAN |
| 91 | struct liodn_id_table rman_liodn_tbl[] = { |
| 92 | /* Set RMan block 0-3 liodn offset */ |
| 93 | SET_RMAN_LIODN(0, 6), |
| 94 | SET_RMAN_LIODN(1, 7), |
| 95 | SET_RMAN_LIODN(2, 8), |
| 96 | SET_RMAN_LIODN(3, 9), |
| 97 | }; |
| 98 | int rman_liodn_tbl_sz = ARRAY_SIZE(rman_liodn_tbl); |
| 99 | #endif |
| 100 | |
Mingkai Hu | 4a75bb3 | 2011-04-15 15:18:03 +0800 | [diff] [blame] | 101 | struct liodn_id_table liodn_bases[] = { |
| 102 | [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(64, 100), |
| 103 | #ifdef CONFIG_SYS_DPAA_FMAN |
| 104 | [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(32), |
| 105 | #endif |
| 106 | #ifdef CONFIG_SYS_DPAA_PME |
| 107 | [FSL_HW_PORTAL_PME] = SET_LIODN_BASE_2(136, 172), |
| 108 | #endif |
Kumar Gala | 4eb3c37 | 2011-10-14 13:28:52 -0500 | [diff] [blame] | 109 | #ifdef CONFIG_SYS_DPAA_RMAN |
| 110 | [FSL_HW_PORTAL_RMAN] = SET_LIODN_BASE_1(80), |
| 111 | #endif |
Mingkai Hu | 4a75bb3 | 2011-04-15 15:18:03 +0800 | [diff] [blame] | 112 | }; |