blob: 99e3e91e45ada083b1b2ac94b707ec70436267f1 [file] [log] [blame]
Kumar Gala1eda59f2010-07-08 05:24:44 -05001/*
Laurentiu TUDOR33e68352011-03-15 16:37:36 +02002 * Copyright 2010-2011 Freescale Semiconductor, Inc.
Kumar Gala1eda59f2010-07-08 05:24:44 -05003 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02004 * SPDX-License-Identifier: GPL-2.0+
Kumar Gala1eda59f2010-07-08 05:24:44 -05005 */
6
7#include <common.h>
8#include <asm/fsl_portals.h>
9#include <asm/fsl_liodn.h>
10
Kumar Gala58b2f962011-05-19 16:15:11 -050011#ifdef CONFIG_SYS_DPAA_QBMAN
Kumar Gala1eda59f2010-07-08 05:24:44 -050012struct qportal_info qp_info[CONFIG_SYS_QMAN_NUM_PORTALS] = {
13 /* dqrr liodn, frame data liodn, liodn off, sdest */
Cristian Sovaiala1f06c9a2013-03-25 07:30:12 +000014 SET_QP_INFO(1, 2, 1, 0),
15 SET_QP_INFO(3, 4, 2, 1),
16 SET_QP_INFO(5, 6, 3, 0),
17 SET_QP_INFO(7, 8, 4, 1),
18 SET_QP_INFO(9, 10, 5, 0),
19 SET_QP_INFO(11, 12, 6, 1),
20 SET_QP_INFO(13, 14, 7, 0),
21 SET_QP_INFO(15, 16, 8, 1),
22 SET_QP_INFO(17, 18, 9, 0),
23 SET_QP_INFO(19, 20, 10, 1),
Kumar Gala1eda59f2010-07-08 05:24:44 -050024};
Kumar Gala58b2f962011-05-19 16:15:11 -050025#endif
Kumar Gala1eda59f2010-07-08 05:24:44 -050026
Kumar Gala1a0c6422011-10-14 00:01:23 -050027struct srio_liodn_id_table srio_liodn_tbl[] = {
28 SET_SRIO_LIODN_2(1, 199, 200),
29 SET_SRIO_LIODN_2(2, 201, 202),
30};
31int srio_liodn_tbl_sz = ARRAY_SIZE(srio_liodn_tbl);
32
Kumar Gala1eda59f2010-07-08 05:24:44 -050033struct liodn_id_table liodn_tbl[] = {
Kumar Gala58b2f962011-05-19 16:15:11 -050034#ifdef CONFIG_SYS_DPAA_QBMAN
Kumar Gala1eda59f2010-07-08 05:24:44 -050035 SET_QMAN_LIODN(31),
36 SET_BMAN_LIODN(32),
Kumar Gala58b2f962011-05-19 16:15:11 -050037#endif
Kumar Gala1eda59f2010-07-08 05:24:44 -050038
39 SET_SDHC_LIODN(1, 64),
40
41 SET_PME_LIODN(117),
42
43 SET_USB_LIODN(1, "fsl-usb2-mph", 125),
44 SET_USB_LIODN(2, "fsl-usb2-dr", 126),
45
46 SET_SATA_LIODN(1, 127),
47 SET_SATA_LIODN(2, 128),
48
Timur Tabi5c5befd2012-07-25 11:03:34 +000049 SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 1, 193),
50 SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 2, 194),
51 SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 3, 195),
52 SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 4, 196),
Kumar Gala1eda59f2010-07-08 05:24:44 -050053
Tudor Laurentiu8d3eaa92014-11-20 12:09:31 +020054 SET_DMA_LIODN(1, "fsl,eloplus-dma", 197),
55 SET_DMA_LIODN(2, "fsl,eloplus-dma", 198),
Kumar Gala1eda59f2010-07-08 05:24:44 -050056
57 SET_GUTS_LIODN("fsl,rapidio-delta", 199, rio1liodnr, 0),
58 SET_GUTS_LIODN(NULL, 200, rio2liodnr, 0),
59 SET_GUTS_LIODN(NULL, 201, rio1maintliodnr, 0),
60 SET_GUTS_LIODN(NULL, 202, rio2maintliodnr, 0),
61};
Kumar Gala58b2f962011-05-19 16:15:11 -050062int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl);
Kumar Gala1eda59f2010-07-08 05:24:44 -050063
64#ifdef CONFIG_SYS_DPAA_FMAN
Igal Liberman97a8d012015-08-18 14:47:05 +030065struct fman_liodn_id_table fman1_liodn_tbl[] = {
Kumar Gala1eda59f2010-07-08 05:24:44 -050066 SET_FMAN_RX_1G_LIODN(1, 0, 10),
67 SET_FMAN_RX_1G_LIODN(1, 1, 11),
68 SET_FMAN_RX_1G_LIODN(1, 2, 12),
69 SET_FMAN_RX_1G_LIODN(1, 3, 13),
70 SET_FMAN_RX_1G_LIODN(1, 4, 14),
71 SET_FMAN_RX_10G_LIODN(1, 0, 15),
72};
Kumar Gala58b2f962011-05-19 16:15:11 -050073int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl);
Kumar Gala1eda59f2010-07-08 05:24:44 -050074#endif
75
76struct 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};
Kumar Gala58b2f962011-05-19 16:15:11 -050088int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl);
Kumar Gala1eda59f2010-07-08 05:24:44 -050089
Kumar Gala6b3a8d02011-09-10 10:44:13 -050090#ifdef CONFIG_SYS_FSL_RAID_ENGINE
91struct liodn_id_table raide_liodn_tbl[] = {
92 SET_RAID_ENGINE_JQ_LIODN_ENTRY(0, 0, 60),
93 SET_RAID_ENGINE_JQ_LIODN_ENTRY(0, 1, 61),
94 SET_RAID_ENGINE_JQ_LIODN_ENTRY(1, 0, 62),
95 SET_RAID_ENGINE_JQ_LIODN_ENTRY(1, 1, 63),
96};
97int raide_liodn_tbl_sz = ARRAY_SIZE(raide_liodn_tbl);
98#endif
99
Kumar Gala4d28db82011-10-14 13:28:52 -0500100#ifdef CONFIG_SYS_DPAA_RMAN
101struct liodn_id_table rman_liodn_tbl[] = {
102 /* Set RMan block 0-3 liodn offset */
103 SET_RMAN_LIODN(0, 6),
104 SET_RMAN_LIODN(1, 7),
105 SET_RMAN_LIODN(2, 8),
106 SET_RMAN_LIODN(3, 9),
107};
108int rman_liodn_tbl_sz = ARRAY_SIZE(rman_liodn_tbl);
109#endif
110
Kumar Gala1eda59f2010-07-08 05:24:44 -0500111struct liodn_id_table liodn_bases[] = {
112 [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(64, 100),
113#ifdef CONFIG_SYS_DPAA_FMAN
114 [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(32),
115#endif
116#ifdef CONFIG_SYS_DPAA_PME
117 [FSL_HW_PORTAL_PME] = SET_LIODN_BASE_2(136, 172),
118#endif
Kumar Gala6b3a8d02011-09-10 10:44:13 -0500119#ifdef CONFIG_SYS_FSL_RAID_ENGINE
120 [FSL_HW_PORTAL_RAID_ENGINE] = SET_LIODN_BASE_1(47),
121#endif
Kumar Gala4d28db82011-10-14 13:28:52 -0500122#ifdef CONFIG_SYS_DPAA_RMAN
123 [FSL_HW_PORTAL_RMAN] = SET_LIODN_BASE_1(80),
124#endif
Kumar Gala1eda59f2010-07-08 05:24:44 -0500125};