blob: 8f95e335d8240ceda6ca054b194d3ead155dfc73 [file] [log] [blame]
Shengzhou Liue6fb7702014-11-24 17:11:54 +08001/*
2 * Copyright 2014 Freescale Semiconductor, Inc.
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
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};
25#endif
26
27struct liodn_id_table liodn_tbl[] = {
28#ifdef CONFIG_SYS_DPAA_QBMAN
29 SET_QMAN_LIODN(62),
30 SET_BMAN_LIODN(63),
31#endif
32
33 SET_SDHC_LIODN(1, 552),
34
35 SET_USB_LIODN(1, "fsl-usb2-mph", 553),
36 SET_USB_LIODN(2, "fsl-usb2-dr", 554),
37
38 SET_SATA_LIODN(1, 555),
39
40 SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 1, 148),
41 SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 2, 228),
42 SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 3, 308),
43
Tudor Laurentiu7210d9a2014-11-20 12:09:31 +020044 SET_DMA_LIODN(1, "fsl,elo3-dma", 147),
45 SET_DMA_LIODN(2, "fsl,elo3-dma", 227),
Shengzhou Liue6fb7702014-11-24 17:11:54 +080046 /* SET_NEXUS_LIODN(557), -- not yet implemented */
47 SET_QE_LIODN(559),
48 SET_TDM_LIODN(560),
49};
50int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl);
51
52#ifdef CONFIG_SYS_DPAA_FMAN
Igal Libermane14ec992015-08-18 14:47:05 +030053struct fman_liodn_id_table fman1_liodn_tbl[] = {
Shengzhou Liu0e24d3a2015-05-14 16:51:39 +080054 SET_FMAN_RX_10G_TYPE2_LIODN(1, 0, 88),
Shengzhou Liue6fb7702014-11-24 17:11:54 +080055 SET_FMAN_RX_1G_LIODN(1, 1, 89),
56 SET_FMAN_RX_1G_LIODN(1, 2, 90),
57 SET_FMAN_RX_1G_LIODN(1, 3, 91),
Shengzhou Liue6fb7702014-11-24 17:11:54 +080058};
59int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl);
60#endif
61
62struct liodn_id_table sec_liodn_tbl[] = {
63 SET_SEC_JR_LIODN_ENTRY(0, 454, 458),
64 SET_SEC_JR_LIODN_ENTRY(1, 455, 459),
65 SET_SEC_JR_LIODN_ENTRY(2, 456, 460),
66 SET_SEC_JR_LIODN_ENTRY(3, 457, 461),
67 SET_SEC_RTIC_LIODN_ENTRY(a, 453),
68 SET_SEC_RTIC_LIODN_ENTRY(b, 549),
69 SET_SEC_RTIC_LIODN_ENTRY(c, 550),
70 SET_SEC_RTIC_LIODN_ENTRY(d, 551),
71 SET_SEC_DECO_LIODN_ENTRY(0, 541, 610),
72 SET_SEC_DECO_LIODN_ENTRY(1, 542, 611),
73};
74int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl);
75
76struct liodn_id_table liodn_bases[] = {
77 [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(462, 558),
78#ifdef CONFIG_SYS_DPAA_FMAN
79 [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(973),
80#endif
81};