blob: 575b604c21155e5c8f74c1798f9adeb302bf7df4 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Kumar Galacdbe63d2010-07-08 05:24:44 -05002/*
Laurentiu TUDOR960f87f2011-03-15 16:37:36 +02003 * Copyright 2010-2011 Freescale Semiconductor, Inc.
Kumar Galacdbe63d2010-07-08 05:24:44 -05004 */
5
6#include <common.h>
7#include <asm/fsl_portals.h>
8#include <asm/fsl_liodn.h>
9
Kumar Gala9edb2412011-05-19 16:15:11 -050010#ifdef CONFIG_SYS_DPAA_QBMAN
Kumar Galacdbe63d2010-07-08 05:24:44 -050011struct qportal_info qp_info[CONFIG_SYS_QMAN_NUM_PORTALS] = {
12 /* dqrr liodn, frame data liodn, liodn off, sdest */
Cristian Sovaiala060c4912013-03-25 07:30:12 +000013 SET_QP_INFO(1, 2, 1, 0),
14 SET_QP_INFO(3, 4, 2, 1),
15 SET_QP_INFO(5, 6, 3, 0),
16 SET_QP_INFO(7, 8, 4, 1),
17 SET_QP_INFO(9, 10, 5, 0),
18 SET_QP_INFO(11, 12, 6, 1),
19 SET_QP_INFO(13, 14, 7, 0),
20 SET_QP_INFO(15, 16, 8, 1),
21 SET_QP_INFO(17, 18, 9, 0),
22 SET_QP_INFO(19, 20, 10, 1),
Kumar Galacdbe63d2010-07-08 05:24:44 -050023};
Kumar Gala9edb2412011-05-19 16:15:11 -050024#endif
Kumar Galacdbe63d2010-07-08 05:24:44 -050025
Kumar Gala2b2b6962011-10-14 00:01:23 -050026struct srio_liodn_id_table srio_liodn_tbl[] = {
27 SET_SRIO_LIODN_2(1, 199, 200),
28 SET_SRIO_LIODN_2(2, 201, 202),
29};
30int srio_liodn_tbl_sz = ARRAY_SIZE(srio_liodn_tbl);
31
Kumar Galacdbe63d2010-07-08 05:24:44 -050032struct liodn_id_table liodn_tbl[] = {
Kumar Gala9edb2412011-05-19 16:15:11 -050033#ifdef CONFIG_SYS_DPAA_QBMAN
Kumar Galacdbe63d2010-07-08 05:24:44 -050034 SET_QMAN_LIODN(31),
35 SET_BMAN_LIODN(32),
Kumar Gala9edb2412011-05-19 16:15:11 -050036#endif
Kumar Galacdbe63d2010-07-08 05:24:44 -050037
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 Tabi913b6e62012-07-25 11:03:34 +000048 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),
51 SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 4, 196),
Kumar Galacdbe63d2010-07-08 05:24:44 -050052
Tudor Laurentiu7210d9a2014-11-20 12:09:31 +020053 SET_DMA_LIODN(1, "fsl,eloplus-dma", 197),
54 SET_DMA_LIODN(2, "fsl,eloplus-dma", 198),
Kumar Galacdbe63d2010-07-08 05:24:44 -050055
56 SET_GUTS_LIODN("fsl,rapidio-delta", 199, rio1liodnr, 0),
57 SET_GUTS_LIODN(NULL, 200, rio2liodnr, 0),
58 SET_GUTS_LIODN(NULL, 201, rio1maintliodnr, 0),
59 SET_GUTS_LIODN(NULL, 202, rio2maintliodnr, 0),
60};
Kumar Gala9edb2412011-05-19 16:15:11 -050061int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl);
Kumar Galacdbe63d2010-07-08 05:24:44 -050062
63#ifdef CONFIG_SYS_DPAA_FMAN
Igal Libermane14ec992015-08-18 14:47:05 +030064struct fman_liodn_id_table fman1_liodn_tbl[] = {
Kumar Galacdbe63d2010-07-08 05:24:44 -050065 SET_FMAN_RX_1G_LIODN(1, 0, 10),
66 SET_FMAN_RX_1G_LIODN(1, 1, 11),
67 SET_FMAN_RX_1G_LIODN(1, 2, 12),
68 SET_FMAN_RX_1G_LIODN(1, 3, 13),
69 SET_FMAN_RX_1G_LIODN(1, 4, 14),
70 SET_FMAN_RX_10G_LIODN(1, 0, 15),
71};
Kumar Gala9edb2412011-05-19 16:15:11 -050072int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl);
Kumar Galacdbe63d2010-07-08 05:24:44 -050073#endif
74
75struct liodn_id_table sec_liodn_tbl[] = {
76 SET_SEC_JR_LIODN_ENTRY(0, 129, 130),
77 SET_SEC_JR_LIODN_ENTRY(1, 131, 132),
78 SET_SEC_JR_LIODN_ENTRY(2, 133, 134),
79 SET_SEC_JR_LIODN_ENTRY(3, 135, 136),
80 SET_SEC_RTIC_LIODN_ENTRY(a, 154),
81 SET_SEC_RTIC_LIODN_ENTRY(b, 155),
82 SET_SEC_RTIC_LIODN_ENTRY(c, 156),
83 SET_SEC_RTIC_LIODN_ENTRY(d, 157),
84 SET_SEC_DECO_LIODN_ENTRY(0, 97, 98),
85 SET_SEC_DECO_LIODN_ENTRY(1, 99, 100),
86};
Kumar Gala9edb2412011-05-19 16:15:11 -050087int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl);
Kumar Galacdbe63d2010-07-08 05:24:44 -050088
Kumar Gala9d8e8132011-09-10 10:44:13 -050089#ifdef CONFIG_SYS_FSL_RAID_ENGINE
90struct liodn_id_table raide_liodn_tbl[] = {
91 SET_RAID_ENGINE_JQ_LIODN_ENTRY(0, 0, 60),
92 SET_RAID_ENGINE_JQ_LIODN_ENTRY(0, 1, 61),
93 SET_RAID_ENGINE_JQ_LIODN_ENTRY(1, 0, 62),
94 SET_RAID_ENGINE_JQ_LIODN_ENTRY(1, 1, 63),
95};
96int raide_liodn_tbl_sz = ARRAY_SIZE(raide_liodn_tbl);
97#endif
98
Kumar Gala4eb3c372011-10-14 13:28:52 -050099#ifdef CONFIG_SYS_DPAA_RMAN
100struct liodn_id_table rman_liodn_tbl[] = {
101 /* Set RMan block 0-3 liodn offset */
102 SET_RMAN_LIODN(0, 6),
103 SET_RMAN_LIODN(1, 7),
104 SET_RMAN_LIODN(2, 8),
105 SET_RMAN_LIODN(3, 9),
106};
107int rman_liodn_tbl_sz = ARRAY_SIZE(rman_liodn_tbl);
108#endif
109
Kumar Galacdbe63d2010-07-08 05:24:44 -0500110struct liodn_id_table liodn_bases[] = {
111 [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(64, 100),
112#ifdef CONFIG_SYS_DPAA_FMAN
113 [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(32),
114#endif
115#ifdef CONFIG_SYS_DPAA_PME
116 [FSL_HW_PORTAL_PME] = SET_LIODN_BASE_2(136, 172),
117#endif
Kumar Gala9d8e8132011-09-10 10:44:13 -0500118#ifdef CONFIG_SYS_FSL_RAID_ENGINE
119 [FSL_HW_PORTAL_RAID_ENGINE] = SET_LIODN_BASE_1(47),
120#endif
Kumar Gala4eb3c372011-10-14 13:28:52 -0500121#ifdef CONFIG_SYS_DPAA_RMAN
122 [FSL_HW_PORTAL_RMAN] = SET_LIODN_BASE_1(80),
123#endif
Kumar Galacdbe63d2010-07-08 05:24:44 -0500124};