Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
York Sun | bcf7b3d | 2012-10-08 07:44:20 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2012 Freescale Semiconductor, Inc. |
York Sun | bcf7b3d | 2012-10-08 07:44:20 +0000 | [diff] [blame] | 4 | */ |
| 5 | |
Tom Rini | b01c75d | 2024-04-27 08:10:57 -0600 | [diff] [blame^] | 6 | #include <config.h> |
York Sun | bcf7b3d | 2012-10-08 07:44:20 +0000 | [diff] [blame] | 7 | #include <asm/fsl_portals.h> |
| 8 | #include <asm/fsl_liodn.h> |
| 9 | |
| 10 | #ifdef CONFIG_SYS_DPAA_QBMAN |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 11 | struct qportal_info qp_info[CFG_SYS_QMAN_NUM_PORTALS] = { |
York Sun | bcf7b3d | 2012-10-08 07:44:20 +0000 | [diff] [blame] | 12 | /* dqrr liodn, frame data liodn, liodn off, sdest */ |
| 13 | SET_QP_INFO(1, 27, 1, 0), |
| 14 | SET_QP_INFO(2, 28, 1, 0), |
| 15 | SET_QP_INFO(3, 29, 1, 1), |
| 16 | SET_QP_INFO(4, 30, 1, 1), |
| 17 | SET_QP_INFO(5, 31, 1, 2), |
| 18 | SET_QP_INFO(6, 32, 1, 2), |
| 19 | SET_QP_INFO(7, 33, 1, 3), |
| 20 | SET_QP_INFO(8, 34, 1, 3), |
| 21 | SET_QP_INFO(9, 35, 1, 0), |
| 22 | SET_QP_INFO(10, 36, 1, 0), |
| 23 | SET_QP_INFO(11, 37, 1, 1), |
| 24 | SET_QP_INFO(12, 38, 1, 1), |
| 25 | SET_QP_INFO(13, 39, 1, 2), |
| 26 | SET_QP_INFO(14, 40, 1, 2), |
| 27 | SET_QP_INFO(15, 41, 1, 3), |
| 28 | SET_QP_INFO(16, 42, 1, 3), |
| 29 | SET_QP_INFO(17, 43, 1, 0), |
| 30 | SET_QP_INFO(18, 44, 1, 0), |
| 31 | SET_QP_INFO(19, 45, 1, 1), |
| 32 | SET_QP_INFO(20, 46, 1, 1), |
| 33 | SET_QP_INFO(21, 47, 1, 2), |
| 34 | SET_QP_INFO(22, 48, 1, 2), |
| 35 | SET_QP_INFO(23, 49, 1, 3), |
| 36 | SET_QP_INFO(24, 50, 1, 3), |
| 37 | SET_QP_INFO(25, 51, 1, 0), |
| 38 | }; |
| 39 | #endif |
| 40 | |
Poonam Aggrwal | 248865e | 2012-12-23 19:24:16 +0000 | [diff] [blame] | 41 | #ifdef CONFIG_SYS_SRIO |
York Sun | bcf7b3d | 2012-10-08 07:44:20 +0000 | [diff] [blame] | 42 | struct srio_liodn_id_table srio_liodn_tbl[] = { |
Liu Gang | bc6486a | 2013-06-25 18:12:13 +0800 | [diff] [blame] | 43 | SET_SRIO_LIODN_BASE(1, 307), |
| 44 | SET_SRIO_LIODN_BASE(2, 387), |
York Sun | bcf7b3d | 2012-10-08 07:44:20 +0000 | [diff] [blame] | 45 | }; |
| 46 | int srio_liodn_tbl_sz = ARRAY_SIZE(srio_liodn_tbl); |
Poonam Aggrwal | 248865e | 2012-12-23 19:24:16 +0000 | [diff] [blame] | 47 | #endif |
York Sun | bcf7b3d | 2012-10-08 07:44:20 +0000 | [diff] [blame] | 48 | |
| 49 | struct liodn_id_table liodn_tbl[] = { |
| 50 | #ifdef CONFIG_SYS_DPAA_QBMAN |
| 51 | SET_QMAN_LIODN(62), |
| 52 | SET_BMAN_LIODN(63), |
| 53 | #endif |
| 54 | |
| 55 | SET_SDHC_LIODN(1, 552), |
| 56 | |
ramneek mehresh | 160b35b | 2014-08-21 17:52:17 +0530 | [diff] [blame] | 57 | SET_USB_LIODN(1, "fsl-usb2-dr", 553), |
York Sun | bcf7b3d | 2012-10-08 07:44:20 +0000 | [diff] [blame] | 58 | |
Tudor Laurentiu | a016d65 | 2014-12-12 10:41:26 +0200 | [diff] [blame] | 59 | SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 1, 148), |
York Sun | bcf7b3d | 2012-10-08 07:44:20 +0000 | [diff] [blame] | 60 | |
Tudor Laurentiu | 7210d9a | 2014-11-20 12:09:31 +0200 | [diff] [blame] | 61 | SET_DMA_LIODN(1, "fsl,elo3-dma", 147), |
| 62 | SET_DMA_LIODN(2, "fsl,elo3-dma", 227), |
York Sun | bcf7b3d | 2012-10-08 07:44:20 +0000 | [diff] [blame] | 63 | |
York Sun | fda566d | 2016-11-18 11:56:57 -0800 | [diff] [blame] | 64 | #ifndef CONFIG_ARCH_B4420 |
York Sun | bcf7b3d | 2012-10-08 07:44:20 +0000 | [diff] [blame] | 65 | SET_GUTS_LIODN("fsl,rapidio-delta", 199, rio1liodnr, 0), |
| 66 | SET_GUTS_LIODN(NULL, 200, rio2liodnr, 0), |
| 67 | SET_GUTS_LIODN(NULL, 201, rio1maintliodnr, 0), |
| 68 | SET_GUTS_LIODN(NULL, 202, rio2maintliodnr, 0), |
Poonam Aggrwal | 248865e | 2012-12-23 19:24:16 +0000 | [diff] [blame] | 69 | #endif |
York Sun | bcf7b3d | 2012-10-08 07:44:20 +0000 | [diff] [blame] | 70 | |
| 71 | /* SET_NEXUS_LIODN(557), -- not yet implemented */ |
| 72 | }; |
| 73 | int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl); |
| 74 | |
| 75 | #ifdef CONFIG_SYS_DPAA_FMAN |
Igal Liberman | e14ec99 | 2015-08-18 14:47:05 +0300 | [diff] [blame] | 76 | struct fman_liodn_id_table fman1_liodn_tbl[] = { |
York Sun | bcf7b3d | 2012-10-08 07:44:20 +0000 | [diff] [blame] | 77 | SET_FMAN_RX_1G_LIODN(1, 0, 88), |
| 78 | SET_FMAN_RX_1G_LIODN(1, 1, 89), |
| 79 | SET_FMAN_RX_1G_LIODN(1, 2, 90), |
| 80 | SET_FMAN_RX_1G_LIODN(1, 3, 91), |
| 81 | SET_FMAN_RX_1G_LIODN(1, 4, 92), |
| 82 | SET_FMAN_RX_1G_LIODN(1, 5, 93), |
York Sun | fda566d | 2016-11-18 11:56:57 -0800 | [diff] [blame] | 83 | #ifndef CONFIG_ARCH_B4420 |
York Sun | bcf7b3d | 2012-10-08 07:44:20 +0000 | [diff] [blame] | 84 | SET_FMAN_RX_10G_LIODN(1, 0, 94), |
| 85 | SET_FMAN_RX_10G_LIODN(1, 1, 95), |
Poonam Aggrwal | 248865e | 2012-12-23 19:24:16 +0000 | [diff] [blame] | 86 | #endif |
York Sun | bcf7b3d | 2012-10-08 07:44:20 +0000 | [diff] [blame] | 87 | }; |
| 88 | int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl); |
| 89 | #endif |
| 90 | |
| 91 | struct liodn_id_table sec_liodn_tbl[] = { |
| 92 | SET_SEC_JR_LIODN_ENTRY(0, 454, 458), |
| 93 | SET_SEC_JR_LIODN_ENTRY(1, 455, 459), |
| 94 | SET_SEC_JR_LIODN_ENTRY(2, 456, 460), |
| 95 | SET_SEC_JR_LIODN_ENTRY(3, 457, 461), |
| 96 | SET_SEC_RTIC_LIODN_ENTRY(a, 453), |
| 97 | SET_SEC_RTIC_LIODN_ENTRY(b, 549), |
| 98 | SET_SEC_RTIC_LIODN_ENTRY(c, 550), |
| 99 | SET_SEC_RTIC_LIODN_ENTRY(d, 551), |
| 100 | SET_SEC_DECO_LIODN_ENTRY(0, 541, 610), |
| 101 | SET_SEC_DECO_LIODN_ENTRY(1, 542, 611), |
| 102 | SET_SEC_DECO_LIODN_ENTRY(2, 543, 612), |
| 103 | SET_SEC_DECO_LIODN_ENTRY(3, 544, 613), |
| 104 | SET_SEC_DECO_LIODN_ENTRY(4, 545, 614), |
| 105 | SET_SEC_DECO_LIODN_ENTRY(5, 546, 615), |
| 106 | SET_SEC_DECO_LIODN_ENTRY(6, 547, 616), |
| 107 | SET_SEC_DECO_LIODN_ENTRY(7, 548, 617), |
| 108 | }; |
| 109 | int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl); |
| 110 | |
| 111 | #ifdef CONFIG_SYS_DPAA_RMAN |
| 112 | struct liodn_id_table rman_liodn_tbl[] = { |
| 113 | /* Set RMan block 0-3 liodn offset */ |
Minghuan Lian | 621de44 | 2013-07-03 18:32:41 +0800 | [diff] [blame] | 114 | SET_RMAN_LIODN(0, 6), |
| 115 | SET_RMAN_LIODN(1, 7), |
| 116 | SET_RMAN_LIODN(2, 8), |
| 117 | SET_RMAN_LIODN(3, 9), |
York Sun | bcf7b3d | 2012-10-08 07:44:20 +0000 | [diff] [blame] | 118 | }; |
| 119 | int rman_liodn_tbl_sz = ARRAY_SIZE(rman_liodn_tbl); |
| 120 | #endif |
| 121 | |
| 122 | struct liodn_id_table liodn_bases[] = { |
| 123 | [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(462, 558), |
| 124 | #ifdef CONFIG_SYS_DPAA_FMAN |
| 125 | [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(973), |
| 126 | #endif |
| 127 | #ifdef CONFIG_SYS_DPAA_RMAN |
| 128 | [FSL_HW_PORTAL_RMAN] = SET_LIODN_BASE_1(922), |
| 129 | #endif |
| 130 | }; |