blob: 1a30f1c405e952bc826967427bd86a99d783ea53 [file] [log] [blame]
York Sund2404142012-10-08 07:44:20 +00001/*
2 * Copyright 2012 Freescale Semiconductor, Inc.
3 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02004 * SPDX-License-Identifier: GPL-2.0+
York Sund2404142012-10-08 07:44:20 +00005 */
6
7#include <common.h>
8#include <asm/fsl_portals.h>
9#include <asm/fsl_liodn.h>
10
11#ifdef CONFIG_SYS_DPAA_QBMAN
12struct qportal_info qp_info[CONFIG_SYS_QMAN_NUM_PORTALS] = {
13 /* dqrr liodn, frame data liodn, liodn off, sdest */
14 SET_QP_INFO(1, 27, 1, 0),
15 SET_QP_INFO(2, 28, 1, 0),
16 SET_QP_INFO(3, 29, 1, 1),
17 SET_QP_INFO(4, 30, 1, 1),
18 SET_QP_INFO(5, 31, 1, 2),
19 SET_QP_INFO(6, 32, 1, 2),
20 SET_QP_INFO(7, 33, 1, 3),
21 SET_QP_INFO(8, 34, 1, 3),
22 SET_QP_INFO(9, 35, 1, 0),
23 SET_QP_INFO(10, 36, 1, 0),
24 SET_QP_INFO(11, 37, 1, 1),
25 SET_QP_INFO(12, 38, 1, 1),
26 SET_QP_INFO(13, 39, 1, 2),
27 SET_QP_INFO(14, 40, 1, 2),
28 SET_QP_INFO(15, 41, 1, 3),
29 SET_QP_INFO(16, 42, 1, 3),
30 SET_QP_INFO(17, 43, 1, 0),
31 SET_QP_INFO(18, 44, 1, 0),
32 SET_QP_INFO(19, 45, 1, 1),
33 SET_QP_INFO(20, 46, 1, 1),
34 SET_QP_INFO(21, 47, 1, 2),
35 SET_QP_INFO(22, 48, 1, 2),
36 SET_QP_INFO(23, 49, 1, 3),
37 SET_QP_INFO(24, 50, 1, 3),
38 SET_QP_INFO(25, 51, 1, 0),
39};
40#endif
41
Poonam Aggrwale1dbdd82012-12-23 19:24:16 +000042#ifdef CONFIG_SYS_SRIO
York Sund2404142012-10-08 07:44:20 +000043struct srio_liodn_id_table srio_liodn_tbl[] = {
Liu Gang32f38ee2013-06-25 18:12:13 +080044 SET_SRIO_LIODN_BASE(1, 307),
45 SET_SRIO_LIODN_BASE(2, 387),
York Sund2404142012-10-08 07:44:20 +000046};
47int srio_liodn_tbl_sz = ARRAY_SIZE(srio_liodn_tbl);
Poonam Aggrwale1dbdd82012-12-23 19:24:16 +000048#endif
York Sund2404142012-10-08 07:44:20 +000049
50struct liodn_id_table liodn_tbl[] = {
51#ifdef CONFIG_SYS_DPAA_QBMAN
52 SET_QMAN_LIODN(62),
53 SET_BMAN_LIODN(63),
54#endif
55
56 SET_SDHC_LIODN(1, 552),
57
ramneek mehresha53dd532014-08-21 17:52:17 +053058 SET_USB_LIODN(1, "fsl-usb2-dr", 553),
York Sund2404142012-10-08 07:44:20 +000059
60 SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 1, 148),
61
62 SET_DMA_LIODN(1, 147),
63 SET_DMA_LIODN(2, 227),
64
Poonam Aggrwale1dbdd82012-12-23 19:24:16 +000065#ifndef CONFIG_PPC_B4420
York Sund2404142012-10-08 07:44:20 +000066 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),
Poonam Aggrwale1dbdd82012-12-23 19:24:16 +000070#endif
York Sund2404142012-10-08 07:44:20 +000071
72 /* SET_NEXUS_LIODN(557), -- not yet implemented */
73};
74int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl);
75
76#ifdef CONFIG_SYS_DPAA_FMAN
77struct liodn_id_table fman1_liodn_tbl[] = {
78 SET_FMAN_RX_1G_LIODN(1, 0, 88),
79 SET_FMAN_RX_1G_LIODN(1, 1, 89),
80 SET_FMAN_RX_1G_LIODN(1, 2, 90),
81 SET_FMAN_RX_1G_LIODN(1, 3, 91),
82 SET_FMAN_RX_1G_LIODN(1, 4, 92),
83 SET_FMAN_RX_1G_LIODN(1, 5, 93),
Poonam Aggrwale1dbdd82012-12-23 19:24:16 +000084#ifndef CONFIG_PPC_B4420
York Sund2404142012-10-08 07:44:20 +000085 SET_FMAN_RX_10G_LIODN(1, 0, 94),
86 SET_FMAN_RX_10G_LIODN(1, 1, 95),
Poonam Aggrwale1dbdd82012-12-23 19:24:16 +000087#endif
York Sund2404142012-10-08 07:44:20 +000088};
89int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl);
90#endif
91
92struct liodn_id_table sec_liodn_tbl[] = {
93 SET_SEC_JR_LIODN_ENTRY(0, 454, 458),
94 SET_SEC_JR_LIODN_ENTRY(1, 455, 459),
95 SET_SEC_JR_LIODN_ENTRY(2, 456, 460),
96 SET_SEC_JR_LIODN_ENTRY(3, 457, 461),
97 SET_SEC_RTIC_LIODN_ENTRY(a, 453),
98 SET_SEC_RTIC_LIODN_ENTRY(b, 549),
99 SET_SEC_RTIC_LIODN_ENTRY(c, 550),
100 SET_SEC_RTIC_LIODN_ENTRY(d, 551),
101 SET_SEC_DECO_LIODN_ENTRY(0, 541, 610),
102 SET_SEC_DECO_LIODN_ENTRY(1, 542, 611),
103 SET_SEC_DECO_LIODN_ENTRY(2, 543, 612),
104 SET_SEC_DECO_LIODN_ENTRY(3, 544, 613),
105 SET_SEC_DECO_LIODN_ENTRY(4, 545, 614),
106 SET_SEC_DECO_LIODN_ENTRY(5, 546, 615),
107 SET_SEC_DECO_LIODN_ENTRY(6, 547, 616),
108 SET_SEC_DECO_LIODN_ENTRY(7, 548, 617),
109};
110int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl);
111
112#ifdef CONFIG_SYS_DPAA_RMAN
113struct liodn_id_table rman_liodn_tbl[] = {
114 /* Set RMan block 0-3 liodn offset */
Minghuan Lian0795eff2013-07-03 18:32:41 +0800115 SET_RMAN_LIODN(0, 6),
116 SET_RMAN_LIODN(1, 7),
117 SET_RMAN_LIODN(2, 8),
118 SET_RMAN_LIODN(3, 9),
York Sund2404142012-10-08 07:44:20 +0000119};
120int rman_liodn_tbl_sz = ARRAY_SIZE(rman_liodn_tbl);
121#endif
122
123struct liodn_id_table liodn_bases[] = {
124 [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(462, 558),
125#ifdef CONFIG_SYS_DPAA_FMAN
126 [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(973),
127#endif
128#ifdef CONFIG_SYS_DPAA_RMAN
129 [FSL_HW_PORTAL_RMAN] = SET_LIODN_BASE_1(922),
130#endif
131};