blob: e00aa0c20d82a7c97d3229ee7c4945e7e2c9f066 [file] [log] [blame]
Mingkai Hu526cbff2011-04-15 15:18:03 +08001/*
2 * Copyright 2011 Freescale Semiconductor, Inc.
3 *
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
27#ifdef CONFIG_SYS_DPAA_QBMAN
28struct 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( 0, 0, 0, 5),
36 SET_QP_INFO( 0, 0, 0, 6),
37 SET_QP_INFO( 0, 0, 0, 7),
38 SET_QP_INFO( 0, 0, 0, 0), /* for now sdest to 0 */
39 SET_QP_INFO( 0, 0, 0, 0), /* for now sdest to 0 */
40};
41#endif
42
43struct liodn_id_table liodn_tbl[] = {
44#ifdef CONFIG_SYS_DPAA_QBMAN
45 SET_QMAN_LIODN(31),
46 SET_BMAN_LIODN(32),
47#endif
48
49 SET_SDHC_LIODN(1, 64),
50
51 SET_PME_LIODN(117),
52
53 SET_USB_LIODN(1, "fsl-usb2-mph", 125),
54 SET_USB_LIODN(2, "fsl-usb2-dr", 126),
55
56 SET_SATA_LIODN(1, 127),
57 SET_SATA_LIODN(2, 128),
58
59 SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 1, 193),
60 SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 2, 194),
61 SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 3, 195),
62
63 SET_DMA_LIODN(1, 197),
64 SET_DMA_LIODN(2, 198),
65
66 SET_GUTS_LIODN("fsl,rapidio-delta", 199, rio1liodnr, 0),
67 SET_GUTS_LIODN(NULL, 200, rio2liodnr, 0),
68 SET_GUTS_LIODN(NULL, 201, rio1maintliodnr, 0),
69 SET_GUTS_LIODN(NULL, 202, rio2maintliodnr, 0),
70};
71int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl);
72
73#ifdef CONFIG_SYS_DPAA_FMAN
74struct liodn_id_table fman1_liodn_tbl[] = {
75 SET_FMAN_RX_1G_LIODN(1, 0, 10),
76 SET_FMAN_RX_1G_LIODN(1, 1, 11),
77 SET_FMAN_RX_1G_LIODN(1, 2, 12),
78 SET_FMAN_RX_1G_LIODN(1, 3, 13),
79 SET_FMAN_RX_1G_LIODN(1, 4, 14),
80};
81int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl);
82#endif
83
84struct liodn_id_table sec_liodn_tbl[] = {
85 SET_SEC_JR_LIODN_ENTRY(0, 129, 130),
86 SET_SEC_JR_LIODN_ENTRY(1, 131, 132),
87 SET_SEC_JR_LIODN_ENTRY(2, 133, 134),
88 SET_SEC_JR_LIODN_ENTRY(3, 135, 136),
89 SET_SEC_RTIC_LIODN_ENTRY(a, 154),
90 SET_SEC_RTIC_LIODN_ENTRY(b, 155),
91 SET_SEC_RTIC_LIODN_ENTRY(c, 156),
92 SET_SEC_RTIC_LIODN_ENTRY(d, 157),
93 SET_SEC_DECO_LIODN_ENTRY(0, 97, 98),
94 SET_SEC_DECO_LIODN_ENTRY(1, 99, 100),
95};
96int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl);
97
98struct liodn_id_table liodn_bases[] = {
99 [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(64, 100),
100#ifdef CONFIG_SYS_DPAA_FMAN
101 [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(32),
102#endif
103#ifdef CONFIG_SYS_DPAA_PME
104 [FSL_HW_PORTAL_PME] = SET_LIODN_BASE_2(136, 172),
105#endif
106};