blob: 5c287fbf4634b98416bce73b961a9b0024bd02e7 [file] [log] [blame]
Kumar Galadb977ab2009-09-10 03:02:13 -05001/*
Laurentiu TUDOR33e68352011-03-15 16:37:36 +02002 * Copyright 2010-2011 Freescale Semiconductor, Inc.
Kumar Galadb977ab2009-09-10 03:02:13 -05003 *
4 * See file CREDITS for list of people who contributed to this
5 * project.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA
21 */
22
23#include <common.h>
24#include <asm/fsl_portals.h>
25#include <asm/fsl_liodn.h>
26
Kumar Gala58b2f962011-05-19 16:15:11 -050027#ifdef CONFIG_SYS_DPAA_QBMAN
Kumar Galadb977ab2009-09-10 03:02:13 -050028struct qportal_info qp_info[CONFIG_SYS_QMAN_NUM_PORTALS] = {
29 /* dqrr liodn, frame data liodn, liodn off, sdest */
30 SET_QP_INFO( 1, 2, 1, 0),
31 SET_QP_INFO( 3, 4, 2, 1),
32 SET_QP_INFO( 5, 6, 3, 2),
33 SET_QP_INFO( 7, 8, 4, 3),
34 SET_QP_INFO( 9, 10, 5, 4),
35 SET_QP_INFO(11, 12, 6, 5),
36 SET_QP_INFO(13, 14, 7, 6),
37 SET_QP_INFO(15, 16, 8, 7),
38 SET_QP_INFO(17, 18, 9, 0), /* for now sdest to 0 */
39 SET_QP_INFO(19, 20, 10, 0), /* for now sdest to 0 */
40};
Kumar Gala58b2f962011-05-19 16:15:11 -050041#endif
Kumar Galadb977ab2009-09-10 03:02:13 -050042
Kumar Gala1a0c6422011-10-14 00:01:23 -050043struct srio_liodn_id_table srio_liodn_tbl[] = {
44 SET_SRIO_LIODN_1(1, 198),
45 SET_SRIO_LIODN_1(2, 199),
46};
47int srio_liodn_tbl_sz = ARRAY_SIZE(srio_liodn_tbl);
48
Kumar Galadb977ab2009-09-10 03:02:13 -050049struct liodn_id_table liodn_tbl[] = {
50 SET_USB_LIODN(1, "fsl-usb2-mph", 127),
51 SET_USB_LIODN(2, "fsl-usb2-dr", 157),
52
53 SET_SDHC_LIODN(1, 156),
54
Timur Tabi5c5befd2012-07-25 11:03:34 +000055 SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 1, 193),
56 SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 2, 194),
57 SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 3, 195),
Kumar Galadb977ab2009-09-10 03:02:13 -050058
59 SET_DMA_LIODN(1, 196),
60 SET_DMA_LIODN(2, 197),
61
Kumar Gala1a0c6422011-10-14 00:01:23 -050062 SET_GUTS_LIODN("fsl,srio-rmu", 200, rmuliodnr, 0xd3000),
Kumar Galadb977ab2009-09-10 03:02:13 -050063
Kumar Gala58b2f962011-05-19 16:15:11 -050064#ifdef CONFIG_SYS_DPAA_QBMAN
Kumar Galadb977ab2009-09-10 03:02:13 -050065 SET_QMAN_LIODN(31),
66 SET_BMAN_LIODN(32),
Kumar Gala58b2f962011-05-19 16:15:11 -050067#endif
Kumar Galadb977ab2009-09-10 03:02:13 -050068 SET_PME_LIODN(128),
69};
Kumar Gala58b2f962011-05-19 16:15:11 -050070int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl);
Kumar Galadb977ab2009-09-10 03:02:13 -050071
72#ifdef CONFIG_SYS_DPAA_FMAN
73struct liodn_id_table fman1_liodn_tbl[] = {
74 SET_FMAN_RX_1G_LIODN(1, 0, 11),
75 SET_FMAN_RX_1G_LIODN(1, 1, 12),
76 SET_FMAN_RX_1G_LIODN(1, 2, 13),
77 SET_FMAN_RX_1G_LIODN(1, 3, 14),
78 SET_FMAN_RX_10G_LIODN(1, 0, 15),
79};
Kumar Gala58b2f962011-05-19 16:15:11 -050080int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl);
Kumar Galadb977ab2009-09-10 03:02:13 -050081
82#if (CONFIG_SYS_NUM_FMAN == 2)
83struct liodn_id_table fman2_liodn_tbl[] = {
84 SET_FMAN_RX_1G_LIODN(2, 0, 16),
85 SET_FMAN_RX_1G_LIODN(2, 1, 17),
86 SET_FMAN_RX_1G_LIODN(2, 2, 18),
87 SET_FMAN_RX_1G_LIODN(2, 3, 19),
88 SET_FMAN_RX_10G_LIODN(2, 0, 20),
89};
Kumar Gala58b2f962011-05-19 16:15:11 -050090int fman2_liodn_tbl_sz = ARRAY_SIZE(fman2_liodn_tbl);
Kumar Galadb977ab2009-09-10 03:02:13 -050091#endif
92#endif
93
94struct liodn_id_table sec_liodn_tbl[] = {
Kim Phillipse95a0612010-09-03 10:57:31 -050095 /*
96 * We assume currently that all JR are in the same partition
97 * and as such they need to represent the same LIODN due to
98 * a 4080 rev.2 h/w requirement that DECOs sharing from themselves
99 * or from another DECO have the two Non-SEQ LIODN values equal
100 */
101 SET_SEC_JR_LIODN_ENTRY(0, 146, 154), /* (0, 146, 154), */
102 SET_SEC_JR_LIODN_ENTRY(1, 146, 154), /* (1, 147, 155), */
103 SET_SEC_JR_LIODN_ENTRY(2, 146, 154), /* (2, 178, 186), */
104 SET_SEC_JR_LIODN_ENTRY(3, 146, 154), /* (3, 179, 187), */
Kumar Galadb977ab2009-09-10 03:02:13 -0500105 SET_SEC_RTIC_LIODN_ENTRY(a, 144),
106 SET_SEC_RTIC_LIODN_ENTRY(b, 145),
107 SET_SEC_RTIC_LIODN_ENTRY(c, 176),
108 SET_SEC_RTIC_LIODN_ENTRY(d, 177),
109 SET_SEC_DECO_LIODN_ENTRY(0, 129, 161),
110 SET_SEC_DECO_LIODN_ENTRY(1, 130, 162),
111 SET_SEC_DECO_LIODN_ENTRY(2, 131, 163),
112 SET_SEC_DECO_LIODN_ENTRY(3, 132, 164),
113 SET_SEC_DECO_LIODN_ENTRY(4, 133, 165),
114};
Kumar Gala58b2f962011-05-19 16:15:11 -0500115int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl);
Kumar Galadb977ab2009-09-10 03:02:13 -0500116
117struct liodn_id_table liodn_bases[] = {
118 [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(96, 106),
119#ifdef CONFIG_SYS_DPAA_FMAN
120 [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(32),
121#if (CONFIG_SYS_NUM_FMAN == 2)
122 [FSL_HW_PORTAL_FMAN2] = SET_LIODN_BASE_1(64),
123#endif
124#endif
125#ifdef CONFIG_SYS_DPAA_PME
126 [FSL_HW_PORTAL_PME] = SET_LIODN_BASE_2(116, 133),
127#endif
128};