York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2012 Freescale Semiconductor, Inc. |
| 3 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 4 | * SPDX-License-Identifier: GPL-2.0+ |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 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 |
| 12 | struct 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), |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 24 | }; |
| 25 | #endif |
| 26 | |
| 27 | struct srio_liodn_id_table srio_liodn_tbl[] = { |
| 28 | SET_SRIO_LIODN_1(1, 307), |
| 29 | SET_SRIO_LIODN_1(2, 387), |
| 30 | }; |
| 31 | int srio_liodn_tbl_sz = ARRAY_SIZE(srio_liodn_tbl); |
| 32 | |
| 33 | struct liodn_id_table liodn_tbl[] = { |
| 34 | #ifdef CONFIG_SYS_DPAA_QBMAN |
| 35 | SET_QMAN_LIODN(62), |
| 36 | SET_BMAN_LIODN(63), |
| 37 | #endif |
| 38 | |
| 39 | SET_SDHC_LIODN(1, 552), |
| 40 | |
| 41 | SET_USB_LIODN(1, "fsl-usb2-mph", 553), |
| 42 | |
| 43 | SET_PCI_LIODN("fsl,qoriq-pcie-v2.2", 1, 148), |
| 44 | |
| 45 | SET_DMA_LIODN(1, 147), |
| 46 | SET_DMA_LIODN(2, 227), |
| 47 | |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 48 | /* SET_NEXUS_LIODN(557), -- not yet implemented */ |
Zhao Qiang | b818ba2 | 2014-03-21 16:21:45 +0800 | [diff] [blame] | 49 | SET_QE_LIODN(559), |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 50 | }; |
| 51 | int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl); |
| 52 | |
| 53 | #ifdef CONFIG_SYS_DPAA_FMAN |
| 54 | struct liodn_id_table fman1_liodn_tbl[] = { |
| 55 | SET_FMAN_RX_1G_LIODN(1, 0, 88), |
| 56 | SET_FMAN_RX_1G_LIODN(1, 1, 89), |
| 57 | SET_FMAN_RX_1G_LIODN(1, 2, 90), |
| 58 | SET_FMAN_RX_1G_LIODN(1, 3, 91), |
| 59 | SET_FMAN_RX_1G_LIODN(1, 4, 92), |
| 60 | SET_FMAN_RX_1G_LIODN(1, 5, 93), |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 61 | }; |
| 62 | int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl); |
| 63 | #endif |
| 64 | |
| 65 | struct liodn_id_table sec_liodn_tbl[] = { |
| 66 | SET_SEC_JR_LIODN_ENTRY(0, 454, 458), |
| 67 | SET_SEC_JR_LIODN_ENTRY(1, 455, 459), |
| 68 | SET_SEC_JR_LIODN_ENTRY(2, 456, 460), |
| 69 | SET_SEC_JR_LIODN_ENTRY(3, 457, 461), |
| 70 | SET_SEC_RTIC_LIODN_ENTRY(a, 453), |
| 71 | SET_SEC_RTIC_LIODN_ENTRY(b, 549), |
| 72 | SET_SEC_RTIC_LIODN_ENTRY(c, 550), |
| 73 | SET_SEC_RTIC_LIODN_ENTRY(d, 551), |
| 74 | SET_SEC_DECO_LIODN_ENTRY(0, 541, 610), |
| 75 | SET_SEC_DECO_LIODN_ENTRY(1, 542, 611), |
| 76 | }; |
| 77 | int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl); |
| 78 | |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 79 | struct liodn_id_table liodn_bases[] = { |
| 80 | [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(462, 558), |
| 81 | #ifdef CONFIG_SYS_DPAA_FMAN |
| 82 | [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(973), |
| 83 | #endif |
York Sun | 4657136 | 2013-03-25 07:40:06 +0000 | [diff] [blame] | 84 | }; |